Browse Source

客户修改

Guo1B0 10 months ago
parent
commit
6639eb593b

+ 2 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/ClueServiceImpl.java

@@ -152,6 +152,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
             log.setCode("clue");
             log.setUserId(userId);
             log.setCreatTime(new Date());
+            actionLogMapper.insert(log);
         }
         UpdateWrapper<Clue> updateWrapper = new UpdateWrapper<>();
         updateWrapper.in("id", ids);
@@ -225,6 +226,7 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
             log.setCode("clue");
             log.setUserId(userId);
             log.setCreatTime(new Date());
+            actionLogMapper.insert(log);
         }
 
         UpdateWrapper<Clue> updateWrapper = new UpdateWrapper<>();

+ 66 - 66
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/BusinessOpportunityMapper.xml

@@ -104,64 +104,64 @@
         (select `name` from `user` where id = creator_id) creatorName,
         (SELECT sum(total) from business_product WHERE business_id = id)
         from business_opportunity
-        where company_id = #{companyId}
-        and is_delete = #{isDelete}
+        where company_id = #{bo.companyId}
+        and is_delete = #{bo.isDelete}
         and (incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
         or incharger_id is null)
-        <if test="name != null and name != ''">
-            and `name` LIKE CONCAT('%', #{name}, '%')
+        <if test="bo.name != null and bo.name != ''">
+            and `name` LIKE CONCAT('%', #{bo.name}, '%')
         </if>
-        <if test="inchargerId != null ">
-            and incharger_id = #{inchargerId}
+        <if test="bo.inchargerId != null ">
+            and incharger_id = #{bo.inchargerId}
         </if>
-        <if test="startTime != null and endTime != null ">
-            and create_time BETWEEN  #{startTime} and #{endTime}
+        <if test="bo.startTime != null and bo.endTime != null ">
+            and create_time BETWEEN  #{bo.startTime} and #{bo.endTime}
         </if>
-        <if test="contactsName != null and contactsName != ''">
-            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{contactsName}, '%'))
+        <if test="bo.contactsName != null and bo.contactsName != ''">
+            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{bo.contactsName}, '%'))
         </if>
-        <if test="customerName != null and customerName != ''">
-            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{customerName}, '%'))
+        <if test="bo.customerName != null and bo.customerName != ''">
+            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{bo.customerName}, '%'))
         </if>
-        <if test="stageId != null ">
-            and stage_id = #{stageId}
+        <if test="bo.stageId != null ">
+            and stage_id = #{bo.stageId}
         </if>
-        <if test="productId != null ">
-            and id in (select business_id from business_product where product_id = #{productId})
+        <if test="bo.productId != null ">
+            and id in (select business_id from business_product where product_id = #{bo.productId})
         </if>
         ORDER BY id DESC
-        limit #{pageIndex},#{pageFrom}
+        limit #{bo.pageIndex},#{bo.pageFrom}
     </select>
     <select id="getTotal1" resultType="java.lang.Integer">
         select
         count(id)
         from business_opportunity
-        where company_id = #{companyId}
-        and is_delete = #{isDelete}
+        where company_id = #{bo.companyId}
+        and is_delete = #{bo.isDelete}
         and (incharger_id in
         (SELECT id from `user` WHERE department_id = (SELECT department_id from `user` WHERe id = #{userId}))
         or incharger_id is null)
-        <if test="name != null and name != ''">
-            and `name` LIKE CONCAT('%', #{name}, '%')
+        <if test="bo.name != null and bo.name != ''">
+            and `name` LIKE CONCAT('%', #{bo.name}, '%')
         </if>
-        <if test="inchargerId != null ">
-            and incharger_id = #{inchargerId}
+        <if test="bo.inchargerId != null ">
+            and incharger_id = #{bo.inchargerId}
         </if>
-        <if test="startTime != null and endTime != null ">
-            and create_time BETWEEN #{startTime} and #{endTime}
+        <if test="bo.startTime != null and bo.endTime != null ">
+            and create_time BETWEEN #{bo.startTime} and #{bo.endTime}
         </if>
-        <if test="contactsName != null and contactsName != ''">
-            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{contactsName}, '%'))
+        <if test="bo.contactsName != null and bo.contactsName != ''">
+            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{bo.contactsName}, '%'))
         </if>
-        <if test="customerName != null and customerName != ''">
-            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{customerName}, '%'))
+        <if test="bo.customerName != null and bo.customerName != ''">
+            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{bo.customerName}, '%'))
         </if>
-        <if test="stageId != null ">
-            and stage_id = #{stageId}
+        <if test="bo.stageId != null ">
+            and stage_id = #{bo.stageId}
         </if>
-        <if test="productId != null ">
-            and id in (select business_id from business_product where product_id = #{productId})
+        <if test="bo.productId != null ">
+            and id in (select business_id from business_product where product_id = #{bo.productId})
         </if>
     </select>
     <select id="selectAllList2" resultType="com.management.platform.entity.BusinessOpportunity">
@@ -174,60 +174,60 @@
         (select `name` from `user` where id = creator_id) creatorName,
         (SELECT sum(total) from business_product WHERE business_id = id)
         from business_opportunity
-        where company_id = #{companyId}
-        and is_delete = #{isDelete}
+        where company_id = #{bo.companyId}
+        and is_delete = #{bo.isDelete}
         and (incharger_id = #{userId} or incharger_id is null)
-        <if test="name != null and name != ''">
-            and `name` LIKE CONCAT('%', #{name}, '%')
+        <if test="bo.name != null and bo.name != ''">
+            and `name` LIKE CONCAT('%', #{bo.name}, '%')
         </if>
-        <if test="inchargerId != null ">
-            and incharger_id = #{inchargerId}
+        <if test="bo.inchargerId != null ">
+            and incharger_id = #{bo.inchargerId}
         </if>
-        <if test="startTime != null and endTime != null ">
-            and create_time BETWEEN  #{startTime} and #{endTime}
+        <if test="bo.startTime != null and bo.endTime != null ">
+            and create_time BETWEEN  #{bo.startTime} and #{bo.endTime}
         </if>
-        <if test="contactsName != null and contactsName != ''">
-            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{contactsName}, '%'))
+        <if test="bo.contactsName != null and bo.contactsName != ''">
+            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{bo.contactsName}, '%'))
         </if>
-        <if test="customerName != null and customerName != ''">
-            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{customerName}, '%'))
+        <if test="bo.customerName != null and bo.customerName != ''">
+            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{bo.customerName}, '%'))
         </if>
-        <if test="stageId != null ">
-            and stage_id = #{stageId}
+        <if test="bo.stageId != null ">
+            and stage_id = #{bo.stageId}
         </if>
-        <if test="productId != null ">
-            and id in (select business_id from business_product where product_id = #{productId})
+        <if test="bo.productId != null ">
+            and id in (select business_id from business_product where product_id =#{bo.productId})
         </if>
         ORDER BY id DESC
-        limit #{pageIndex},#{pageFrom}
+        limit #{bo.pageIndex},#{bo.pageFrom}
     </select>
     <select id="getTotal2" resultType="java.lang.Integer">
         select
         count(id)
         from business_opportunity
-        where company_id = #{companyId}
-        and is_delete = #{isDelete}
+        where company_id = #{bo.companyId}
+        and is_delete = #{bo.isDelete}
         and (incharger_id = #{userId} or incharger_id is null)
-        <if test="name != null and name != ''">
-            and `name` LIKE CONCAT('%', #{name}, '%')
+        <if test="bo.name != null and bo.name != ''">
+            and `name` LIKE CONCAT('%', #{bo.name}, '%')
         </if>
-        <if test="inchargerId != null ">
-            and incharger_id = #{inchargerId}
+        <if test="bo.inchargerId != null ">
+            and incharger_id = #{bo.inchargerId}
         </if>
-        <if test="startTime != null and endTime != null ">
-            and create_time BETWEEN #{startTime} and #{endTime}
+        <if test="bo.startTime != null and bo.endTime != null ">
+            and create_time BETWEEN #{bo.startTime} and #{bo.endTime}
         </if>
-        <if test="contactsName != null and contactsName != ''">
-            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{contactsName}, '%'))
+        <if test="bo.contactsName != null and bo.contactsName != ''">
+            and contacts_id in (select id from contacts where `name`LIKE CONCAT('%', #{bo.contactsName}, '%'))
         </if>
-        <if test="customerName != null and customerName != ''">
-            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{customerName}, '%'))
+        <if test="bo.customerName != null and bo.customerName != ''">
+            and customer_id in (select id from custom where `name`LIKE CONCAT('%', #{bo.customerName}, '%'))
         </if>
-        <if test="stageId != null ">
-            and stage_id = #{stageId}
+        <if test="bo.stageId != null ">
+            and stage_id = #{bo.stageId}
         </if>
-        <if test="productId != null ">
-            and id in (select business_id from business_product where product_id = #{productId})
+        <if test="bo.productId != null ">
+            and id in (select business_id from business_product where product_id = #{bo.productId})
         </if>
     </select>
     <select id="selectByIdToInfo" resultType="com.management.platform.entity.BusinessOpportunity">

+ 3 - 3
fhKeeper/formulahousekeeper/management-crm/src/main/resources/mapper/ClueMapper.xml

@@ -86,7 +86,7 @@
         </if>
         ORDER BY
         <choose>
-            <when test="isDesc == null or isDesc == ''">
+            <when test="isDesc == null ">
                 c.id DESC
             </when>
             <when test="isDesc == 0">
@@ -160,7 +160,7 @@
         </if>
         ORDER BY
         <choose>
-            <when test="isDesc == null or isDesc == ''">
+            <when test="isDesc == null">
                 c.id DESC
             </when>
             <when test="isDesc == 0">
@@ -232,7 +232,7 @@
         </if>
         ORDER BY
         <choose>
-            <when test="clue.isDesc == null or clue.isDesc == ''">
+            <when test="clue.isDesc == null ">
                 c.id DESC
             </when>
             <when test="clue.isDesc == 0">