瀏覽代碼

bug 修复

傅行帆 3 年之前
父節點
當前提交
ed1570f352

+ 1
- 1
src/main/java/com/yunzhi/marketing/xlk/service/impl/InstitutionServiceImpl.java 查看文件

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

+ 17
- 14
src/main/resources/mapper/TaRecommendCustomerMapper.xml 查看文件

808
 
808
 
809
     <select id="getMyCustFollowOrClinch" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">
809
     <select id="getMyCustFollowOrClinch" resultType="com.yunzhi.marketing.entity.TaRecommendCustomer">
810
         SELECT
810
         SELECT
811
-        *
811
+        IFNULL( p.nickname, t.NAME ) AS NAME,
812
+        IFNULL( p.avatarurl, t.picture ) AS picture,
813
+        t.*
812
         FROM
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
         WHERE
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
         <if test="type == 'follow'">
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
             <if test="name != null and name !=''">
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
             </if>
825
             </if>
823
             <if test="phone != null and phone !=''">
826
             <if test="phone != null and phone !=''">
824
-                and phone like CONCAT('%',#{phone}, '%')
827
+                and t.phone like CONCAT('%',#{phone}, '%')
825
             </if>
828
             </if>
826
             <if test="status != null and status !=''">
829
             <if test="status != null and status !=''">
827
-                and status = #{status}
830
+                and t.status = #{status}
828
             </if>
831
             </if>
829
             <if test="startReportDate != null and startReportDate !=''">
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
             </if>
834
             </if>
832
             <if test="endReportDate != null and endReportDate !=''">
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
             </if>
837
             </if>
835
             <if test="startArrivalDate != null and startArrivalDate !=''">
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
             </if>
840
             </if>
838
             <if test="endArrivalDate != null and endArrivalDate !=''">
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
             </if>
843
             </if>
841
         </if>
844
         </if>
842
         <if test="type == 'clinch'">
845
         <if test="type == 'clinch'">
843
-            AND STATUS = 4
846
+            AND t.STATUS = 4
844
         </if>
847
         </if>
845
     </select>
848
     </select>
846
 
849