Guo1B0 před 10 měsíci
rodič
revize
1adadd8efe

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 30882 - 11721
fhKeeper/formulahousekeeper/management-crm/crm.log


+ 3 - 4
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/controller/CustomController.java

@@ -246,11 +246,10 @@ public class CustomController {
 
     @RequestMapping("getAll")
     public Object getAll(HttpServletRequest request) {
-        User user = userMapper.selectById(request.getHeader("Token"));
+        HttpRespMsg list = list(new Custom(), request);
+        Map<String, Object> data = (Map<String, Object>) list.getData();
         HttpRespMsg msg = new HttpRespMsg();
-        msg.setMsg("操作成功");
-        msg.setData(
-                customMapper.selectList(new QueryWrapper<Custom>().eq("company_id", user.getCompanyId()))
+        msg.setData(data.get("data")
         );
         return msg;
     }

+ 3 - 1
fhKeeper/formulahousekeeper/management-crm/src/main/java/com/management/platform/service/impl/CustomServiceImpl.java

@@ -347,7 +347,9 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
         custom.setIsDelete(0);
         custom.setUserId(user.getId());
         custom.setEndTime(custom.getEndTime() + " 23:59:59");
-        custom.setPageIndex((custom.getPageIndex() - 1) * custom.getPageFrom());
+        if (custom.getPageIndex()!=null){
+            custom.setPageIndex((custom.getPageIndex() - 1) * custom.getPageFrom());
+        }
         boolean isAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看全部客户");
         boolean isNotAll = sysFunctionService.hasPriviledge(user.getRoleId(), "查看负责部门客户");
         List<Custom> list = new ArrayList<>();

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

@@ -82,7 +82,7 @@
             and c.email LIKE CONCAT('%', #{email}, '%')
         </if>
         <if test="companyPhone != null and companyPhone != '' ">
-            and c.company_phone = #{companyPhone}
+            and c.company_phone LIKE CONCAT('%', #{companyPhone}, '%')
         </if>
         <if test="customerLevelId != null ">
             and c.customer_level_id = #{customerLevelId}
@@ -130,7 +130,7 @@
             and email = #{email}
         </if>
         <if test="companyPhone != null ">
-            and company_phone = #{companyPhone}
+            and company_phone LIKE CONCAT('%', #{companyPhone}, '%')
         </if>
         <if test="customerLevelId != null ">
             and customer_level_id = #{customerLevelId}
@@ -184,7 +184,7 @@
             and c.email LIKE CONCAT('%', #{email}, '%')
         </if>
         <if test="companyPhone != null ">
-            and c.company_phone = #{companyPhone}
+            and c.company_phone LIKE CONCAT('%', #{companyPhone}, '%')
         </if>
         <if test="customerLevelId != null ">
             and c.customer_level_id = #{customerLevelId}
@@ -235,7 +235,7 @@
             and email = #{email}
         </if>
         <if test="companyPhone != null ">
-            and company_phone = #{companyPhone}
+            and company_phone LIKE CONCAT('%', #{companyPhone}, '%')
         </if>
         <if test="customerLevelId != null ">
             and customer_level_id = #{customerLevelId}
@@ -287,7 +287,7 @@
             and email LIKE CONCAT('%', #{email}, '%')
         </if>
         <if test="companyPhone != null ">
-            and company_phone = #{companyPhone}
+            and company_phone LIKE CONCAT('%', #{companyPhone}, '%')
         </if>
         <if test="customerLevelId != null ">
             and customer_level_id = #{customerLevelId}
@@ -323,7 +323,7 @@
             and email = #{email}
         </if>
         <if test="companyPhone != null ">
-            and company_phone = #{companyPhone}
+            and company_phone LIKE CONCAT('%', #{companyPhone}, '%')
         </if>
         <if test="customerLevelId != null ">
             and customer_level_id = #{customerLevelId}