浏览代码

Merge branch 'v3' of http://git.ycjcjy.com/zhiyuxing/estateagents into v3

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

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

46
      * @param sex
46
      * @param sex
47
      * @return
47
      * @return
48
      */
48
      */
49
-    IPage<TaRecommendCustomer> 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);
49
+    IPage<TaRecommendCustomer> 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);
50
 
50
 
51
     /**
51
     /**
52
      * 获取推荐用户数据
52
      * 获取推荐用户数据

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

339
         if (CommConstant.CUTOMER_TYPE_PUBLIC.equals(customerType)) {
339
         if (CommConstant.CUTOMER_TYPE_PUBLIC.equals(customerType)) {
340
             // 公客
340
             // 公客
341
             IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
341
             IPage<TaPerson>page = new Page<>(pageNumber,pageSize);
342
-            return taRecommendCustomerMapper.getPublicCustomerList(page, name, tel,  entryType, verifyStatus, sex, orgId);
342
+            return taRecommendCustomerMapper.getPublicCustomerList(page, name, tel,  entryType, verifyStatus, sex, orgId,consultTel);
343
         } else {
343
         } else {
344
             // 私客
344
             // 私客
345
             IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);
345
             IPage<TaRecommendCustomer>page = new Page<>(pageNumber,pageSize);

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

166
                 and a.building_id = #{building}
166
                 and a.building_id = #{building}
167
             </if>
167
             </if>
168
             <if test="name != null and name !=''">
168
             <if test="name != null and name !=''">
169
-                and a.name = #{name}
169
+                and a.name like CONCAT('%',#{name}, '%')
170
             </if>
170
             </if>
171
             <if test="tel != null and tel!=''">
171
             <if test="tel != null and tel!=''">
172
-                and a.phone = #{tel}
172
+                and a.phone like CONCAT('%',#{tel}, '%')
173
             </if>
173
             </if>
174
             <if test="consultName != null and consultName !=''">
174
             <if test="consultName != null and consultName !=''">
175
                 and b.name like CONCAT('%',#{consultName}, '%')
175
                 and b.name like CONCAT('%',#{consultName}, '%')
176
             </if>
176
             </if>
177
             <if test="consultTel != null and consultTel !=''">
177
             <if test="consultTel != null and consultTel !=''">
178
-                and b.tel = #{consultTel}
178
+                and b.tel like CONCAT('%',#{consultTel}, '%')
179
             </if>
179
             </if>
180
             <if test="entryType != null and entryType !=''">
180
             <if test="entryType != null and entryType !=''">
181
                 and a.entry_type = #{entryType}
181
                 and a.entry_type = #{entryType}
208
             b.status > 0
208
             b.status > 0
209
             AND IFNULL(b.person_type, '') in ('estate agent', 'customer')
209
             AND IFNULL(b.person_type, '') in ('estate agent', 'customer')
210
             <if test="name != null and name !=''">
210
             <if test="name != null and name !=''">
211
-                and b.nickname = #{name}
211
+                and b.nickname like CONCAT('%',#{name}, '%')
212
             </if>
212
             </if>
213
             <if test="tel != null and tel!=''">
213
             <if test="tel != null and tel!=''">
214
-                and b.phone = #{tel}
214
+                and b.phone like CONCAT('%',#{tel}, '%')
215
             </if>
215
             </if>
216
             <if test="entryType != null and entryType !=''">
216
             <if test="entryType != null and entryType !=''">
217
                 and b.entry_type = #{entryType}
217
                 and b.entry_type = #{entryType}
222
             <if test="orgId != null">
222
             <if test="orgId != null">
223
                 and b.org_id = #{orgId}
223
                 and b.org_id = #{orgId}
224
             </if>
224
             </if>
225
+            <if test="consultTel != null and consultTel !=''">
226
+                and b.tel like CONCAT('%',#{consultTel}, '%')
227
+            </if>
225
             and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
228
             and NOT EXISTS ( select * from ta_recommend_customer a where a.recommend_person = b.person_id)
226
         </where>
229
         </where>
227
         order by b.create_date desc
230
         order by b.create_date desc