This commit is contained in:
LiuY 2022-05-11 09:47:44 +08:00
parent 40864093a3
commit 188fae9227

View File

@ -684,38 +684,41 @@ public class MailServiceImpl extends DefaultBaseService implements IMailService
saveParam.put("recipientNames", recipientNames); saveParam.put("recipientNames", recipientNames);
// 处理抄送人 // 处理抄送人
saveParam.put("copyForIds", vo.getCopyForIds()); if(vo.getCopyForIds() != null && !"".equals(vo.getCopyForIds())){
String[] copyForArray = vo.getCopyForIds().split(","); saveParam.put("copyForIds", vo.getCopyForIds());
String copyForNames = ""; String[] copyForArray = vo.getCopyForIds().split(",");
for(String s : copyForArray){ String copyForNames = "";
UserDTO userDTO = userService.get(s); for(String s : copyForArray){
if(userDTO == null){ UserDTO userDTO = userService.get(s);
continue; if(userDTO == null){
} continue;
if("".equals(copyForNames)){ }
copyForNames += userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; if("".equals(copyForNames)){
} else { copyForNames += userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]";
copyForNames += "," + userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; } else {
copyForNames += "," + userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]";
}
} }
saveParam.put("copyForNames", copyForNames);
} }
saveParam.put("copyForNames", copyForNames);
// 处理密送 // 处理密送
saveParam.put("secretIds", vo.getSecretIds()); if(vo.getSecretIds() != null && !"".equals(vo.getSecretIds())){
String[] secretArray = vo.getSecretIds().split(","); saveParam.put("secretIds", vo.getSecretIds());
String secretNames = ""; String[] secretArray = vo.getSecretIds().split(",");
for(String s : secretArray){ String secretNames = "";
UserDTO userDTO = userService.get(s); for(String s : secretArray){
if(userDTO == null){ UserDTO userDTO = userService.get(s);
continue; if(userDTO == null){
} continue;
if("".equals(secretNames)){ }
secretNames += userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; if("".equals(secretNames)){
} else { secretNames += userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]";
secretNames += "," + userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]"; } else {
secretNames += "," + userDTO.getUserUsername() + "[" + userDTO.getUserName() + "]";
}
} }
saveParam.put("secretNames", secretNames);
} }
saveParam.put("secretNames", secretNames);
// 邮件内容 // 邮件内容
String uuid = UUIDUtil.getUUID(); String uuid = UUIDUtil.getUUID();
saveParam.put("mailId", uuid); saveParam.put("mailId", uuid);