Browse Source

bug 修复

傅行帆 3 years ago
parent
commit
ed1570f352

+ 1
- 1
src/main/java/com/yunzhi/marketing/xlk/service/impl/InstitutionServiceImpl.java View File

@@ -74,7 +74,7 @@ public class InstitutionServiceImpl extends ServiceImpl<InstitutionMapper, Insti
74 74
     public ResponseBean deleteByinstitutionCode(String id) {
75 75
         Institution institution = institutionMapper.selectById(id);
76 76
         LambdaQueryWrapper<Institution> queryWrapper = new LambdaQueryWrapper<>();
77
-        queryWrapper.likeLeft(Institution::getInstitutionCode,institution.getInstitutionCode());
77
+        queryWrapper.likeRight(Institution::getInstitutionCode,institution.getInstitutionCode());
78 78
         List<Institution> institutions = institutionMapper.selectList(queryWrapper);
79 79
         if (institutions.size() > 1) {
80 80
             return ResponseBean.error("请先删除子公司", ResponseBean.ERROR_UNAVAILABLE);

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

@@ -808,39 +808,42 @@ FROM
808 808
 
809 809
     <select id="getMyCustFollowOrClinch" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">
810 810
         SELECT
811
-        *
811
+        IFNULL( p.nickname, t.NAME ) AS NAME,
812
+        IFNULL( p.avatarurl, t.picture ) AS picture,
813
+        t.*
812 814
         FROM
813
-        ta_recommend_customer
815
+        ta_recommend_customer t
816
+        LEFT JOIN ta_person p ON t.person_id = p.person_id
814 817
         WHERE
815
-        org_id = #{orgId}
816
-        AND ( realty_consultant = #{personId} OR realty_consultant = #{userId} )
818
+        t.org_id = #{orgId}
819
+        AND ( t.realty_consultant = #{personId} OR t.realty_consultant = #{userId} )
817 820
         <if test="type == 'follow'">
818
-            AND STATUS != 4
819
-            AND verify_status = 1
821
+            AND t.STATUS != 4
822
+            AND t.verify_status = 1
820 823
             <if test="name != null and name !=''">
821
-                and (`name` like CONCAT('%',#{name}, '%') or phone like CONCAT('%',#{name}, '%'))
824
+                and (p.nickname like CONCAT('%',#{name}, '%') or t.`name` like CONCAT('%',#{name}, '%') or t.phone like CONCAT('%',#{name}, '%'))
822 825
             </if>
823 826
             <if test="phone != null and phone !=''">
824
-                and phone like CONCAT('%',#{phone}, '%')
827
+                and t.phone like CONCAT('%',#{phone}, '%')
825 828
             </if>
826 829
             <if test="status != null and status !=''">
827
-                and status = #{status}
830
+                and t.status = #{status}
828 831
             </if>
829 832
             <if test="startReportDate != null and startReportDate !=''">
830
-                and date_format( report_date, '%Y-%m-%d' ) >= #{startReportDate}
833
+                and date_format( t.report_date, '%Y-%m-%d' ) >= #{startReportDate}
831 834
             </if>
832 835
             <if test="endReportDate != null and endReportDate !=''">
833
-                and date_format( report_date, '%Y-%m-%d' ) &lt;= #{endReportDate}
836
+                and date_format( t.report_date, '%Y-%m-%d' ) &lt;= #{endReportDate}
834 837
             </if>
835 838
             <if test="startArrivalDate != null and startArrivalDate !=''">
836
-                and date_format( arrival_date, '%Y-%m-%d' ) >= #{startArrivalDate}
839
+                and date_format( t.arrival_date, '%Y-%m-%d' ) >= #{startArrivalDate}
837 840
             </if>
838 841
             <if test="endArrivalDate != null and endArrivalDate !=''">
839
-                and date_format( arrival_date, '%Y-%m-%d' ) &lt;= #{endArrivalDate}
842
+                and date_format( t.arrival_date, '%Y-%m-%d' ) &lt;= #{endArrivalDate}
840 843
             </if>
841 844
         </if>
842 845
         <if test="type == 'clinch'">
843
-            AND STATUS = 4
846
+            AND t.STATUS = 4
844 847
         </if>
845 848
     </select>
846 849