Ver código fonte

Merge branch 'v3' into v3.5

魏熙美 5 anos atrás
pai
commit
8b10f9a737

+ 0
- 15
src/main/java/com/huiju/estateagents/controller/MiniAppController.java Ver arquivo

@@ -356,21 +356,6 @@ public class MiniAppController extends BaseController {
356 356
 //            if(list.size()<=0){
357 357
 //                taCustomerPersonService.insertBean(person.getPersonId(),customers.getCustomerId());
358 358
 //            }
359
-        } else{
360
-            TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
361
-            taRecommendCustomer.setPersonId(person.getPersonId());
362
-            taRecommendCustomer.setPicture(person.getAvatarurl());
363
-            taRecommendCustomer.setCountry(person.getCountry());
364
-            taRecommendCustomer.setCity(person.getCity());
365
-            taRecommendCustomer.setProvince(person.getProvince());
366
-            taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
367
-            taRecommendCustomer.setOrgId(getOrgId(request));
368
-            taRecommendCustomer.setEntryType(CommConstant.ENTRY_VOLUNTEER);
369
-            taRecommendCustomer.setSex(Integer.getInteger(person.getGender()));
370
-            taRecommendCustomer.setName(person.getNickname());
371
-            taRecommendCustomer.setPhone(person.getPhone());
372
-            taRecommendCustomer.setCreateDate(LocalDateTime.now());
373
-            taRecommendCustomerService.save(taRecommendCustomer);
374 359
         }
375 360
 //        else{
376 361
 //            TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();

+ 1
- 1
src/main/java/com/huiju/estateagents/mapper/TaRecommendCustomerMapper.java Ver arquivo

@@ -44,7 +44,7 @@ public interface TaRecommendCustomerMapper extends BaseMapper<TaRecommendCustome
44 44
      * @param sex
45 45
      * @return
46 46
      */
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);
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);
48 48
 
49 49
     /**
50 50
      * 导出数据 获取推荐用户数据

+ 1
- 1
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java Ver arquivo

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

+ 29
- 5
src/main/resources/mapper/TaRecommendCustomerMapper.xml Ver arquivo

@@ -203,11 +203,35 @@ FROM
203 203
 	WHERE a.customer_id = #{customerId}
204 204
     </select>
205 205
 
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
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
211 235
     </select>
212 236
 
213 237
     <select id="getRecCustomerExport" resultType="com.huiju.estateagents.excel.ExcelRecommendCustomer">