|
|
@@ -1518,10 +1518,20 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
aid=b.getSalesmanId();
|
|
|
}
|
|
|
if (admins!=null&&admins.size()>0){
|
|
|
+ List<EmailBo> list =new ArrayList<>();
|
|
|
+ List<Notice> notices=new ArrayList<>();
|
|
|
for (Admin admin : admins) {
|
|
|
- asyncUtils.addNotic(type,admin.getId(),sb.toString());
|
|
|
- sendMemberEmail(type,admin.getId(),sb.toString());
|
|
|
+ list.add(sendMemberEmail(type,admin.getId(),sb.toString()));
|
|
|
+ Notice n = new Notice();
|
|
|
+ n.setId(UUID.randomUUID().toString());
|
|
|
+ n.setAid(aid);
|
|
|
+ n.setNoticeType(type);
|
|
|
+ n.setContent(sb.toString());
|
|
|
+ n.setReaded(0);//未读
|
|
|
+ notices.add(n);
|
|
|
}
|
|
|
+ asyncUtils.sendList(list);
|
|
|
+ asyncUtils.addNoticeBatch(notices);
|
|
|
}else {
|
|
|
asyncUtils.addNotic(type,aid,sb.toString());
|
|
|
sendMemberEmail(type,aid,sb.toString());
|
|
|
@@ -1583,12 +1593,10 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
|
|
|
* @param aid
|
|
|
* @param content
|
|
|
*/
|
|
|
- private void sendMemberEmail(Integer type,String aid,String content) {
|
|
|
+ private EmailBo sendMemberEmail(Integer type,String aid,String content) {
|
|
|
Admin admin = adminMapper.selectByPrimaryKey(aid);
|
|
|
EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), admin.getEmail(),content);
|
|
|
- if(com.goafanti.common.utils.StringUtils.isNotBlank(admin.getEmail())) {
|
|
|
- asyncUtils.send(bo);
|
|
|
- }
|
|
|
+ return bo;
|
|
|
}
|
|
|
|
|
|
@Override
|