Bläddra i källkod

经纪人我的客户

傅行帆 3 år sedan
förälder
incheckning
cda59275e7

+ 1
- 1
src/main/java/com/yunzhi/marketing/mapper/TaRecommendCustomerMapper.java Visa fil

251
 
251
 
252
     List<PersonIntention> getCustomerIntentions(@Param("personId") String personId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
252
     List<PersonIntention> getCustomerIntentions(@Param("personId") String personId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
253
 
253
 
254
-    IPage<TaRecommendCustomer> getCustomersIRecommended(IPage<TaRecommendCustomer> page, @Param("customerId") String customerId, @Param("status") Integer status, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
254
+    IPage<TaRecommendCustomerPO> getCustomersIRecommended(IPage<TaRecommendCustomerPO> page, @Param("customerId") String customerId, @Param("status") Integer status, @Param("orgId") Integer orgId, @Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
255
 
255
 
256
     /**
256
     /**
257
      * @param page
257
      * @param page

+ 2
- 1
src/main/java/com/yunzhi/marketing/service/ITaRecommendCustomerService.java Visa fil

10
 import com.yunzhi.marketing.excel.ExcelRecommendCustomer;
10
 import com.yunzhi.marketing.excel.ExcelRecommendCustomer;
11
 import com.yunzhi.marketing.excel.ReporRecommendCustomer;
11
 import com.yunzhi.marketing.excel.ReporRecommendCustomer;
12
 import com.yunzhi.marketing.entity.*;
12
 import com.yunzhi.marketing.entity.*;
13
+import com.yunzhi.marketing.po.TaRecommendCustomerPO;
13
 
14
 
14
 import java.util.List;
15
 import java.util.List;
15
 
16
 
53
 
54
 
54
     TaRecommendCustomer getCustomerById(String customerId);
55
     TaRecommendCustomer getCustomerById(String customerId);
55
 
56
 
56
-    IPage<TaRecommendCustomer> getCustomersIRecommended(int pageNumber, int pageSize, String customerId, Integer orgId, List<TaPersonBuilding> taPersonBuildingList);
57
+    IPage<TaRecommendCustomerPO> getCustomersIRecommended(int pageNumber, int pageSize, String customerId, Integer orgId, List<TaPersonBuilding> taPersonBuildingList);
57
 
58
 
58
     TaRecommendCustomer newByPerson(TaPerson person);
59
     TaRecommendCustomer newByPerson(TaPerson person);
59
 
60
 

+ 3
- 3
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java Visa fil

1327
     }
1327
     }
1328
 
1328
 
1329
     @Override
1329
     @Override
1330
-    public IPage<TaRecommendCustomer> getCustomersIRecommended(int pageNumber, int pageSize, String customerId, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
1330
+    public IPage<TaRecommendCustomerPO> getCustomersIRecommended(int pageNumber, int pageSize, String customerId, Integer orgId, List<TaPersonBuilding> taPersonBuildingList) {
1331
 
1331
 
1332
-        QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
1332
+//        QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
1333
         // todo
1333
         // todo
1334
         // 此处可能不是 person_id 而是 recommend_person
1334
         // 此处可能不是 person_id 而是 recommend_person
1335
-        IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
1335
+        IPage<TaRecommendCustomerPO> page = new Page<>(pageNumber, pageSize);
1336
 //        queryWrapper.eq("recommend_person",customerId);
1336
 //        queryWrapper.eq("recommend_person",customerId);
1337
 ////        queryWrapper.eq("building_id",building);
1337
 ////        queryWrapper.eq("building_id",building);
1338
 //        queryWrapper.eq("status", CommConstant.VERIFY_AGREE);
1338
 //        queryWrapper.eq("status", CommConstant.VERIFY_AGREE);

+ 38
- 2
src/main/resources/mapper/TaRecommendCustomerMapper.xml Visa fil

862
         intention DESC
862
         intention DESC
863
     </select>
863
     </select>
864
 
864
 
865
-    <select id="getCustomersIRecommended" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">
866
-        select a.*,b.avatarurl from ta_recommend_customer a left join ta_person b on a.person_id = b.person_id
865
+    <select id="getCustomersIRecommended" resultType="com.yunzhi.marketing.po.TaRecommendCustomerPO">
866
+        select a.customer_id AS id,
867
+        a.NAME,
868
+        a.phone,
869
+        a.picture,
870
+        a.sex,
871
+        "customer" AS type,
872
+        a.building_id AS buildingId,
873
+        a.realty_consultant AS consultant,
874
+        a.STATUS AS customerStatus,
875
+        NULL AS channelStatus,
876
+        b.avatarurl
877
+        from ta_recommend_customer a left join ta_person b on a.person_id = b.person_id
867
         where a.recommend_person = #{customerId}
878
         where a.recommend_person = #{customerId}
868
         and a.status &gt;= #{status}
879
         and a.status &gt;= #{status}
869
         and a.org_id = #{orgId}
880
         and a.org_id = #{orgId}
873
                 #{personBuilding.buildingId}
884
                 #{personBuilding.buildingId}
874
             </foreach>
885
             </foreach>
875
         </if>
886
         </if>
887
+        union all
888
+        SELECT
889
+        a.channel_customer_id AS id,
890
+        a.NAME,
891
+        a.phone,
892
+        a.picture,
893
+        a.sex,
894
+        "report" AS type,
895
+        NULL AS buildingId,
896
+        NULL AS consultant,
897
+        NULL AS customerStatus,
898
+        a.STATUS AS channelStatus,
899
+        b.avatarurl
900
+        FROM
901
+        xlk_channel_customer a
902
+        LEFT JOIN ta_person b ON a.person_id = b.person_id
903
+        where a.recommend_person = #{customerId}
904
+        and a.status = #{status}
905
+        and a.org_id = #{orgId}
906
+        <if test="personBuildingList != null and personBuildingList.size > 0">
907
+            AND a.building_id in
908
+            <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
909
+                #{personBuilding.buildingId}
910
+            </foreach>
911
+        </if>
876
     </select>
912
     </select>
877
 
913
 
878
     <select id="getCustomerListOfConsultant" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">
914
     <select id="getCustomerListOfConsultant" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">