| | |
| | | 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; |
| | |
| | | |
| | | 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 |
| | |
| | | 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); |