anderx 4 lat temu
rodzic
commit
7b565565d7

+ 16 - 7
src/main/java/com/goafanti/common/dao/UserChannelMapper.java

@@ -12,42 +12,42 @@ import com.goafanti.user.bo.OutUserChannel;
 public interface UserChannelMapper {
     /**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	int deleteByPrimaryKey(Integer id);
 
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	int insert(UserChannel record);
 
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	int insertSelective(UserChannel record);
 
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	UserChannel selectByPrimaryKey(Integer id);
 
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	int updateByPrimaryKeySelective(UserChannel record);
 
 
 	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	int updateByPrimaryKey(UserChannel record);
 
@@ -55,9 +55,18 @@ public interface UserChannelMapper {
 	void insertBatch(List<InputUserChannel> list);
 
 
-	void updateByuids(@Param("list")List<String> list, @Param("status")Integer status, @Param("date")Date date);
+	/**
+	 * 
+	 * @param list
+	 * @param type type==2 status=5 recovery=1,type !=2 status=1
+	 * @param date
+	 */
+	void updateByuids(@Param("list")List<String> list, @Param("type")Integer type, @Param("date")Date date);
 
 	int deleteByIds(List<String> list);
 
 
+	List<String> checkRecovery(List<String> list);
+
+
 }

+ 37 - 13
src/main/java/com/goafanti/common/mapper/UserChannelMapper.xml

@@ -5,7 +5,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     <id column="id" jdbcType="INTEGER" property="id" />
     <result column="uid" jdbcType="VARCHAR" property="uid" />
@@ -14,20 +14,21 @@
     <result column="distribution_time" jdbcType="TIMESTAMP" property="distributionTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="recovery" jdbcType="INTEGER" property="recovery" />
   </resultMap>
   <sql id="Base_Column_List">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
-    id, `uid`, aid, `status`, distribution_time, create_time, remarks
+    id, `uid`, aid, `status`, distribution_time, create_time, remarks, `recovery`
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     select 
     <include refid="Base_Column_List" />
@@ -38,7 +39,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     delete from user_channel
     where id = #{id,jdbcType=INTEGER}
@@ -47,20 +48,20 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     insert into user_channel (id, `uid`, aid, 
       `status`, distribution_time, create_time, 
-      remarks)
+      remarks, `recovery`)
     values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, 
       #{status,jdbcType=INTEGER}, #{distributionTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{remarks,jdbcType=VARCHAR})
+      #{remarks,jdbcType=VARCHAR}, #{recovery,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.goafanti.common.model.UserChannel">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     insert into user_channel
     <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -85,6 +86,9 @@
       <if test="remarks != null">
         remarks,
       </if>
+      <if test="recovery != null">
+        `recovery`,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -108,13 +112,16 @@
       <if test="remarks != null">
         #{remarks,jdbcType=VARCHAR},
       </if>
+      <if test="recovery != null">
+        #{recovery,jdbcType=INTEGER},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.UserChannel">
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     update user_channel
     <set>
@@ -136,6 +143,9 @@
       <if test="remarks != null">
         remarks = #{remarks,jdbcType=VARCHAR},
       </if>
+      <if test="recovery != null">
+        `recovery` = #{recovery,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -143,7 +153,7 @@
     <!--
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
-      This element was generated on Sun Apr 25 09:04:26 CST 2021.
+      This element was generated on Mon Apr 26 08:48:10 CST 2021.
     -->
     update user_channel
     set `uid` = #{uid,jdbcType=VARCHAR},
@@ -151,7 +161,8 @@
       `status` = #{status,jdbcType=INTEGER},
       distribution_time = #{distributionTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      remarks = #{remarks,jdbcType=VARCHAR}
+      remarks = #{remarks,jdbcType=VARCHAR},
+      `recovery` = #{recovery,jdbcType=INTEGER}
     where id = #{id,jdbcType=INTEGER}
   </update>
   
@@ -197,7 +208,13 @@
     </if>
     </select>
     <update id="updateByuids">
-     update user_channel set status = #{status}
+     update user_channel set
+     <if test="type != 2">
+     status = 1
+     </if>
+     <if test="type == 2">
+     status = 5 , recovery=1
+     </if>  
      <if test="date !=null">
      ,distribution_time= #{date}
      </if>
@@ -214,4 +231,11 @@
     </foreach>
     )
     </delete>
+    <select id="checkRecovery" resultType="java.lang.String">
+    select recovery from user_channel where uid in (
+      <foreach collection="list" index="index" item="item" separator=",">
+      #{item}
+    </foreach>
+    )
+    </select>
 </mapper>

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -2085,7 +2085,7 @@ inner join(
   <select id="selectChannelCustomerList" resultType="com.goafanti.user.bo.OutUserChannel">
    select a.id,a.uid,b.nickname userName,a.aid,a.status,date_format(a.distribution_time,'%Y-%m-%d %H:%i:%S')distributionTimes,
  	date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimes ,c.contacts ,c.contact_mobile contactMobile,e.name channelName,
- 	b.society_tag societyTag ,d1.name province,d2.name city,f.name adminName ,b.guidance from user_channel a
+ 	b.society_tag societyTag ,d1.name province,d2.name city,f.name adminName ,b.guidance,a.recovery from user_channel a
     left join user b on a.uid=b.id  left join organization_identity c on a.uid =c.uid 
     left join district_glossory d1 on c.location_province =d1.id 
     left join district_glossory d2 on c.location_city =d2.id

+ 47 - 23
src/main/java/com/goafanti/common/model/UserChannel.java

@@ -7,49 +7,54 @@ public class UserChannel implements Serializable {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.id
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private Integer id;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.uid
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private String uid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.aid
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private String aid;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.status
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private Integer status;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.distribution_time
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private Date distributionTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.create_time
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private Date createTime;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.remarks
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private String remarks;
 	/**
+	 * This field was generated by MyBatis Generator. This field corresponds to the database column user_channel.recovery
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
+	 */
+	private Integer recovery;
+	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	private static final long serialVersionUID = 1L;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.id
 	 * @return  the value of user_channel.id
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public Integer getId() {
 		return id;
@@ -58,7 +63,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.id
 	 * @param id  the value for user_channel.id
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setId(Integer id) {
 		this.id = id;
@@ -67,7 +72,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.uid
 	 * @return  the value of user_channel.uid
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public String getUid() {
 		return uid;
@@ -76,7 +81,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.uid
 	 * @param uid  the value for user_channel.uid
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setUid(String uid) {
 		this.uid = uid == null ? null : uid.trim();
@@ -85,7 +90,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.aid
 	 * @return  the value of user_channel.aid
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public String getAid() {
 		return aid;
@@ -94,7 +99,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.aid
 	 * @param aid  the value for user_channel.aid
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setAid(String aid) {
 		this.aid = aid == null ? null : aid.trim();
@@ -103,7 +108,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.status
 	 * @return  the value of user_channel.status
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public Integer getStatus() {
 		return status;
@@ -112,7 +117,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.status
 	 * @param status  the value for user_channel.status
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setStatus(Integer status) {
 		this.status = status;
@@ -121,7 +126,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.distribution_time
 	 * @return  the value of user_channel.distribution_time
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public Date getDistributionTime() {
 		return distributionTime;
@@ -130,7 +135,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.distribution_time
 	 * @param distributionTime  the value for user_channel.distribution_time
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setDistributionTime(Date distributionTime) {
 		this.distributionTime = distributionTime;
@@ -139,7 +144,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.create_time
 	 * @return  the value of user_channel.create_time
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public Date getCreateTime() {
 		return createTime;
@@ -148,7 +153,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.create_time
 	 * @param createTime  the value for user_channel.create_time
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setCreateTime(Date createTime) {
 		this.createTime = createTime;
@@ -157,7 +162,7 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.remarks
 	 * @return  the value of user_channel.remarks
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public String getRemarks() {
 		return remarks;
@@ -166,15 +171,33 @@ public class UserChannel implements Serializable {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.remarks
 	 * @param remarks  the value for user_channel.remarks
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	public void setRemarks(String remarks) {
 		this.remarks = remarks == null ? null : remarks.trim();
 	}
 
 	/**
+	 * This method was generated by MyBatis Generator. This method returns the value of the database column user_channel.recovery
+	 * @return  the value of user_channel.recovery
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
+	 */
+	public Integer getRecovery() {
+		return recovery;
+	}
+
+	/**
+	 * This method was generated by MyBatis Generator. This method sets the value of the database column user_channel.recovery
+	 * @param recovery  the value for user_channel.recovery
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
+	 */
+	public void setRecovery(Integer recovery) {
+		this.recovery = recovery;
+	}
+
+	/**
 	 * This method was generated by MyBatis Generator. This method corresponds to the database table user_channel
-	 * @mbg.generated  Sun Apr 25 09:04:26 CST 2021
+	 * @mbg.generated  Mon Apr 26 08:48:10 CST 2021
 	 */
 	@Override
 	public String toString() {
@@ -189,6 +212,7 @@ public class UserChannel implements Serializable {
 		sb.append(", distributionTime=").append(distributionTime);
 		sb.append(", createTime=").append(createTime);
 		sb.append(", remarks=").append(remarks);
+		sb.append(", recovery=").append(recovery);
 		sb.append(", serialVersionUID=").append(serialVersionUID);
 		sb.append("]");
 		return sb.toString();

+ 5 - 0
src/main/java/com/goafanti/customer/controller/AdminCustomerApiController.java

@@ -1288,6 +1288,11 @@ public class AdminCustomerApiController extends BaseApiController{
 			res.getError().add(buildError("","已跟进,禁止转交!"));
 			return res;
 		}
+		if (type==2&&customerService.checkRecovery(uids)) {
+			res.getError().add(buildError("","不允许二次回退"));
+			return res;
+		}
+		
 		res.setData(customerService.pushChannelDeliver( uids , receiveId,remarks,type));
 		return res;
 	}

+ 1 - 0
src/main/java/com/goafanti/customer/service/CustomerService.java

@@ -553,4 +553,5 @@ public interface CustomerService {
 	Object getChannelCustomerByName(String name);
 	boolean checkChannel(List<String> uids);
 	boolean checkBeforeChannel(String uid);
+	boolean checkRecovery(List<String> uids);
 }

+ 14 - 4
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1516,7 +1516,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 				s1=clo.getTransferTime();
 			}
 			//另外一个时间取转换时间
-			s2 = clo.getTransferTime();
+				s2 = clo.getTransferTime();
 				l1 = DateUtils.parseDate(s1, AFTConstants.YYYYMMDDHHMMSS).getTime();
 				l2 = DateUtils.parseDate(s2, AFTConstants.YYYYMMDDHHMMSS).getTime();
 				if(i==0) {
@@ -1956,9 +1956,8 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			}
 			userTransferLogMapper.insertList(l);
 		}
-		userChannelMapper.updateByuids(uids,1,date);
-		if(type==2)userChannelMapper.updateByuids(uids,5,null);
-		else organizationContactBookMapper.updateByUids(uids, receiveId); 
+		userChannelMapper.updateByuids(uids,type,date);
+		organizationContactBookMapper.updateByUids(uids, receiveId); 
 		return 1;
 	}
 
@@ -1982,5 +1981,16 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		return false;
 	}
 
+	@Override
+	public boolean checkRecovery(List<String> uids) {
+		List<String> list =userChannelMapper.checkRecovery(uids);
+		for (String string : list) {
+			if (string.equals("1")) {
+				return true;
+			}
+		}
+		return false;
+	}
+
 
 }

+ 9 - 1
src/main/java/com/goafanti/user/bo/OutUserChannel.java

@@ -90,7 +90,7 @@ public class OutUserChannel  {
 	@Excel(name = "备注")
 	private String remarks;
 	private Integer guidance;
-
+	private Integer recovery;
     public String getRemarks() {
 		return remarks;
 	}
@@ -325,4 +325,12 @@ public class OutUserChannel  {
 		this.guidance = guidance;
 	}
 
+	public Integer getRecovery() {
+		return recovery;
+	}
+
+	public void setRecovery(Integer recovery) {
+		this.recovery = recovery;
+	}
+
 }

+ 4 - 4
src/main/resources/props/config_local.properties

@@ -64,12 +64,12 @@ user_remind_days=15
 portal.host=//sf.jishutao.com/portal/2.0.6
 avatar.upload.host=//sb.jishutao.com/upload
 #连接开发
-#static.host=//sb.jishutao.com:3000/1.1.58
-#avatar.host=//sb.jishutao.com
+static.host=//172.16.0.253/1.1.70
+avatar.host=//172.16.0.253
 
 #连测试
-avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.1.69
+#avatar.host=//static.jishutao.com
+#static.host=//static.jishutao.com/1.1.70
 
 upload.path=F:/data/public/upload
 upload.private.path=F:/data/private/upload