From dd0833ef33804b7cf085b8c3c005e5788a3617d6 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Mon, 22 Mar 2021 17:10:38 +0800
Subject: [PATCH] 积分商城16
---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java | 24 +++++++++++++++++++-----
1 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
index 6030d3e..2895e24 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
@@ -1,20 +1,22 @@
package com.matrix.system.shopXcx.api.service.impl;
-import com.matrix.component.wechat.externalInterface.common.WechatConfigure;
+import com.matrix.component.rabbitmq.RabiitMqTemplate;
+import com.matrix.component.tools.WxTempLateMsgUtil;
+import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.LogUtil;
import com.matrix.system.common.constance.AppConstance;
-import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil;
-import com.matrix.system.shopXcx.bean.*;
-import com.matrix.system.shopXcx.dao.*;
-import com.matrix.component.tools.WxTempLateMsgUtil;
import com.matrix.system.shopXcx.api.service.WXShopOrderService;
import com.matrix.system.shopXcx.api.service.WxShopRefundRecordService;
+import com.matrix.system.shopXcx.bean.*;
+import com.matrix.system.shopXcx.dao.*;
+import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
@@ -49,7 +51,15 @@
@Value("${wx_pay_debug_onoff}")
private boolean isDebug;
+ @Value("${evn}")
+ private String evn;
+
+ @Autowired
+ private RabiitMqTemplate rabiitMqTemplate;
+
+
@Override
+ @Transactional
public Boolean refundToUser(String id, ShopRefundRecord shopRefundRecord) {
LogUtil.debug("进入退款接口进行退款。。。", id);
Boolean flag = false;
@@ -134,6 +144,10 @@
modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_MONEYBACK_SUCCESS);
modifyMap.put("refundCharge", shopRefundRecord.getRefundMoney());
shopOrderDao.updateByMap(modifyMap);
+
+ rabiitMqTemplate.sendMsg(MQTaskRouting.SHOP_ORDER_REFUND+evn,shopRefundRecord.getOrderId()+"");
+
+
}catch (Exception e){
LogUtil.debug("退款成功,修改退款表和订单表状态出错。。。", id);
e.printStackTrace();
--
Gitblit v1.9.1