|
@@ -359,6 +359,44 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
359
|
359
|
public IPage getCustomerList(Integer status,int pageNumber, int pageSize,String building,String name,String tel,String consultName,String consultTel,String entryType,String verifyStatus,Integer sex, String customerType, Integer orgId){
|
360
|
360
|
|
361
|
361
|
if (CommConstant.CUTOMER_TYPE_PUBLIC.equals(customerType)) {
|
|
362
|
+
|
|
363
|
+ /**
|
|
364
|
+ * <if test="buildingId != null">
|
|
365
|
+ * ,(select tpp.name from ta_share_person_from tspf left join ta_person tpp on tspf.share_person = tpp.person_id where tspf.building_id = #{buildingId} and tspf.is_first_time = 1) as sharePersonName
|
|
366
|
+ * </if>
|
|
367
|
+ */
|
|
368
|
+
|
|
369
|
+ /**
|
|
370
|
+ * SELECT
|
|
371
|
+ * b.*
|
|
372
|
+ * FROM
|
|
373
|
+ * ta_person b
|
|
374
|
+ * <where>
|
|
375
|
+ * b.status > 0
|
|
376
|
+ * AND IFNULL(b.person_type, '') in ('estate agent', 'customer')
|
|
377
|
+ * <if test="name != null and name !=''">
|
|
378
|
+ * and b.nickname like CONCAT('%',#{name}, '%')
|
|
379
|
+ * </if>
|
|
380
|
+ * <if test="tel != null and tel!=''">
|
|
381
|
+ * and b.phone like CONCAT('%',#{tel}, '%')
|
|
382
|
+ * </if>
|
|
383
|
+ * <if test="entryType != null and entryType !=''">
|
|
384
|
+ * and b.entry_type = #{entryType}
|
|
385
|
+ * </if>
|
|
386
|
+ * <if test="sex != null and sex !=''">
|
|
387
|
+ * and b.sex = #{sex}
|
|
388
|
+ * </if>
|
|
389
|
+ * <if test="orgId != null">
|
|
390
|
+ * and b.org_id = #{orgId}
|
|
391
|
+ * </if>
|
|
392
|
+ * <if test="consultTel != null and consultTel !=''">
|
|
393
|
+ * and b.tel like CONCAT('%',#{consultTel}, '%')
|
|
394
|
+ * </if>
|
|
395
|
+ * and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
|
|
396
|
+ * </where>
|
|
397
|
+ * order by b.create_date desc
|
|
398
|
+ */
|
|
399
|
+
|
362
|
400
|
// 公客
|
363
|
401
|
IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
|
364
|
402
|
return taRecommendCustomerMapper.getPublicCustomerList(page, building,name, tel, entryType, verifyStatus, sex, orgId,consultTel);
|