|  |  |  | 
|---|
|  |  |  | package com.matrix.system.shopXcx.mqTask; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.matrix.component.asyncmessage.MessageHandler; | 
|---|
|  |  |  | import com.matrix.core.tools.LogUtil; | 
|---|
|  |  |  | import com.matrix.core.tools.StringUtils; | 
|---|
|  |  |  | import com.matrix.system.common.bean.BusParameterSettings; | 
|---|
|  |  |  | 
|---|
|  |  |  | import java.io.IOException; | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订单创建积分事件处理 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Component | 
|---|
|  |  |  | public class ScoreOrderTask implements DeliverCallback { | 
|---|
|  |  |  | public class ScoreOrderTask implements MessageHandler { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | SysVipInfoDao sysVipInfoDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void handle(String consumerTag, Delivery message) throws IOException { | 
|---|
|  |  |  | public String getName() { | 
|---|
|  |  |  | return "订单创建积分事件"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String orderId = new String(message.getBody(), "UTF-8"); | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public String getRouteKey() { | 
|---|
|  |  |  | return AsyncMessageRouting.CREATE_ORDER; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void handle(Map<String,Object> param)  { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String orderId = (String) param.get("orderId"); | 
|---|
|  |  |  | LogUtil.debug("收到订单积分任务orderId={}", orderId); | 
|---|
|  |  |  | //获取订单信息 | 
|---|
|  |  |  | ShopOrder order = shopOrderDao.selectById(Integer.valueOf(orderId)); | 
|---|