| | |
| | | import org.springframework.stereotype.Component;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.elme.ElmeOrder;
|
| | | import com.yeshi.fanli.exception.elme.ElmeOrderException;
|
| | | import com.yeshi.fanli.service.inter.elme.ElmeOrderProcessService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderProcessService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.elme.ElmeOrderUtil;
|
| | |
|
| | | //饿了么爬单,到账
|
| | | //旧版饿了么到账
|
| | | @Component
|
| | | public class UpdateElmeOrderJob {
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private OrderProcessService orderProcessService;
|
| | |
|
| | | /**
|
| | | * 更新订单(每天早上凌晨0点,下午4点)
|
| | | */
|
| | | @Scheduled(cron = "0 0 0,16 * * ? ")
|
| | | public void updateOrder() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | try {
|
| | | List<ElmeOrder> orderList = ElmeOrderUtil.pullLatest5DayOrder();
|
| | | try {
|
| | | for (ElmeOrder order : orderList)
|
| | | elmeOrderProcessService.processOrder(order);
|
| | | } catch (ElmeOrderException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // 每天凌晨过2分到账
|
| | | @Scheduled(cron = "0 2 0 * * ? ")
|