From 1d0c686d7894463770b2412d37dec11568e35e5a Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sat, 20 Nov 2021 21:18:48 +0800
Subject: [PATCH] fix
---
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java | 30 ++++++++----------------------
1 files changed, 8 insertions(+), 22 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
index e51d52f..b17b449 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
@@ -1,7 +1,6 @@
package com.matrix.system.shopXcx.action;
-import com.matrix.component.rabbitmq.RabiitMqTemplate;
-import com.matrix.component.redis.RedisUserLoginUtils;
+import com.matrix.component.asyncmessage.AsyncMessageManager;
import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
import com.matrix.core.anotations.RemoveRequestToken;
import com.matrix.core.anotations.SaveRequestToken;
@@ -11,8 +10,10 @@
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
-import com.matrix.core.tools.*;
-import com.matrix.system.common.bean.BusParameterSettings;
+import com.matrix.core.tools.LogUtil;
+import com.matrix.core.tools.ModelUtils;
+import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.constance.AppConstance;
import com.matrix.system.common.dao.BusParameterSettingsDao;
@@ -24,7 +25,7 @@
import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao;
import com.matrix.system.shopXcx.dao.ShopOrderDao;
import com.matrix.system.shopXcx.dao.ShopRefundRecordDao;
-import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
+import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -61,8 +62,7 @@
@Autowired
private ShopDeliveryInfoDao shopDeliveryInfoDao;
@Autowired
- private RedisUserLoginUtils redisUserLoginUtils;
-
+ private AsyncMessageManager asyncMessageManager;
@Autowired
private ShopCouponRecordDao shopCouponRecordDao;
@@ -77,8 +77,6 @@
@Value("${evn}")
private String evn;
- @Autowired
- private RabiitMqTemplate rabiitMqTemplate;
@Autowired
BusParameterSettingsDao parameterSettingsDao;
@@ -526,19 +524,7 @@
modifyMap.put("refundCharge", shopRefundRecord.getRefundMoney());
shopOrderDao.updateByMap(modifyMap);
- //发送退款通知
- BusParameterSettings wxOrderNoticeDingdingToken = parameterSettingsDao.selectCompanyParamByCode(AppConstance.WX_ORDER_NOTICE_DINGDING_TOKEN, shopOrder.getCompanyId());
- if (wxOrderNoticeDingdingToken != null && StringUtils.isNotBlank(wxOrderNoticeDingdingToken.getParamValue())) {
- DingDingRobotUtil.sendText(wxOrderNoticeDingdingToken.getParamValue(),
- "订单退款,微商城订单编号 "+shopOrder.getOrderNo()
- +"; 订单金额:¥"+shopOrder.getOrderMoney()
- +";收货电话:"+ shopOrder.getUserTel()+",收货人:"+ shopOrder.getUserName()
- ,"");
- }
-
-
- rabiitMqTemplate.sendMsg(MQTaskRouting.SHOP_ORDER_REFUND+evn,shopRefundRecord.getOrderId()+"");
-
+ asyncMessageManager.sendMsg(AsyncMessageRouting.SHOP_ORDER_REFUND ,"orderId=%s", shopRefundRecord.getOrderId());
}catch (Exception e){
LogUtil.debug("退款成功,修改退款表和订单表状态出错。。。", id);
--
Gitblit v1.9.1