Browse Source

修改签单客户签单

anderx 1 year ago
parent
commit
49802fc482

+ 1 - 1
src/main/java/com/goafanti/common/dao/UserFollowMapper.java

@@ -25,5 +25,5 @@ public interface UserFollowMapper {
 	List<UserFollow> selectbyUid(@Param("uid")String uid, @Param("aid")String aid);
 
 
-    int selectByaidAndDate(@Param("aid") String aid, @Param("startTime") String startTime, @Param("endTime") String endTime);
+    Integer selectByaidAndDate(@Param("aid") String aid, @Param("startTime") String startTime, @Param("endTime") String endTime);
 }

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

@@ -68,9 +68,9 @@ public class ReleaseUserTask {
 	public void startTask() {
 		try {
 			List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
-//			pushUserDays(userList);
+			pushUserDays(userList);
 			Thread.sleep(2000);
-//			updateUser(userList);
+			updateUser(userList);
 			Thread.sleep(2000);
 			pushRestrictProject(userList);
 		} catch (InterruptedException e) {
@@ -79,6 +79,9 @@ public class ReleaseUserTask {
 
 	}
 
+	/**
+	 * 限时项目定时任务
+	 */
 	private void pushRestrictProject(List<User> userList) {
 		LoggerUtils.debug(getClass(), "==============限时项目丢失开始============");
 		List<Notice> ln = new ArrayList<>();

+ 2 - 3
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -796,6 +796,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		int followCount = userBusinessMapper.selectFollowCountByUAid(fbb.getUid(), null) + 1;
 		userFollow.setFollowCount(followCount);
 		userFollow.setType(0);
+		userFollowMapper.insert(userFollow);
 		if (type==0){
 			//处理中间表
 			UserMid um =new UserMid();
@@ -815,8 +816,6 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 		}else if (type==1){
 			addRestrictProject(fbb,followTime,followId);
 		}
-		userFollowMapper.insert(userFollow);
-
 		return 1;
 	}
 
@@ -1001,7 +1000,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			String startTime= DateUtils.formatDate(transferTime,AFTConstants.YYYYMMDD);
 			String endTime=startTime+" 23:59:59";
 			AdminUserCount adminUserCount = getAdminUserCount(aid,startTime);
-			int count = userFollowMapper.selectByaidAndDate(aid, startTime, endTime);
+			Integer count = userFollowMapper.selectByaidAndDate(aid, startTime, endTime);
 			if (adminUserCount==null){
 				AdminUserCount selectAUC=userMapper.selectByaidAndDate(aid,startTime,endTime);
 				if (selectAUC==null)selectAUC=new AdminUserCount();