大屏接口

dev_0531
yechenhao 6 years ago
parent dc5308b140
commit 069815720b

@ -36,7 +36,7 @@ public class StorePromotionDataJob {
@Scheduled(cron = "0 0 1 * * ?") @Scheduled(cron = "0 0 1 * * ?")
public void syncData(){ public void syncData(){
try { try {
int random = new Random(100).nextInt(); int random = new Random().nextInt(100);
Thread.sleep(random*1000); Thread.sleep(random*1000);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:00:00"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:00:00");
QueryWrapper<SysTaskDO> qw = new QueryWrapper<>(); QueryWrapper<SysTaskDO> qw = new QueryWrapper<>();

@ -23,11 +23,11 @@ public class SyncCountJobService {
@Autowired @Autowired
private SysTaskDOMapper sysTaskDOMapper; private SysTaskDOMapper sysTaskDOMapper;
@Scheduled(cron = "0 0/15 9 * * ?") @Scheduled(cron = "0 0/15 9/1 * * ??")
public void syncStoreCount(){ public void syncStoreCount(){
try { try {
int random = new Random(100).nextInt(); int random = new Random().nextInt(100);
Thread.sleep(random*1000); Thread.sleep(random*100);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:00"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:00");
QueryWrapper<SysTaskDO> qw = new QueryWrapper<>(); QueryWrapper<SysTaskDO> qw = new QueryWrapper<>();
qw.eq("type",TASK_TYPE_STORE_COUNT).eq("create_time",sdf.format(new Date())).last("limit 1"); qw.eq("type",TASK_TYPE_STORE_COUNT).eq("create_time",sdf.format(new Date())).last("limit 1");
@ -45,7 +45,7 @@ public class SyncCountJobService {
@Scheduled(cron = "0 0 2 * * ?") @Scheduled(cron = "0 0 2 * * ?")
public void syncAllCount(){ public void syncAllCount(){
try { try {
int random = new Random(100).nextInt(); int random = new Random().nextInt(100);
Thread.sleep(random*1000); Thread.sleep(random*1000);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:00:00"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:00:00");
QueryWrapper<SysTaskDO> qw = new QueryWrapper<>(); QueryWrapper<SysTaskDO> qw = new QueryWrapper<>();

Loading…
Cancel
Save