|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RabbitListener(queues = "queue_order_delay") | 
|---|
|  |  |  | public void orderCancelDelay(String id) { | 
|---|
|  |  |  | log.info("订单超时支付自动取消:{}", id); | 
|---|
|  |  |  | orderInfoService.autoCancelOrder(Long.parseLong(id)); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | orderInfoService.autoCancelOrder(Long.parseLong(id)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("订单超时支付异常", e); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RabbitListener(queues = QueueConstants.AGENT_AUTO_LEVEL_UP) | 
|---|
|  |  |  | public void agentAutoLevelUp(String id) { | 
|---|
|  |  |  | log.info("收到代理自动升级消息:{}", id); | 
|---|
|  |  |  | agentService.autoUpAgentLevel(Long.parseLong(id)); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | agentService.autoUpAgentLevel(Long.parseLong(id)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("代理自动升级异常", e); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RabbitListener(queues = QueueConstants.AGENT_RETURN_MONEY) | 
|---|
|  |  |  | public void agentReturnMoney(String orderId) { | 
|---|
|  |  |  | log.info("收到返利消息:{}", orderId); | 
|---|
|  |  |  | try{ | 
|---|
|  |  |  | agentService.returnMoneyToAgent(Long.parseLong(orderId)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("返利异常", e); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|