| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 每天凌晨过3分钟验证
|
| | | * 每天凌晨5点过10分钟验证
|
| | | */
|
| | | @Scheduled(cron = "0 3 0 * * ?")
|
| | | @Scheduled(cron = "0 10 5 * * ? ")
|
| | | public void updateBuyTLJGoods() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | |
| | | String day = TimeUtil.getGernalTime(System.currentTimeMillis() + 1000 * 60 * 60 * 24L, "yyyy-MM-dd");
|
| | | List<TaoBaoGoodsBrief> list = tljBuyGoodsService.listPreGoods(1);
|
| | | Collections.shuffle(list);
|
| | | if (list.size() > 20)
|
| | | if (list.size() > 0)
|
| | | list = list.subList(0, 1);
|
| | | addTLJBuyGoods(list, day);
|
| | | }
|
| | |
| | | List<TaoBaoGoodsBrief> list = tljBuyGoodsService.listPreGoods(1);
|
| | | Collections.shuffle(list);
|
| | | if (list.size() > 20)
|
| | | list = list.subList(0, 1);
|
| | | list = list.subList(0, 20);
|
| | | addTLJBuyGoods(list, day);
|
| | | }
|
| | |
|