| | |
| | | import com.taoke.autopay.dto.DYOrderDto; |
| | | import com.taoke.autopay.entity.KeyOrder; |
| | | import com.taoke.autopay.exception.KeyOrderException; |
| | | import com.taoke.autopay.manager.OrderPayFailProcessor; |
| | | import com.taoke.autopay.service.KeyOrderService; |
| | | import com.taoke.autopay.utils.StringUtil; |
| | | import com.taoke.autopay.utils.order.DYOrderApi; |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private OrderPayFailProcessor orderPayFailProcessor; |
| | | |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | private void processPayFail(){ |
| | | for(int i=0;i<10;i++) { |
| | | // 一次最多处理10条数据 |
| | | orderPayFailProcessor.processFromQueue(); |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0 0 3 * * ? ") |
| | | private void clearProcessPayFailCache(){ |
| | | orderPayFailProcessor.clearCacheData(); |
| | | } |
| | | |
| | | } |