| | |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.mq.cmq.order.OrdersCMQManager; |
| | | import com.yeshi.fanli.util.mq.rabbit.RabbitmqManager; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private CommonOrderService commonOrderService; |
| | | |
| | | @Resource |
| | | private OrdersCMQManager ordersCMQManager; |
| | | |
| | | @XxlJob("order-update-pay-state") |
| | | public ReturnT<String> updatePayState(String param) throws Exception { |
| | | //更新20-25天之前的未处理订单 |
| | |
| | | resultList = commonOrderService.listPayStateOrder(null, new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 25), new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 20), 1, 500); |
| | | } |
| | | for (CommonOrder co : resultList) { |
| | | OrdersCMQManager.getInstance().addOrder(new CommonOrderMQMsg(co.getOrderNo(), co.getSourceType())); |
| | | ordersCMQManager.addOrder(new CommonOrderMQMsg(co.getOrderNo(), co.getSourceType())); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |