anderx 6 years ago
parent
commit
32105bb72b

+ 1 - 1
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -491,7 +491,7 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 		for (Admin admin : adminMapper.getAdminRoleList("咨询师管理员")) {
 			aids.add(admin.getId());
 		}
-		orderNewService.pushGeneralSendNoticeAndEmail(aids, NoticeStatus.ORDER_NO.getCode(),t.getOrderNo(), TokenManager.getAdminId());
+		orderNewService.pushGeneralSendNoticeAndEmail(aids, NoticeStatus.ORDER_YES.getCode(),t.getOrderNo(), TokenManager.getAdminId());
 		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
 

+ 4 - 3
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -497,9 +497,10 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 				aids.add(t2.getSalesmanId());
 				type=NoticeStatus.ORDER_NO.getCode();
 		}
-		pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId());
 		t.setOrderStatus(orderStatus);
-		return tOrderNewMapper.updateByPrimaryKeySelective(t);
+		tOrderNewMapper.updateByPrimaryKeySelective(t);
+		pushGeneralSendNoticeAndEmail(aids, type,t2.getOrderNo(), TokenManager.getAdminId());
+		return 1; 
 	}
 
 
@@ -948,6 +949,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			Admin admin = adminMapper.selectAllByid(string);
 			if(admin!=null&&admin.getEmail()!=null)adminIds+=admin.getEmail()+",";
 		}
+		if(!nlist.isEmpty())noticeMapper.insertBatch(nlist);
 		if(StringUtils.isNotBlank(adminIds))adminIds.substring(0, adminIds.length()-1);
 		EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), adminIds, a.getDepartmentName(), a.getName(), "请登录查看");
 			try {
@@ -956,7 +958,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 			} catch (UnsupportedEncodingException | MessagingException e) {
 				throw new BusinessException(new Error( "邮件发送错误","邮件发送错误"));
 			}
-		if(!nlist.isEmpty())noticeMapper.insertBatch(nlist);
 	}