fix(项目管理): 修复消息通知自定义字段不显示以及重复接受人会收重复消息以及功能用例批量删除发送失败以及关联用例页面问题

--bug=1039613 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039613
--bug=1039606 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039606
--bug=1039578 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039578
This commit is contained in:
guoyuqi 2024-04-17 19:41:34 +08:00 committed by Craftsman
parent 9f93007c11
commit 6a6bcc381f
4 changed files with 8 additions and 6 deletions

View File

@ -154,8 +154,8 @@ public class FunctionalCaseNoticeService {
if (customField == null) {
continue;
}
optionDTO.setId(customField.getId());
optionDTO.setName(customField.getName());
optionDTO.setId(customField.getName());
optionDTO.setName(customFieldDTO.getValue());
fields.add(optionDTO);
}
}
@ -195,7 +195,7 @@ public class FunctionalCaseNoticeService {
}
public Map<String, FunctionalCase> copyBaseCaseInfo(String projectId, List<String> ids) {
FunctionalCaseExample example = new FunctionalCaseExample();
example.createCriteria().andProjectIdEqualTo(projectId).andDeletedEqualTo(false).andIdIn(ids);
example.createCriteria().andProjectIdEqualTo(projectId).andIdIn(ids);
List<FunctionalCase> functionalCaseLists = functionalCaseMapper.selectByExample(example);
return functionalCaseLists.stream().collect(Collectors.toMap(FunctionalCase::getId, functionalCase -> functionalCase));
}

View File

@ -168,10 +168,10 @@ public abstract class AbstractNoticeSender implements NoticeSender {
}
// 去重复
List<String> userIds = toUsers.stream().map(Receiver::getUserId).distinct().toList();
List<String> userIds = toUsers.stream().map(Receiver::getUserId).toList();
LogUtils.info("userIds: ", JSON.toJSONString(userIds));
List<User> users = getUsers(userIds, messageDetail.getProjectId());
List<String> realUserIds = users.stream().map(User::getId).toList();
List<String> realUserIds = users.stream().map(User::getId).distinct().toList();
return toUsers.stream().filter(t -> realUserIds.contains(t.getUserId())).toList();
}

View File

@ -188,7 +188,8 @@ public class MessageTemplateUtils {
// 处理人相关的数据
handleUser(context);
StringSubstitutor sub = new StringSubstitutor(context);
return sub.replace(template);
String replace = sub.replace(template);
return replace;
}
public static void handleTime(Map<String, Object> context) {

View File

@ -597,6 +597,7 @@
version: '',
};
activeFolder.value = 'all';
activeFolderName.value = t('ms.case.associate.allCase');
resetSelector();
emit('close');
}