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

+ 1
- 1
pom.xml Целия файл

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

+ 2
- 0
src/main/java/com/yunzhi/marketing/mapper/TaPersonMapper.java Целия файл

262
     Integer cancelConsulatant(@Param("personId") String personId);
262
     Integer cancelConsulatant(@Param("personId") String personId);
263
 
263
 
264
     IPage<TaPerson> getMarketingList(Page<TaBuildingDynamic> page,@Param("buildingId") String buildingId);
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 Целия файл

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

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

649
         WHERE
649
         WHERE
650
         t.building_id = #{buildingId}
650
         t.building_id = #{buildingId}
651
     </select>
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
     <insert id="savePersonPosition" parameterType="com.yunzhi.marketing.entity.TaPersonPositon">
662
     <insert id="savePersonPosition" parameterType="com.yunzhi.marketing.entity.TaPersonPositon">
654
         insert into ta_person_position
663
         insert into ta_person_position