Ver código fonte

fix 群发发送用户状态更新

zoujiajian 3 anos atrás
pai
commit
901f4dc3c5

+ 5 - 1
netflix-service/src/main/java/com/cyksj/service/corp/impl/CorpMsgBulkTaskServiceImpl.java

@@ -295,7 +295,10 @@ public class CorpMsgBulkTaskServiceImpl extends ServiceImpl<CorpMsgBulkTaskMappe
 			List<List<String>> split = CollectionUtil.split(corpUserIdList, LIMIT / 4);
 			for (List<String> strings : split) {
 				List<CorpUserSendRecord> corpUserSendRecords = corpMsgBulkTaskMapper.getsSuccessCorpUser(strings);
-				corpUserSendRecords.forEach(corpUserSendRecord -> corpUserSendRecord.setCorpMsgRecordId(corpMsgBulkTaskRecord.getId()));
+				corpUserSendRecords.forEach(corpUserSendRecord -> {
+					corpUserSendRecord.setCorpMsgRecordId(corpMsgBulkTaskRecord.getId());
+					corpUserSendRecord.setStatus(true);
+				});
 				corpUserSendRecordService.saveBatch(corpUserSendRecords);
 			}
 		}
@@ -306,6 +309,7 @@ public class CorpMsgBulkTaskServiceImpl extends ServiceImpl<CorpMsgBulkTaskMappe
 				corpUserSendRecords.forEach(corpUserSendRecord -> {
 					corpUserSendRecord.setCorpMsgRecordId(corpMsgBulkTaskRecord.getId());
 					corpMsgBulkTaskRecord.setTaskId(corpMsgBulkTaskRecord.getTaskId());
+					corpUserSendRecord.setStatus(false);
 					corpUserSendRecordService.saveBatch(corpUserSendRecords);
 				});
 			}