张延森 3 anos atrás
pai
commit
137fdee70c

+ 1
- 1
pom.xml Ver arquivo

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.yunzhi</groupId>
12 12
 	<artifactId>marketing</artifactId>
13
-	<version>v1.0.34</version>
13
+	<version>v1.0.36</version>
14 14
 	<name>marketing-cloud</name>
15 15
 	<description>新联康营销云</description>
16 16
 

+ 2
- 0
src/main/java/com/yunzhi/marketing/mapper/TaPersonMapper.java Ver arquivo

@@ -262,4 +262,6 @@ public interface TaPersonMapper extends BaseMapper<TaPerson> {
262 262
     Integer cancelConsulatant(@Param("personId") String personId);
263 263
 
264 264
     IPage<TaPerson> getMarketingList(Page<TaBuildingDynamic> page,@Param("buildingId") String buildingId);
265
+
266
+    TaPerson getByPhone(@Param("personId") String phone);
265 267
 }

+ 14
- 2
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java Ver arquivo

@@ -388,6 +388,9 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
388 388
         // 当前人员
389 389
         TaPerson person = taPersonMapper.getById(channelReportDTO.getPersonId());
390 390
 
391
+        // 查询报备客户
392
+        TaPerson reportPerson = taPersonMapper.getByPhone(channelReportDTO.getPhone());
393
+
391 394
         // 先查看在ta_recommend_customer 手机号是否存在
392 395
         LambdaQueryWrapper<TaRecommendCustomer> queryWrapper = new LambdaQueryWrapper<>();
393 396
         queryWrapper.eq(TaRecommendCustomer::getPhone,channelReportDTO.getPhone());
@@ -435,6 +438,9 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
435 438
 
436 439
         // 入渠道推荐客户表
437 440
         ChannelCustomer channelCustomer = new ChannelCustomer();
441
+        if (null != reportPerson) {
442
+            channelCustomer.setPersonId(reportPerson.getPersonId());
443
+        }
438 444
         channelCustomer.setBuildingId(channelReportDTO.getBuildingId());
439 445
         channelCustomer.setName(channelReportDTO.getName());
440 446
         channelCustomer.setPicture(channelReportDTO.getPicture());
@@ -640,9 +646,11 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
640 646
     @Override
641 647
     public ResponseBean averageReportCust(AverageReportDTO averageReportDTO) {
642 648
 
643
-
644 649
         // 当前人员
645
-        TaPerson person = taPersonMapper.getById(averageReportDTO.getPersonId());
650
+//        TaPerson person = taPersonMapper.getById(averageReportDTO.getPersonId());
651
+
652
+        // 查询报备客户
653
+        TaPerson reportPerson = taPersonMapper.getByPhone(averageReportDTO.getPhone());
646 654
 
647 655
         // 先查看在ta_recommend_customer 手机号是否存在
648 656
         LambdaQueryWrapper<TaRecommendCustomer> queryWrapper = new LambdaQueryWrapper<>();
@@ -667,6 +675,10 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
667 675
 
668 676
         // 入渠道推荐客户表
669 677
         ChannelCustomer channelCustomer = new ChannelCustomer();
678
+        if (null != reportPerson) {
679
+            channelCustomer.setPersonId(reportPerson.getPersonId());
680
+        }
681
+
670 682
         channelCustomer.setBuildingId(averageReportDTO.getBuildingId());
671 683
         channelCustomer.setName(averageReportDTO.getName());
672 684
         channelCustomer.setPicture(averageReportDTO.getPicture());

+ 9
- 0
src/main/resources/mapper/TaPersonMapper.xml Ver arquivo

@@ -649,6 +649,15 @@ FROM
649 649
         WHERE
650 650
         t.building_id = #{buildingId}
651 651
     </select>
652
+    <select id="getByPhone" resultType="com.yunzhi.marketing.entity.TaPerson">
653
+        SELECT
654
+            *
655
+        FROM
656
+            ta_person t
657
+        WHERE
658
+            t.phone = #{phone}
659
+          AND t.`status` &gt; -1
660
+    </select>
652 661
 
653 662
     <insert id="savePersonPosition" parameterType="com.yunzhi.marketing.entity.TaPersonPositon">
654 663
         insert into ta_person_position