Browse Source

各接口操作数据同步到客户统计表

anderx 3 years ago
parent
commit
bc95c3a459

+ 7 - 6
src/main/java/com/goafanti/common/mapper/UserMidMapper.xml

@@ -442,13 +442,14 @@
 
   <select id="selectSignSummaryList" resultType="com.goafanti.order.bo.OutSignSummary">
     select a.id ,a.nickname ,b.sign_number signNumber,b.sign_amount signAmount,
-           date_format(b.first_signing_time ,'%Y-%m-%d') firstSigningTime,
-           date_format(b.last_signing_time  ,'%Y-%m-%d') lastSigningTime ,
-           b.last_sales_type  lastSalesType,c.name,b.follow_dep followDep,
-           b.last_follow_type lastFollowType,b.follow_explain followExplain ,b.follow_number followNumber ,
-           date_format(b.last_follow_time ,'%Y-%m-%d %H:%i:%S') lastFollowTime ,b.task_names taskNames ,
-           b.`member` ,b.chargeback ,b.big_customer bigCustomer,b.follow_aname followAname
+    date_format(b.first_signing_time ,'%Y-%m-%d') firstSigningTime,
+    date_format(b.last_signing_time  ,'%Y-%m-%d') lastSigningTime ,
+    b.last_sales_type  lastSalesType,c.name,d.name depName,
+    b.last_follow_type lastFollowType,b.follow_explain followExplain ,b.follow_number followNumber ,
+    date_format(b.last_follow_time ,'%Y-%m-%d %H:%i:%S') lastFollowTime ,b.task_names taskNames ,
+    b.`member` ,b.chargeback ,b.big_customer bigCustomer,b.follow_aname followAname
     from user a left join user_mid b on a.id=b.uid  left join admin c on a.aid=c.id
+    left join department d on c.department_id =d.id
     where 1=1
       <if test="userName != null">
         and a.nickname like concat('%',#{userName},'%')

+ 6 - 6
src/main/java/com/goafanti/order/bo/OutSignSummary.java

@@ -19,10 +19,10 @@ public class OutSignSummary {
     private Integer lastSalesType;
     @Excel(name = "客户所属人")
     private String name;
+    @Excel(name = "客户归属人部门")
+    private String depName;
     @Excel(name = "跟进人")
     private String followAname;
-    @Excel(name = "跟进部门")
-    private String followDep;
     @Excel(name = "跟进类型")
     private Integer lastFollowType;
     @Excel(name = "跟进说明")
@@ -112,12 +112,12 @@ public class OutSignSummary {
         this.name = name;
     }
 
-    public String getFollowDep() {
-        return followDep;
+    public String getDepName() {
+        return depName;
     }
 
-    public void setFollowDep(String followDep) {
-        this.followDep = followDep;
+    public void setDepName(String depName) {
+        this.depName = depName;
     }
 
     public Integer getLastFollowType() {