| | |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesGroupJoinUserDao; |
| | | import com.matrix.system.shopXcx.dao.ShopOrderDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | |
| | |
| | | @Autowired |
| | | private ShopActivitiesGroupJoinDao shopActivitiesGroupJoinDao; |
| | | |
| | | @Value("${scheduling.enabled}") |
| | | private boolean taskSwitch; |
| | | |
| | | |
| | | @Scheduled(cron = "0 */1 * * * ?") |
| | | public void executeExt() { |
| | | if (taskSwitch) { |
| | | |
| | | LogUtil.info("#拼团支付超时处理任务#"); |
| | | List<ShopActivitiesGroupJoinUser> joinUserList = shopActivitiesGroupJoinUserDao.selectGroupJoinUserEnd(); |
| | | if (CollectionUtils.isNotEmpty(joinUserList)) { |
| | |
| | | shopOrder.setOrderStatus(ShopOrder.ORDER_STATUS_CANCEL); |
| | | shopOrderDao.updateByModel(shopOrder); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |