| | |
| | | import com.yeshi.fanli.dto.mq.order.body.CommonOrderMQMsg; |
| | | import com.yeshi.fanli.entity.order.CommonOrder; |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.mq.cmq.order.OrdersCMQManager; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | @XxlJob("order-update-pay-state") |
| | | public ReturnT<String> updatePayState(String param) throws Exception { |
| | | //更新20-25天之前的未处理订单 |
| | | List<CommonOrder> 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())); |
| | | List<CommonOrder> resultList = null; |
| | | if (!StringUtil.isNullOrEmpty(param)) { |
| | | if (param.length() > 1) { |
| | | resultList = commonOrderService.getByOrderNo(null, param); |
| | | } else { |
| | | resultList = commonOrderService.listPayStateOrder(Integer.parseInt(param), new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 25), new Date(System.currentTimeMillis() - 1000 * 60 * 60 * 24L * 10), 1, 500); |
| | | } |
| | | } else { |
| | | 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())); |
| | | } |
| | | return ReturnT.SUCCESS; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |