浏览代码

fix 排除客服为空

zoujiajian 2 年之前
父节点
当前提交
64d4d2e67b
共有 1 个文件被更改,包括 24 次插入21 次删除
  1. 24 21
      netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java

+ 24 - 21
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpEventActionServiceImpl.java

@@ -745,27 +745,30 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
 		} else {
 			corpUserMapper.updateById(corpUser);
 		}
-		followedUsers.forEach(followedUser -> {
-			//备注手机号  客服跟进用户年付续费
-			String description = followedUser.getDescription();
-			if (Validator.isMobile(description)) {
-				THREAD_POOL.execute(() ->{
-					CorpUserRelate corpUserRelate = corpUserRelateMapper.selectOne(Wrappers.lambdaQuery(CorpUserRelate.class)
-							.eq(CorpUserRelate::getCorpUserId, corpUser.getId()).last("limit 1"));
-					if (corpUserRelate != null) {
-						corpUserRelate.setPhone(description);
-						corpUserRelateMapper.updateById(corpUserRelate);
-					} else {
-						corpUserRelate = new CorpUserRelate();
-						corpUserRelate.setCorpUserId(corpUser.getId());
-						corpUserRelate.setPhone(description);
-						corpUserRelateMapper.insert(corpUserRelate);
-					}
-					//客服续费跟进
-					corpRenewFollowUser(description);
-				});
-			}
-		});
+
+		if (CollUtil.isNotEmpty(followedUsers)) {
+			followedUsers.forEach(followedUser -> {
+				//备注手机号  客服跟进用户年付续费
+				String description = followedUser.getDescription();
+				if (Validator.isMobile(description)) {
+					THREAD_POOL.execute(() ->{
+						CorpUserRelate corpUserRelate = corpUserRelateMapper.selectOne(Wrappers.lambdaQuery(CorpUserRelate.class)
+								.eq(CorpUserRelate::getCorpUserId, corpUser.getId()).last("limit 1"));
+						if (corpUserRelate != null) {
+							corpUserRelate.setPhone(description);
+							corpUserRelateMapper.updateById(corpUserRelate);
+						} else {
+							corpUserRelate = new CorpUserRelate();
+							corpUserRelate.setCorpUserId(corpUser.getId());
+							corpUserRelate.setPhone(description);
+							corpUserRelateMapper.insert(corpUserRelate);
+						}
+						//客服续费跟进
+						corpRenewFollowUser(description);
+					});
+				}
+			});
+		}
 		return corpUser;
 	}