Guo1B0 1 yıl önce
ebeveyn
işleme
7024f78cf3

+ 2 - 2
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/ClueController.java

@@ -70,10 +70,10 @@ public class ClueController {
         //TODO token待定
         // User user = userMapper.selectById(request.getHeader(  "Token"));
         // clue.setCompanyId(user.getCompanyId());
-        List<Clue> list =  clueService.getList(clue);
+        List<Clue> list =  clueService.getDeleterList(clue);
         HashMap<Object, Object> map = new HashMap<>();
         map.put("data",list);
-        map.put("total",clueService.getTotal(clue));
+        map.put("total",clueService.getDeleterTotal(clue));
         return map;
     }
     @RequestMapping("/insertAndUpdate")

+ 2 - 0
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/mapper/ClueMapper.java

@@ -16,6 +16,8 @@ import java.util.List;
 public interface ClueMapper extends BaseMapper<Clue> {
 
     List<Clue> list(Clue clue);
+    List<Clue> Deleterlist(Clue clue);
 
     Integer getTotal(Clue clue);
+    Integer getDeleterTotal(Clue clue);
 }

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

@@ -22,8 +22,10 @@ public interface ClueService extends IService<Clue> {
     void isDelete(List<Integer> ids);
 
     List<Clue> getList(Clue clue);
+    List<Clue> getDeleterList(Clue clue);
 
     Integer getTotal(Clue clue);
+    Integer getDeleterTotal(Clue clue);
 
     Clue getInfo(Clue clue);
 }

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

@@ -98,10 +98,19 @@ public class ClueServiceImpl extends ServiceImpl<ClueMapper, Clue> implements Cl
         return clueMapper.list(clue);
     }
 
+    @Override
+    public List<Clue> getDeleterList(Clue clue) {
+        return clueMapper.Deleterlist(clue);
+    }
+
     @Override
     public Integer getTotal(Clue clue) {
         return clueMapper.getTotal(clue);
     }
+    @Override
+    public Integer getDeleterTotal(Clue clue) {
+        return clueMapper.getDeleterTotal(clue);
+    }
 
     @Override
     public Clue getInfo(Clue clue) {

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

@@ -68,11 +68,67 @@
         </if>
         limit #{pageIndex},#{pageFrom}
     </select>
+    <select id="Deleterlist" resultType="com.management.platform.entity.Clue">
+        select c.id,
+               c.company_id,
+               (select company_name from company where company_id = c.id) companyName,
+               c.clue_name,
+               c.clue_source_id,
+               c.phone,
+               c.email,
+               c.customer_industry_id,
+               c.customer_level_id,
+               c.address,
+               c.incharger_id,
+               c.remark,
+               c.is_delete,
+               c.plate1,
+               c.plate2,
+               c.plate3,
+               c.plate4,
+               c.plate5,
+               c.create_time,
+               c.create_id
+        from Clue c
+        where
+            c.company_id = #{companyId} and is_delete = 1
+        <if test="startTime != null and endTime != null ">
+        and  c.create_time BETWEEN  #{startTime} and #{endTime}
+        </if>
+        <if test="clueName != null and clueName != '' ">
+        and  c.clue_name =  #{clueName}
+        </if>
+        <if test="clueSourceId != null">
+        and  c.clue_source_id =  #{clueSourceId}
+        </if>
+        <if test="customerIndustryId != null">
+        and  c.customer_industry_id =  #{customerIndustryId}
+        </if>
+        limit #{pageIndex},#{pageFrom}
+    </select>
     <select id="getTotal" resultType="java.lang.Integer">
         select count(*)
         from Clue c
         where
-        c.company_id = #{companyId}
+        c.company_id = #{companyId} and is_delete = 0
+        <if test="startTime != null and endTime != null ">
+            and  c.create_time BETWEEN  #{startTime} and #{endTime}
+        </if>
+        <if test="clueName != null and clueName != '' ">
+            and  c.clue_name =  #{clueName}
+        </if>
+        <if test="clueSourceId != null">
+            and  c.clue_source_id =  #{clueSourceId}
+        </if>
+        <if test="customerIndustryId != null">
+            and  c.customer_industry_id =  #{customerIndustryId}
+        </if>
+    </select>
+    <select id="getDeleterTotal" resultType="java.lang.Integer">
+        select count(*)
+        from Clue c
+        where
+        c.company_id = #{companyId} and is_delete = 1
         <if test="startTime != null and endTime != null ">
             and  c.create_time BETWEEN  #{startTime} and #{endTime}
         </if>