Browse Source

客户修改

Guo1B0 10 months ago
parent
commit
e3ae9dd658

+ 6 - 5
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/CustomMapper.xml

@@ -155,11 +155,12 @@
         (select `name` from `user` where id = creator_id) creatorName
         from custom c
         left join sys_dict sd on c.customer_level_id = sd.id
-        where c.company_id = #{companyId}
-        and c.is_delete =#{isDelete}
-        and c.incharger_id in
+        where
+        (c.incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERE id = #{userId}))
-        or c.incharger_id is null
+        or c.incharger_id is null)
+        and c.company_id = #{companyId}
+        and c.is_delete =#{isDelete}
         <if test="inchargerId != null and inchargerId != ''  ">
             and c.incharger_id =#{inchargerId}
         </if>
@@ -287,7 +288,7 @@
         from custom
         where company_id = #{companyId}
         and is_delete = #{isDelete}
-        and incharger_id = #{inchargerId}
+        and incharger_id = #{userId}
         or incharger_id is null
         <if test="inchargerId != null and inchargerId != ''  ">
             and incharger_id =#{inchargerId}