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