| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.service.IUserCouponRecordService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | @Scheduled(fixedRate = 1000 * 10) |
| | | public void taskFiveSeconds(){ |
| | | try { |
| | | //定时任务推送订单给司机 |
| | | String push_order_ids = redisUtil.getListFirstValue("push_order_ids"); |
| | | if(ToolUtil.isNotEmpty(push_order_ids)){ |
| | | boolean b = orderPrivateCarService.pushOrder1(Integer.valueOf(push_order_ids)); |
| | | if(!b){ |
| | | redisUtil.addListLeft("push_order_ids", push_order_ids); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |