소스 검색

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
      */
289
      */
290
     @TableField(exist = false)
290
     @TableField(exist = false)
291
     private String bossDisplay;
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
         }
884
         }
885
         switch (orderBy) {
885
         switch (orderBy) {
886
             case "price-asc":
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
                 break;
888
                 break;
889
             case "price-desc":
889
             case "price-desc":
890
-                orderBy = "tbpt.end_price DESC";
890
+                orderBy = "tbpt.price_type desc, CONVERT(tbpt.end_price, UNSIGNED INTEGER) DESC";
891
                 break;
891
                 break;
892
             case "openingDate-asc":
892
             case "openingDate-asc":
893
                 orderBy = "tb.opening_date ASC";
893
                 orderBy = "tb.opening_date ASC";

+ 3
- 0
src/main/java/com/yunzhi/marketing/service/impl/TaFavorServiceImpl.java 파일 보기

130
         if (typeOf.equals("card")) {
130
         if (typeOf.equals("card")) {
131
             taPersonMapper.setFieldIncrement(taPerson.getPersonId(),"like_num", -1);
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
         // 如果是收藏资讯, 则 - 1
137
         // 如果是收藏资讯, 则 - 1
135
         if (typeOf.equals(CommConstant.FAVOR_NEWS)) {
138
         if (typeOf.equals(CommConstant.FAVOR_NEWS)) {

+ 16
- 16
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java 파일 보기

774
             lambdaQueryWrapper.eq(CustomerVisit::getCustomerId,taRecommendCustomer.getCustomerId());
774
             lambdaQueryWrapper.eq(CustomerVisit::getCustomerId,taRecommendCustomer.getCustomerId());
775
             CustomerVisit customerVisit = customerVisitMapper.selectOne(lambdaQueryWrapper);
775
             CustomerVisit customerVisit = customerVisitMapper.selectOne(lambdaQueryWrapper);
776
             taRecommendCustomerVO.setCustomerVisit(customerVisit);
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
         LambdaQueryWrapper<ChannelCustomer> channelCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>();
779
         LambdaQueryWrapper<ChannelCustomer> channelCustomerLambdaQueryWrapper = new LambdaQueryWrapper<>();
798
         if (null != customer) {
782
         if (null != customer) {
799
             taRecommendCustomerVO.setChannelCustomer(customer);
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
         return ResponseBean.success(taRecommendCustomerVO);
801
         return ResponseBean.success(taRecommendCustomerVO);
802
     }
802
     }
803
 
803
 

+ 2
- 2
src/main/java/com/yunzhi/marketing/xlk/controller/CustomerInfoController.java 파일 보기

236
                 customerInfo = new CustomerInfo();
236
                 customerInfo = new CustomerInfo();
237
             }
237
             }
238
             customerInfo.setName(customer.getName());
238
             customerInfo.setName(customer.getName());
239
-            customerInfo.setSex(customer.getSex());
239
+//            customerInfo.setSex(customer.getSex());
240
             customerInfo.setPhone(customer.getPhone());
240
             customerInfo.setPhone(customer.getPhone());
241
             customerInfo.setPicture(customer.getPicture());
241
             customerInfo.setPicture(customer.getPicture());
242
 
242
 
274
                 customerInfoVO.setRealtyConsultantPerson(realtyPerson);
274
                 customerInfoVO.setRealtyConsultantPerson(realtyPerson);
275
                 // 所属楼盘和 用户信息
275
                 // 所属楼盘和 用户信息
276
                 LambdaQueryWrapper<TaPersonBuilding> taPersonBuildingLambdaQueryWrapper = new LambdaQueryWrapper<>();
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
                 List<TaPersonBuilding> list = taPersonBuildingService.list(taPersonBuildingLambdaQueryWrapper);
278
                 List<TaPersonBuilding> list = taPersonBuildingService.list(taPersonBuildingLambdaQueryWrapper);
279
                 if (list.size() > 0) {
279
                 if (list.size() > 0) {
280
                     TaUser taUser = taUserService.getById(list.get(0).getUserId());
280
                     TaUser taUser = taUserService.getById(list.get(0).getUserId());

+ 20
- 3
src/main/java/com/yunzhi/marketing/xlk/service/impl/ChannelCustomerServiceImpl.java 파일 보기

367
         }
367
         }
368
         customerPreparatory.setOrgId(taRecommendCustomer.getOrgId());
368
         customerPreparatory.setOrgId(taRecommendCustomer.getOrgId());
369
         customerPreparatory.setCustomerId(taRecommendCustomer.getCustomerId());
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
         return ResponseBean.success("审核成功");
376
         return ResponseBean.success("审核成功");
372
     }
377
     }
373
 
378
 
406
         customerSignatory.setOrgId(taRecommendCustomer.getOrgId());
411
         customerSignatory.setOrgId(taRecommendCustomer.getOrgId());
407
         customerSignatory.setCreateDate(LocalDateTime.now());
412
         customerSignatory.setCreateDate(LocalDateTime.now());
408
         customerSignatory.setType("commission");
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
         return ResponseBean.success("审核成功");
421
         return ResponseBean.success("审核成功");
411
     }
422
     }
412
 
423
 
447
         }
458
         }
448
         customerSignatory.setOrgId(taRecommendCustomer.getOrgId());
459
         customerSignatory.setOrgId(taRecommendCustomer.getOrgId());
449
         customerSignatory.setType("signatory");
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
         return ResponseBean.success("审核成功");
468
         return ResponseBean.success("审核成功");
452
     }
469
     }
453
 
470
 

+ 3
- 3
src/main/java/com/yunzhi/marketing/xlk/service/impl/SearchHouseServiceImpl.java 파일 보기

109
     }
109
     }
110
 
110
 
111
     private Integer[] getUnitPriceRange(Integer minPriceW, Integer maxPriceW, Integer areaResultId) {
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
         switch (areaResultId) {
116
         switch (areaResultId) {
151
                 break;
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
         SELECT * FROM ta_building
49
         SELECT * FROM ta_building
50
         <where>
50
         <where>
51
             1 =1
51
             1 =1
52
-            and status = 1
52
+            and status != -1
53
             <if test="Name != null and Name != ''">
53
             <if test="Name != null and Name != ''">
54
                 and  (ta_building.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_building.building_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
54
                 and  (ta_building.name like concat('%',#{Name,jdbcType=VARCHAR},'%') or ta_building.building_name like concat('%',#{Name,jdbcType=VARCHAR},'%'))
55
             </if>
55
             </if>

+ 1
- 0
src/main/resources/mapper/TaUserMapper.xml 파일 보기

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

+ 1
- 0
src/main/resources/mapper/xlk/SearchHouseMapper.xml 파일 보기

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