Преглед на файлове

Merge branch 'develop' of http://git.ycjcjy.com/marketing/services into develop

张延森 преди 3 години
родител
ревизия
67ca5af002

+ 6
- 0
src/main/java/com/yunzhi/marketing/center/taUser/entity/TaUserVO.java Целия файл

@@ -289,4 +289,10 @@ public class TaUserVO implements Serializable {
289 289
      */
290 290
     @TableField(exist = false)
291 291
     private String bossDisplay;
292
+
293
+    /**
294
+     * ta_user 的 userId
295
+     */
296
+    @TableField(exist = false)
297
+    private Integer realUserId;
292 298
 }

+ 2
- 2
src/main/java/com/yunzhi/marketing/service/impl/TaBuildingServiceImpl.java Целия файл

@@ -884,10 +884,10 @@ public class TaBuildingServiceImpl extends ServiceImpl<TaBuildingMapper, TaBuild
884 884
         }
885 885
         switch (orderBy) {
886 886
             case "price-asc":
887
-                orderBy = "tbpt.start_price ASC";
887
+                orderBy = "IFNULL(tbpt.price_type,\"z\") , ifnull(CONVERT(tbpt.start_price, UNSIGNED INTEGER), 9999999999999)";
888 888
                 break;
889 889
             case "price-desc":
890
-                orderBy = "tbpt.end_price DESC";
890
+                orderBy = "tbpt.price_type desc, CONVERT(tbpt.end_price, UNSIGNED INTEGER) DESC";
891 891
                 break;
892 892
             case "openingDate-asc":
893 893
                 orderBy = "tb.opening_date ASC";

+ 3
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaFavorServiceImpl.java Целия файл

@@ -130,6 +130,9 @@ public class TaFavorServiceImpl extends ServiceImpl<TaFavorMapper, TaFavor> impl
130 130
         if (typeOf.equals("card")) {
131 131
             taPersonMapper.setFieldIncrement(taPerson.getPersonId(),"like_num", -1);
132 132
         }
133
+        if (typeOf.equals(CommConstant.FAVOR_CONSULTANT)) {
134
+            taPersonMapper.setFieldIncrement(like,"like_num", -1);
135
+        }
133 136
 
134 137
         // 如果是收藏资讯, 则 - 1
135 138
         if (typeOf.equals(CommConstant.FAVOR_NEWS)) {

+ 16
- 16
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java Целия файл

@@ -774,22 +774,6 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
774 774
             lambdaQueryWrapper.eq(CustomerVisit::getCustomerId,taRecommendCustomer.getCustomerId());
775 775
             CustomerVisit customerVisit = customerVisitMapper.selectOne(lambdaQueryWrapper);
776 776
             taRecommendCustomerVO.setCustomerVisit(customerVisit);
777
-        }else if (CommConstant.CUSTOMER_PREPARATORY.equals(taRecommendCustomer.getStatus())) {
778
-            // 认筹状态
779
-            LambdaQueryWrapper<CustomerPreparatory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
780
-            lambdaQueryWrapper.eq(CustomerPreparatory::getCustomerId,taRecommendCustomer.getCustomerId());
781
-            CustomerPreparatory customerPreparatory = customerPreparatoryMapper.selectOne(lambdaQueryWrapper);
782
-            taRecommendCustomerVO.setCustomerPreparatory(customerPreparatory);
783
-        }else if (CommConstant.CUSTOMER_SIGNED.equals(taRecommendCustomer.getStatus())) {
784
-            // 签约状态
785
-            LambdaQueryWrapper<CustomerSignatory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
786
-            lambdaQueryWrapper.eq(CustomerSignatory::getCustomerId,taRecommendCustomer.getCustomerId());
787
-            List<CustomerSignatory> customerSignatories = customerSignatoryMapper.selectList(lambdaQueryWrapper);
788
-            customerSignatories.forEach(e -> {
789
-                TaBuildingApartment taBuildingApartment = taBuildingApartmentMapper.selectById(e.getHouseType());
790
-                e.setBuildingApartment(taBuildingApartment);
791
-            });
792
-            taRecommendCustomerVO.setCustomerSignatory(customerSignatories);
793 777
         }
794 778
 
795 779
         LambdaQueryWrapper<ChannelCustomer> channelCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>();
@@ -798,6 +782,22 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
798 782
         if (null != customer) {
799 783
             taRecommendCustomerVO.setChannelCustomer(customer);
800 784
         }
785
+        // 认筹状态
786
+        LambdaQueryWrapper<CustomerPreparatory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
787
+        lambdaQueryWrapper.eq(CustomerPreparatory::getCustomerId,taRecommendCustomer.getCustomerId());
788
+        CustomerPreparatory customerPreparatory = customerPreparatoryMapper.selectOne(lambdaQueryWrapper);
789
+        taRecommendCustomerVO.setCustomerPreparatory(customerPreparatory);
790
+
791
+        // 签约状态
792
+        LambdaQueryWrapper<CustomerSignatory> qylambdaQueryWrapper = new LambdaQueryWrapper<>();
793
+        qylambdaQueryWrapper.eq(CustomerSignatory::getCustomerId,taRecommendCustomer.getCustomerId());
794
+        List<CustomerSignatory> customerSignatories = customerSignatoryMapper.selectList(qylambdaQueryWrapper);
795
+        customerSignatories.forEach(e -> {
796
+            TaBuildingApartment taBuildingApartment = taBuildingApartmentMapper.selectById(e.getHouseType());
797
+            e.setBuildingApartment(taBuildingApartment);
798
+        });
799
+        taRecommendCustomerVO.setCustomerSignatory(customerSignatories);
800
+
801 801
         return ResponseBean.success(taRecommendCustomerVO);
802 802
     }
803 803
 

+ 2
- 2
src/main/java/com/yunzhi/marketing/xlk/controller/CustomerInfoController.java Целия файл

@@ -236,7 +236,7 @@ public class CustomerInfoController extends BaseController {
236 236
                 customerInfo = new CustomerInfo();
237 237
             }
238 238
             customerInfo.setName(customer.getName());
239
-            customerInfo.setSex(customer.getSex());
239
+//            customerInfo.setSex(customer.getSex());
240 240
             customerInfo.setPhone(customer.getPhone());
241 241
             customerInfo.setPicture(customer.getPicture());
242 242
 
@@ -274,7 +274,7 @@ public class CustomerInfoController extends BaseController {
274 274
                 customerInfoVO.setRealtyConsultantPerson(realtyPerson);
275 275
                 // 所属楼盘和 用户信息
276 276
                 LambdaQueryWrapper<TaPersonBuilding> taPersonBuildingLambdaQueryWrapper = new LambdaQueryWrapper<>();
277
-                taPersonBuildingLambdaQueryWrapper.eq(TaPersonBuilding::getPersonId,customer.getRealtyConsultant());
277
+                taPersonBuildingLambdaQueryWrapper.eq(TaPersonBuilding::getPersonId,customer.getRealtyConsultant()).or().eq(TaPersonBuilding::getUserId,realtyPerson.getUserId());
278 278
                 List<TaPersonBuilding> list = taPersonBuildingService.list(taPersonBuildingLambdaQueryWrapper);
279 279
                 if (list.size() > 0) {
280 280
                     TaUser taUser = taUserService.getById(list.get(0).getUserId());

+ 20
- 3
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java Целия файл

@@ -367,7 +367,12 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
367 367
         }
368 368
         customerPreparatory.setOrgId(taRecommendCustomer.getOrgId());
369 369
         customerPreparatory.setCustomerId(taRecommendCustomer.getCustomerId());
370
-        customerPreparatoryMapper.insert(customerPreparatory);
370
+        if (StringUtils.isEmpty(customerPreparatory.getCustomerPreparatoryId())) {
371
+            customerPreparatoryMapper.insert(customerPreparatory);
372
+        }else {
373
+            customerPreparatoryMapper.updateById(customerPreparatory);
374
+        }
375
+
371 376
         return ResponseBean.success("审核成功");
372 377
     }
373 378
 
@@ -406,7 +411,13 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
406 411
         customerSignatory.setOrgId(taRecommendCustomer.getOrgId());
407 412
         customerSignatory.setCreateDate(LocalDateTime.now());
408 413
         customerSignatory.setType("commission");
409
-        customerSignatoryMapper.insert(customerSignatory);
414
+        customerSignatory.setCustomerId(params.getCustomerId());
415
+        if (StringUtils.isEmpty(customerSignatory.getCustomerSignatoryId())){
416
+            customerSignatoryMapper.insert(customerSignatory);
417
+        }else {
418
+            customerSignatoryMapper.updateById(customerSignatory);
419
+        }
420
+
410 421
         return ResponseBean.success("审核成功");
411 422
     }
412 423
 
@@ -447,7 +458,13 @@ public class ChannelCustomerServiceImpl extends ServiceImpl<ChannelCustomerMappe
447 458
         }
448 459
         customerSignatory.setOrgId(taRecommendCustomer.getOrgId());
449 460
         customerSignatory.setType("signatory");
450
-        customerSignatoryMapper.insert(customerSignatory);
461
+        customerSignatory.setCustomerId(params.getCustomerId());
462
+        if (StringUtils.isEmpty(customerSignatory.getCustomerSignatoryId())) {
463
+            customerSignatoryMapper.insert(customerSignatory);
464
+        }else {
465
+            customerSignatoryMapper.updateById(customerSignatory);
466
+        }
467
+
451 468
         return ResponseBean.success("审核成功");
452 469
     }
453 470
 

+ 3
- 3
src/main/java/com/yunzhi/marketing/xlk/service/impl/SearchHouseServiceImpl.java Целия файл

@@ -109,8 +109,8 @@ public class SearchHouseServiceImpl extends ServiceImpl<SearchHouseMapper, Searc
109 109
     }
110 110
 
111 111
     private Integer[] getUnitPriceRange(Integer minPriceW, Integer maxPriceW, Integer areaResultId) {
112
-        Integer minPrice = minPriceW * 10000;
113
-        Integer maxPrice = maxPriceW * 10000;
112
+        Integer minPrice = minPriceW;
113
+        Integer maxPrice = maxPriceW;
114 114
 
115 115
         // 字典过滤 - 必须与小程序端保持一致
116 116
         switch (areaResultId) {
@@ -151,6 +151,6 @@ public class SearchHouseServiceImpl extends ServiceImpl<SearchHouseMapper, Searc
151 151
                 break;
152 152
         }
153 153
 
154
-        return new Integer[] {minPrice, maxPrice};
154
+        return new Integer[] {minPrice * 10000, maxPrice * 10000};
155 155
     }
156 156
 }

+ 1
- 1
src/main/resources/mapper/TaBuildingMapper.xml Целия файл

@@ -49,7 +49,7 @@
49 49
         SELECT * FROM ta_building
50 50
         <where>
51 51
             1 =1
52
-            and status = 1
52
+            and status != -1
53 53
             <if test="Name != null and Name != ''">
54 54
                 and  (ta_building.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_building.building_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
55 55
             </if>

+ 1
- 0
src/main/resources/mapper/TaUserMapper.xml Целия файл

@@ -161,6 +161,7 @@
161 161
     <select id="selectPageList" resultType="com.yunzhi.marketing.center.taUser.entity.TaUserVO">
162 162
         SELECT
163 163
             s.person_id as user_id,
164
+            t.user_id as real_user_id,
164 165
             t.*
165 166
         FROM
166 167
             ta_user t

+ 1
- 0
src/main/resources/mapper/xlk/SearchHouseMapper.xml Целия файл

@@ -26,6 +26,7 @@
26 26
         <if test="params.status != null and params.status != ''">
27 27
             and t.status = #{params.status}
28 28
         </if>
29
+        order by CREATED_TIME desc
29 30
     </select>
30 31
     <select id="selectSearchHouseDetail" resultType="com.yunzhi.marketing.xlk.vo.SearchHouseVO">
31 32
         SELECT