Browse Source

客户超时维护丢失定时任务修改,取消私有其他渠道的丢失

anderx 3 years ago
parent
commit
b7ed6fc6ea

+ 3 - 4
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -379,14 +379,13 @@
   <select id="selectWaitReleaseCustomer" resultType="com.goafanti.customer.bo.LockingReleaseBo">
 	select
 		t0.id, t0.uid, t0.aid, t0.lock_time lockTime,u.new_channel newChannel,
-		t1.last_follow_time lastFollowTime,u.nickname userName
+		t1.last_follow_time lastFollowTime,u.nickname userName ,um.channel_type channelType
 	from
 		(select id,uid,aid,lock_time from user_lock_release where aid = #{aid} and type = 0 and status = 0)t0
 	left join
 		(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
-	on t0.uid = t1.uid
-	left join user u on t0.uid=u.id
-	where u.channel=0 and u.new_channel
+	on t0.uid = t1.uid left join user u on t0.uid=u.id  left join user_mid um on t0.uid=um.uid
+	where u.channel=0
 	 and datediff(now(),if(t0.lock_time &lt; t1.last_follow_time,t1.last_follow_time,t0.lock_time))>30
   </select>
 

+ 3 - 3
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -30,8 +30,8 @@ import com.goafanti.user.service.UserService;
 import org.springframework.web.bind.annotation.RestController;
 
 
-@Component
-//@RestController
+//@Component
+@RestController
 public class ReleaseUserTask {
 	@Resource
 	private CustomerService customerService;
@@ -113,7 +113,7 @@ public class ReleaseUserTask {
 	/**
 	 * 将客户和业务转为待释放
 	 */
-//	@RequestMapping(value = "/open/updateUser", method = RequestMethod.GET)
+	@RequestMapping(value = "/open/updateUser", method = RequestMethod.GET)
 	public void updateUser() {
 		LoggerUtils.debug(getClass(), "==============客户释放开始============");
 		Date releaseTime = new Date();

+ 9 - 0
src/main/java/com/goafanti/customer/bo/LockingReleaseBo.java

@@ -14,6 +14,15 @@ public class LockingReleaseBo {
 	private String userName;
 	private Integer mySign;
 	private Integer newChannel;
+	private Integer channelType;
+
+	public Integer getChannelType() {
+		return channelType;
+	}
+
+	public void setChannelType(Integer channelType) {
+		this.channelType = channelType;
+	}
 
 	public Integer getNewChannel() {
 		return newChannel;

+ 8 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -1865,7 +1865,14 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 
 	@Override
 	public List<LockingReleaseBo> selectWaitReleaseCustomer(String uid) {
-		return userLockReleaseMapper.selectWaitReleaseCustomer(uid);
+		List list = new ArrayList();
+		List<LockingReleaseBo> lockingReleaseBos = userLockReleaseMapper.selectWaitReleaseCustomer(uid);
+		for (LockingReleaseBo bo : lockingReleaseBos) {
+			if (bo.getChannelType()==null||bo.getChannelType()!=1){
+				list.add(bo);
+			}
+		}
+		return list;
 	}
 
 	/**