|
@@ -130,9 +130,20 @@ public class CustomerServiceBatchSendingServiceImpl extends ServiceImpl<Customer
|
|
|
Map<Long, String> subjectNameMap = subjectService.findBySubjectByIdList(subjectIds).stream()
|
|
|
.collect(Collectors.toMap(Subject::getId, Subject::getName, (o, n) -> n));
|
|
|
|
|
|
+ // 创建用户
|
|
|
+ List<Long> userIds = sendings.stream()
|
|
|
+ .map(CustomerServiceBatchSendingWrapper.CustomerServiceBatchSending::getCreateBy)
|
|
|
+ .filter(Objects::nonNull).distinct().collect(Collectors.toList());
|
|
|
+
|
|
|
+ Map<Long, String> usernameMap = sysUserMapper.selectBatchIds(userIds).stream()
|
|
|
+ .collect(Collectors.toMap(SysUser::getId, SysUser::getUsername, (o, n) -> n));
|
|
|
+
|
|
|
// 发送群体,发送声部
|
|
|
for (CustomerServiceBatchSendingWrapper.CustomerServiceBatchSending item : sendings) {
|
|
|
|
|
|
+ // 创建用户
|
|
|
+ item.setCreateUser(usernameMap.getOrDefault(item.getCreateBy(), ""));
|
|
|
+
|
|
|
List<Long> collect = Arrays.stream(Optional.ofNullable(item.getSendSubject()).orElse("").split(","))
|
|
|
.map(Long::parseLong).distinct().collect(Collectors.toList());
|
|
|
|
|
@@ -435,6 +446,7 @@ public class CustomerServiceBatchSendingServiceImpl extends ServiceImpl<Customer
|
|
|
.eq(CustomerServiceBatchSending::getId, info.getId())
|
|
|
.set(CustomerServiceBatchSending::getSendStatus, EImSendStatus.SEND)
|
|
|
.set(CustomerServiceBatchSending::getReceiveNumber, receiveNums.stream().mapToInt(Integer::intValue).sum())
|
|
|
+ //.set(CustomerServiceBatchSending::getSendTime, DateTime.now().toDate())
|
|
|
.update();
|
|
|
|
|
|
} catch (Exception e) {
|