Helius
2022-02-14 59cf24b0aba393e145f4ba3d58e98b7a01a80992
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderDingDingNoticeTask.java
@@ -1,6 +1,7 @@
package com.matrix.system.shopXcx.mqTask;
import com.matrix.component.asyncmessage.MessageHandler;
import com.matrix.core.tools.DingDingRobotUtil;
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.StringUtils;
@@ -21,12 +22,13 @@
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
 * 微商城订单同步到erp系统
 */
@Component
public class OrderDingDingNoticeTask implements DeliverCallback {
public class OrderDingDingNoticeTask implements MessageHandler {
    @Autowired
@@ -46,8 +48,19 @@
    ShopDeliveryInfoDao shopDeliveryInfoDao;
    @Override
    public void handle(String consumerTag, Delivery message) throws IOException {
        String orderIdStr = new String(message.getBody(), "UTF-8");
    public String getName() {
        return "创建订单通知任务";
    }
    @Override
    public String getRouteKey() {
        return AsyncMessageRouting.CREATE_ORDER;
    }
    @Override
    public void handle(Map<String,Object> param){
        String orderIdStr = (String) param.get("orderId");
        Integer orderId=Integer.valueOf(orderIdStr);
        //获取订单信息
        ShopOrder order = shopOrderDao.selectById(orderId);