魏超 5 years ago
parent
commit
0047df783a

+ 1
- 1
src/main/resources/mapper/TaPersonMapper.xml View File

524
         LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id
524
         LEFT JOIN ta_recommend_customer rc ON p.person_id = rc.person_id
525
         <where>
525
         <where>
526
         <if test="name !=null and name !=''">
526
         <if test="name !=null and name !=''">
527
-            and rc.name like CONCAT('%',#{name}, '%')
527
+            and (p.name like CONCAT('%',#{name}, '%') or p.nickname like CONCAT('%',#{name}, '%'))
528
         </if>
528
         </if>
529
         <if test="phone !=null and phone !=''">
529
         <if test="phone !=null and phone !=''">
530
             and rc.phone like CONCAT('%',#{phone}, '%')
530
             and rc.phone like CONCAT('%',#{phone}, '%')

+ 1
- 1
src/main/resources/mapper/TaRecommendCustomerMapper.xml View File

490
 
490
 
491
     <select id="getIndependentAgentsExport" resultType="com.huiju.estateagents.excel.AgentsRecommendCustomer">
491
     <select id="getIndependentAgentsExport" resultType="com.huiju.estateagents.excel.AgentsRecommendCustomer">
492
         SELECT
492
         SELECT
493
-        ifnull(a.nickname, a.name) as nickname,
493
+        ifnull( a.name, a.nickname) as nickname,
494
         a.phone as phone,
494
         a.phone as phone,
495
         if(a.gender = '1', '男', if(a.gender = '2', '女', '未知')) as gender,
495
         if(a.gender = '1', '男', if(a.gender = '2', '女', '未知')) as gender,
496
         '专业经纪人' as personType,
496
         '专业经纪人' as personType,