Browse Source

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

anderx 3 years ago
parent
commit
7b4accc577

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

@@ -26,12 +26,13 @@
     <result column="follow_dep" jdbcType="VARCHAR" property="followDep" />
     <result column="follow_explain" jdbcType="VARCHAR" property="followExplain" />
     <result column="follow_aname" jdbcType="VARCHAR" property="followAname" />
+    <result column="follow_aid" jdbcType="VARCHAR" property="followAid" />
   </resultMap>
   <sql id="Base_Column_List">
     id, `uid`, aid, last_follow_time, last_sign_time, create_time, big_customer, update_aid,
     update_name, date_update_time, channel_type, chargeback, `member`, last_sales_type,
     last_follow_type, follow_number, task_names, sign_number, sign_amount, last_signing_time,
-    first_signing_time, follow_dep, follow_explain, follow_aname
+    first_signing_time, follow_dep, follow_explain, follow_aname, follow_aid
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     select
@@ -51,8 +52,8 @@
       `member`, last_sales_type, last_follow_type,
       follow_number, task_names, sign_number,
       sign_amount, last_signing_time, first_signing_time,
-      follow_dep, follow_explain, follow_aname
-      )
+      follow_dep, follow_explain, follow_aname,
+      follow_aid)
     values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
       #{lastFollowTime,jdbcType=TIMESTAMP}, #{lastSignTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
       #{bigCustomer,jdbcType=INTEGER}, #{updateAid,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR},
@@ -60,8 +61,8 @@
       #{member,jdbcType=INTEGER}, #{lastSalesType,jdbcType=INTEGER}, #{lastFollowType,jdbcType=INTEGER},
       #{followNumber,jdbcType=INTEGER}, #{taskNames,jdbcType=VARCHAR}, #{signNumber,jdbcType=INTEGER},
       #{signAmount,jdbcType=DECIMAL}, #{lastSigningTime,jdbcType=DATE}, #{firstSigningTime,jdbcType=DATE},
-      #{followDep,jdbcType=VARCHAR}, #{followExplain,jdbcType=VARCHAR}, #{followAname,jdbcType=VARCHAR}
-      )
+      #{followDep,jdbcType=VARCHAR}, #{followExplain,jdbcType=VARCHAR}, #{followAname,jdbcType=VARCHAR},
+      #{followAid,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserMid">
     insert into user_mid
@@ -138,6 +139,9 @@
       <if test="followAname != null">
         follow_aname,
       </if>
+      <if test="followAid != null">
+        follow_aid,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -212,6 +216,9 @@
       <if test="followAname != null">
         #{followAname,jdbcType=VARCHAR},
       </if>
+      <if test="followAid != null">
+        #{followAid,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserMid">
@@ -286,6 +293,9 @@
       <if test="followAname != null">
         follow_aname = #{followAname,jdbcType=VARCHAR},
       </if>
+      <if test="followAid != null">
+        follow_aid = #{followAid,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -313,7 +323,8 @@
       first_signing_time = #{firstSigningTime,jdbcType=DATE},
       follow_dep = #{followDep,jdbcType=VARCHAR},
       follow_explain = #{followExplain,jdbcType=VARCHAR},
-      follow_aname = #{followAname,jdbcType=VARCHAR}
+      follow_aname = #{followAname,jdbcType=VARCHAR},
+      follow_aid = #{followAid,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 
@@ -386,6 +397,9 @@
       <if test="followAname != null">
         follow_aname = #{followAname,jdbcType=VARCHAR},
       </if>
+      <if test="followAid != null">
+        follow_aid = #{followAid,jdbcType=VARCHAR},
+      </if>
     </set>
     where `uid` = #{uid,jdbcType=VARCHAR}
   </update>

+ 13 - 0
src/main/java/com/goafanti/common/model/UserMid.java

@@ -129,6 +129,11 @@ public class UserMid implements Serializable {
      */
     private String followAname;
 
+    /**
+     * 跟进人编号
+     */
+    private String followAid;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -322,4 +327,12 @@ public class UserMid implements Serializable {
     public void setFollowAname(String followAname) {
         this.followAname = followAname;
     }
+
+    public String getFollowAid() {
+        return followAid;
+    }
+
+    public void setFollowAid(String followAid) {
+        this.followAid = followAid;
+    }
 }

+ 15 - 14
src/main/java/com/goafanti/order/bo/InputSignSummary.java

@@ -3,8 +3,8 @@ package com.goafanti.order.bo;
 public class InputSignSummary {
 
     private String userName;
-    private String adminName;
-    private String followAname;
+    private String aid;
+    private String followAid;
     private Integer member;
     private Integer chargeback;
     private Integer bigCustomer;
@@ -22,12 +22,21 @@ public class InputSignSummary {
     private Integer pageNo;
     private Integer pageSize;
 
-    public String getFollowAname() {
-        return followAname;
+
+    public String getAid() {
+        return aid;
+    }
+
+    public void setAid(String aid) {
+        this.aid = aid;
+    }
+
+    public String getFollowAid() {
+        return followAid;
     }
 
-    public void setFollowAname(String followAname) {
-        this.followAname = followAname;
+    public void setFollowAid(String followAid) {
+        this.followAid = followAid;
     }
 
     public Integer getPageNo() {
@@ -54,14 +63,6 @@ public class InputSignSummary {
         this.userName = userName;
     }
 
-    public String getAdminName() {
-        return adminName;
-    }
-
-    public void setAdminName(String adminName) {
-        this.adminName = adminName;
-    }
-
     public Integer getMember() {
         return member;
     }

+ 2 - 2
src/main/java/com/goafanti/order/service/impl/UserStatisticsServiceImpl.java

@@ -29,8 +29,8 @@ public class UserStatisticsServiceImpl extends BaseMybatisDao<UserMidMapper> imp
 
 	private void addSignSummaryParam(InputSignSummary in, Map<String, Object> map) {
 		if (in.getUserName()!=null) map.put("userName", in.getUserName());
-		if (in.getAdminName()!=null) map.put("adminName", in.getAdminName());
-		if (in.getFollowAname()!=null) map.put("followAname", in.getFollowAname());
+		if (in.getAid()!=null) map.put("aid", in.getAid());
+		if (in.getFollowAid()!=null) map.put("followAid", in.getFollowAid());
 		if (in.getMember()!=null) map.put("member", in.getMember());
 		if (in.getChargeback()!=null) map.put("chargeback", in.getChargeback());
 		if (in.getBigCustomer()!=null) map.put("bigCustomer", in.getBigCustomer());