|
|
@@ -1207,20 +1207,18 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
|
|
|
Admin admin = adminMapper.selectAllByid(string);
|
|
|
if(admin!=null&&SendEmailUtil.isEmail(admin.getEmail().trim()))adminIds+=admin.getEmail()+",";
|
|
|
}
|
|
|
- if (nlist.isEmpty()||StringUtils.isBlank(adminIds)) {
|
|
|
- throw new BusinessException(new Error( "邮件发送失败,对方设置邮箱错误","邮件发送失败,对方设置邮箱错误"));
|
|
|
- }
|
|
|
- noticeMapper.insertBatch(nlist);
|
|
|
+ noticeMapper.insertBatch(nlist);
|
|
|
+ if (!nlist.isEmpty()&&StringUtils.isNotBlank(adminIds)) {
|
|
|
adminIds=adminIds.substring(0, adminIds.length()-1);
|
|
|
EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), adminIds, a.getDepartmentName(), a.getName(), "请登录查看"
|
|
|
,null,null,null,null,null,0,approval);
|
|
|
- try {
|
|
|
- //使用专利邮件模板
|
|
|
- SendEmailUtil.getInstance().patentSend(bo);
|
|
|
- } catch (UnsupportedEncodingException | MessagingException e) {
|
|
|
- throw new BusinessException(new Error( "邮件发送错误","邮件发送错误"));
|
|
|
- }
|
|
|
-
|
|
|
+ try {
|
|
|
+ //使用专利邮件模板
|
|
|
+ SendEmailUtil.getInstance().patentSend(bo);
|
|
|
+ } catch (UnsupportedEncodingException | MessagingException e) {
|
|
|
+ throw new BusinessException(new Error( "邮件发送错误","邮件发送错误"));
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|