魏熙美 5 年前
父节点
当前提交
4d4a2023cc

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java 查看文件

@@ -44,7 +44,7 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
44 44
      * @param sex
45 45
      * @return
46 46
      */
47
-    IPage<TaPerson> getPublicCustomerList(IPage<TaPerson> page, @Param("buildingId") String buildingId, @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);
47
+    IPage<TaRecommendCustomer> getPublicCustomerList(IPage<TaRecommendCustomer> page, @Param("buildingId") String buildingId, @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);
48 48
 
49 49
     /**
50 50
      * 导出数据 获取推荐用户数据

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java 查看文件

@@ -398,7 +398,7 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
398 398
              */
399 399
 
400 400
             // 公客
401
-            IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
401
+            IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
402 402
             return taRecommendCustomerMapper.getPublicCustomerList(page, building,name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
403 403
         } else {
404 404
             // 私客

+ 5
- 29
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

@@ -203,35 +203,11 @@ FROM
203 203
 	WHERE a.customer_id = #{customerId}
204 204
     </select>
205 205
 
206
-    <select id="getPublicCustomerList" resultType="com.huiju.estateagents.entity.TaPerson">
207
-        SELECT
208
-        b.*
209
-        FROM
210
-        ta_person b
211
-        <where>
212
-            b.status > 0
213
-            AND IFNULL(b.person_type, '') in ('estate agent', 'customer')
214
-            <if test="name != null and name !=''">
215
-                and b.nickname like CONCAT('%',#{name}, '%')
216
-            </if>
217
-            <if test="tel != null and tel!=''">
218
-                and b.phone like CONCAT('%',#{tel}, '%')
219
-            </if>
220
-            <if test="entryType != null and entryType !=''">
221
-                and b.entry_type = #{entryType}
222
-            </if>
223
-            <if test="sex != null and sex !=''">
224
-                and b.sex = #{sex}
225
-            </if>
226
-            <if test="orgId != null">
227
-                and b.org_id = #{orgId}
228
-            </if>
229
-            <if test="consultTel != null and consultTel !=''">
230
-                and b.tel like CONCAT('%',#{consultTel}, '%')
231
-            </if>
232
-            and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
233
-        </where>
234
-        order by b.create_date desc
206
+    <select id="getPublicCustomerList" resultType="com.huiju.estateagents.entity.TaRecommendCustomer">
207
+        select * from
208
+        ta_recommend_customer ta
209
+        WHERE (ta.realty_consultant is NULL OR ta.realty_consultant = '')
210
+        order by ta.create_date desc
235 211
     </select>
236 212
 
237 213
     <select id="getRecCustomerExport" resultType="com.huiju.estateagents.excel.ExcelRecommendCustomer">