From 9c791d431038fe79a111805762ee2f42c96b51c5 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 08 Nov 2021 17:03:15 +0800
Subject: [PATCH] fix
---
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java | 27 +++++++++++----------------
1 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
index 9e1504a..82954ed 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
@@ -1,6 +1,6 @@
package com.matrix.system.shopXcx.action;
-import com.matrix.component.rabbitmq.RabiitMqTemplate;
+import com.matrix.component.asyncmessage.AsyncMessageManager;
import com.matrix.core.anotations.RemoveRequestToken;
import com.matrix.core.anotations.SaveRequestToken;
import com.matrix.core.constance.MatrixConstance;
@@ -12,21 +12,19 @@
import com.matrix.core.tools.ModelUtils;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
-import com.matrix.system.common.bean.CustomerDataDictionary;
-import com.matrix.system.common.bean.SystemDictionary;
-import com.matrix.system.common.dao.CustomerDataDictionaryDao;
import com.matrix.system.common.bean.SysUsers;
+import com.matrix.system.common.bean.SystemDictionary;
import com.matrix.system.common.constance.AppConstance;
+import com.matrix.system.common.dao.CustomerDataDictionaryDao;
import com.matrix.system.common.dao.SystemDictionaryDao;
-import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.action.BaseController;
+import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
import com.matrix.system.shopXcx.bean.ShopDeliveryInfo;
import com.matrix.system.shopXcx.bean.ShopOrder;
import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao;
import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao;
import com.matrix.system.shopXcx.dao.ShopOrderDao;
-import com.matrix.system.shopXcx.api.tools.WxShopOrderUtil;
-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,14 +59,14 @@
@Autowired
SystemDictionaryDao systemDictionaryDao;
+ @Autowired
+ private AsyncMessageManager asyncMessageManager;
@Autowired
private WxShopOrderUtil wxShopOrderUtil;
@Autowired
private ShopLogisticsInfoDao shopLogisticsInfoDao;
- @Autowired
- private RabiitMqTemplate rabiitMqTemplate;
//记录编辑前的值Before_Edit_Value
public static final String BEV = "ShopDeliveryInfo_BEV";
@@ -86,11 +84,7 @@
pageVo.setSort("create_time");
pageVo.setOrder("desc");
shopDeliveryInfo.setCompanyId(sysUsers.getCompanyId());
- if (getMe().getShopRole().equals(Dictionary.FLAG_NO_N)) {
- shopDeliveryInfo.setShopId(sysUsers.getShopId());
- }
-
-
+// shopDeliveryInfo.setShopId(sysUsers.getShopId());
List<ShopDeliveryInfo> dataList = shopDeliveryInfoDao.selectInPage(shopDeliveryInfo, pageVo);
AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList,
shopDeliveryInfoDao.selectTotalRecord(shopDeliveryInfo));
@@ -166,6 +160,7 @@
info.setRemarks(deliveryInfo.getRemarks());
info.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
info.setDeliveryTime(new Date());
+ info.setCompanyId(user.getCompanyId());
shopDeliveryInfoDao.updateByModel(info);
//构建需要修改订单信息Map
@@ -175,8 +170,8 @@
shopOrderDao.updateByMap(modifyMap);
//发送创建订单的消息
- rabiitMqTemplate.sendMsg(MQTaskRouting.ORDER_OUT_SOTORE+evn, shopOrderDao.selectById(deliveryInfo.getOrderId()).getOrderNo());
-
+ String orderNo = shopOrderDao.selectById(deliveryInfo.getOrderId()).getOrderNo();
+ asyncMessageManager.sendMsg(AsyncMessageRouting.ORDER_OUT_SOTORE ,"orderNo=%s",orderNo);
return new AjaxResult(AjaxResult.STATUS_SUCCESS, "发货成功");
}
--
Gitblit v1.9.1