|
@@ -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">
|