Browse Source

新增线索客户导入

anderx 1 year ago
parent
commit
321c95c53f

+ 3 - 0
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1514,6 +1514,9 @@
         from `user` a left join organization_identity b on a.id =b.uid
                       left join admin c on a.aid=c.id
         where a.clue_status =1 and a.clue_process in (0,2)
+        <if test="aid !=null">
+            and a.aid= #{aid}
+        </if>
         <if test="page_sql !=null">
             ${page_sql}
         </if>

+ 34 - 0
src/main/java/com/goafanti/customer/bo/InputUserClueList.java

@@ -2,6 +2,40 @@ package com.goafanti.customer.bo;
 
 public class InputUserClueList {
 
+    private Integer shiroType;
+    private String aid;
     private Integer pageSize;
     private Integer pageNo;
+
+    public Integer getShiroType() {
+        return shiroType;
+    }
+
+    public void setShiroType(Integer shiroType) {
+        this.shiroType = shiroType;
+    }
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public Integer getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(Integer pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public Integer getPageNo() {
+        return pageNo;
+    }
+
+    public void setPageNo(Integer pageNo) {
+        this.pageNo = pageNo;
+    }
 }

+ 5 - 0
src/main/java/com/goafanti/customer/service/impl/UserClueServiceImpl.java

@@ -51,6 +51,11 @@ public class UserClueServiceImpl extends BaseMybatisDao<UserMapper> implements U
 
     @Override
     public Object list(InputUserClueList in) {
+        if (TokenManager.hasRole(AFTConstants.SUPERADMIN)){
+            in.setShiroType(0);
+        }else {
+            in.setAid(TokenManager.getAdminId());
+        }
         Pagination<OutUserClueList> page = (Pagination<OutUserClueList>) findPage("selectUserClueList", "selectUserClueCount", in);
         return page;
     }