瀏覽代碼

站内消息修改

anderx 7 年之前
父節點
當前提交
80657f98c7

+ 2 - 2
src/main/java/com/goafanti/order/controller/AdminNewOrderApiController.java

@@ -409,9 +409,9 @@ public class AdminNewOrderApiController extends CertifyApiController {
 	 * 咨询师驳回
 	 */
 	@RequestMapping(value = "/technicianBackOrder", method = RequestMethod.POST)
-	public Result technicianBackOrder(String orderNo){
+	public Result technicianBackOrder(String orderNo,String reason){
 		Result res = new Result();
-		int i=orderNewService.technicianBackOrder(orderNo);
+		int i=orderNewService.technicianBackOrder(orderNo, reason);
 		if (i==-1) {
 			res.getError().add(buildError("不符合驳回条件","不符合驳回条件"));
 			return res;

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

@@ -159,7 +159,7 @@ public interface OrderNewService {
 	int updateOrderOver(String orderNo);
 	OrderRefundDetailBo orderRefundDetail(String id);
 	int updateOrderRefund(TOrderRefundWithBLOBs t);
-	int technicianBackOrder(String orderNo);
+	int technicianBackOrder(String orderNo, String reason);
 	List<OrderDunTaskBo> selectAllOrderDun();
 	void updateOrderDun(TOrderDun tDun);
 	void addNoticAndSendEmail(String orderNo, OrderDunTaskBo t, Integer code)throws UnsupportedEncodingException, MessagingException;

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

@@ -562,19 +562,15 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 
 	@Override
-	public int technicianBackOrder(String orderNo) {
+	public int technicianBackOrder(String orderNo,String reason) {
 		TOrderNew t=tOrderNewMapper.selectByPrimaryKey(orderNo);
 		if (t.getSettlementAmount().compareTo(new BigDecimal(0))==0||
 				t.getProcessStatus()>ProcessStatus.YPZXSGLY.getCode()) {
 			return -1;
 		}
 		t.setOrderStatus(OrderNewState.YBH.getCode());
-		try {
-			addNoticAndSendEmail(orderNo, null, NoticeStatus.ORDER_BACK.getCode());
-		} catch (UnsupportedEncodingException | MessagingException e) {
-			LoggerUtils.error(getClass(), "发送邮件失败", e);
-		}
-		return tOrderNewMapper.updateByPrimaryKey(t);
+		addBackOrder(orderNo, reason);
+		return tOrderNewMapper.updateByPrimaryKeySelective(t);
 	}
 	
 	@Override
@@ -591,9 +587,6 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 
 	public void addNotic(String orderNo,Integer type,AdminListBo a,TOrderNewBo b) {
 		LoggerUtils.debug(logger, "======================站内消息发送启动===================");
-		 String id="1";
-		if (type==NoticeStatus.ORDER_DUN.getCode())  id=b.getSalesmanId();
-		if (type==NoticeStatus.ORDER_BACK.getCode())  id=TokenManager.getAdminId()==null?"1":TokenManager.getAdminId();
 		String str=NoticeStatus.getValueByCode(type)+": 订单编号 -"+orderNo+", 操作人:"+a.getDepartmentName()+"-"+a.getName()+"。";
 		Notice n =new Notice();
 		n.setId(UUID.randomUUID().toString());