傅行帆 5 years ago
parent
commit
de6fd1a605

+ 2
- 2
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java View File

@@ -10,7 +10,6 @@ import com.huiju.estateagents.excel.*;
10 10
 import org.apache.ibatis.annotations.Mapper;
11 11
 import org.apache.ibatis.annotations.Param;
12 12
 
13
-import java.time.LocalDateTime;
14 13
 import java.util.List;
15 14
 import java.util.Map;
16 15
 
@@ -46,9 +45,10 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
46 45
      * @param entryType
47 46
      * @param verifyStatus
48 47
      * @param sex
48
+     * @param personBuildingList
49 49
      * @return
50 50
      */
51
-    IPage<TaPerson> getPublicCustomerList(IPage<TaPerson> page, @Param("name") String name, @Param("tel") String tel,@Param("entryType") String entryType,@Param("verifyStatus") String verifyStatus,@Param("sex") Integer sex, @Param("orgId") Integer orgId,@Param("consultTel")String consultTel,@Param("sceneType") String sceneType);
51
+    IPage<TaPerson> getPublicCustomerList(IPage<TaPerson> page, @Param("name") String name, @Param("tel") String tel, @Param("entryType") String entryType, @Param("verifyStatus") String verifyStatus, @Param("sex") Integer sex, @Param("orgId") Integer orgId, @Param("consultTel") String consultTel, @Param("sceneType") String sceneType,@Param("personBuildingList") List<TaPersonBuilding> personBuildingList);
52 52
 
53 53
     /**
54 54
      * 导出数据 获取推荐用户数据

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java View File

@@ -492,7 +492,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
492 492
             // 公客
493 493
             IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
494 494
             // 公客就不用 buildingId 进行查询
495
-            return taRecommendCustomerMapper.getPublicCustomerList(page,name, tel,  entryType, verifyStatus, sex, orgId,consultTel,sceneType);
495
+            return taRecommendCustomerMapper.getPublicCustomerList(page,name, tel,  entryType, verifyStatus, sex, orgId,consultTel,sceneType, taPersonBuildingList);
496 496
         } else {
497 497
             // 私客
498 498
             IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);

+ 6
- 0
src/main/resources/mapper/TaRecommendCustomerMapper.xml View File

@@ -268,6 +268,12 @@ FROM
268 268
                 and b.tel like CONCAT('%',#{consultTel}, '%')
269 269
             </if>
270 270
             and NOT EXISTS ( select * from ta_recommend_customer a where a.org_id = #{orgId} and a.recommend_person = b.person_id)
271
+            <if test="personBuildingList != null and personBuildingList.size > 0">
272
+                AND r.building_id in
273
+                <foreach collection="personBuildingList" item="personBuilding" open="(" close=")" separator=",">
274
+                    #{personBuilding.buildingId}
275
+                </foreach>
276
+            </if>
271 277
         </where>
272 278
         order by b.create_date desc
273 279
     </select>