瀏覽代碼

经纪人我的客户

傅行帆 3 年之前
父節點
當前提交
cda59275e7

+ 1
- 1
src/main/java/com/yunzhi/marketing/mapper/TaRecommendCustomerMapper.java 查看文件

@@ -251,7 +251,7 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
251 251
 
252 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 257
      * @param page

+ 2
- 1
src/main/java/com/yunzhi/marketing/service/ITaRecommendCustomerService.java 查看文件

@@ -10,6 +10,7 @@ import com.yunzhi.marketing.excel.AgentsRecommendCustomer;
10 10
 import com.yunzhi.marketing.excel.ExcelRecommendCustomer;
11 11
 import com.yunzhi.marketing.excel.ReporRecommendCustomer;
12 12
 import com.yunzhi.marketing.entity.*;
13
+import com.yunzhi.marketing.po.TaRecommendCustomerPO;
13 14
 
14 15
 import java.util.List;
15 16
 
@@ -53,7 +54,7 @@ public interface ITaRecommendCustomerService extends IService<TaRecommendCustome
53 54
 
54 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 59
     TaRecommendCustomer newByPerson(TaPerson person);
59 60
 

+ 3
- 3
src/main/java/com/yunzhi/marketing/service/impl/TaRecommendCustomerServiceImpl.java 查看文件

@@ -1327,12 +1327,12 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
1327 1327
     }
1328 1328
 
1329 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 1333
         // todo
1334 1334
         // 此处可能不是 person_id 而是 recommend_person
1335
-        IPage<TaRecommendCustomer> page = new Page<>(pageNumber, pageSize);
1335
+        IPage<TaRecommendCustomerPO> page = new Page<>(pageNumber, pageSize);
1336 1336
 //        queryWrapper.eq("recommend_person",customerId);
1337 1337
 ////        queryWrapper.eq("building_id",building);
1338 1338
 //        queryWrapper.eq("status", CommConstant.VERIFY_AGREE);

+ 38
- 2
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

@@ -862,8 +862,19 @@ FROM
862 862
         intention DESC
863 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 878
         where a.recommend_person = #{customerId}
868 879
         and a.status &gt;= #{status}
869 880
         and a.org_id = #{orgId}
@@ -873,6 +884,31 @@ FROM
873 884
                 #{personBuilding.buildingId}
874 885
             </foreach>
875 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 912
     </select>
877 913
 
878 914
     <select id="getCustomerListOfConsultant" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">