胡轶钦 5 yıl önce
ebeveyn
işleme
a3e267e474

+ 3
- 3
src/main/resources/mapper/TaRecommendCustomerMapper.xml Dosyayı Görüntüle

@@ -159,7 +159,7 @@ FROM
159 159
         ta_recommend_customer a
160 160
         LEFT JOIN ta_person b ON a.realty_consultant = b.person_id
161 161
         LEFT JOIN ta_person c on a.recommend_person = c.person_id
162
-        LEFT JOIN ta_user d on d.user_id = b.user_id
162
+        LEFT JOIN ta_user d on d.user_id = a.realty_consultant
163 163
         <where>
164 164
             a.status > 0
165 165
             and a.realty_consultant is not null
@@ -176,10 +176,10 @@ FROM
176 176
                 and a.phone like CONCAT('%',#{tel}, '%')
177 177
             </if>
178 178
             <if test="consultName != null and consultName !=''">
179
-                and b.name like CONCAT('%',#{consultName}, '%')
179
+                and IFNULL(b.name,d.user_name) like CONCAT('%',#{consultName}, '%')
180 180
             </if>
181 181
             <if test="consultTel != null and consultTel !=''">
182
-                and b.tel like CONCAT('%',#{consultTel}, '%')
182
+                and IFNULL(b.tel,d.phone) like CONCAT('%',#{consultTel}, '%')
183 183
             </if>
184 184
             <if test="entryType != null and entryType !=''">
185 185
                 and a.entry_type = #{entryType}