|
@@ -1,5 +1,6 @@
|
|
|
package com.sd.wln.scheduled;
|
|
|
|
|
|
+import com.sd.wln.service.WlnOrderService;
|
|
|
import com.sd.wln.service.WlnSkuService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
@@ -11,11 +12,14 @@ public class WlnSyncTask {
|
|
|
@Autowired
|
|
|
private WlnSkuService wlnSkuService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private WlnOrderService wlnOrderService;
|
|
|
+
|
|
|
/**
|
|
|
* 每天同步库存
|
|
|
*/
|
|
|
- // @Scheduled(cron = "0 0 1 * * ?")
|
|
|
- @Scheduled(cron = "0/1 * * * * ?")
|
|
|
+ @Scheduled(cron = "0 0 1 * * ?")
|
|
|
+ // @Scheduled(cron = "0/1 * * * * ?")
|
|
|
public void syncSku() {
|
|
|
for (int i = 0; i < 3; i++) {
|
|
|
boolean flag = wlnSkuService.syncSkuClassify();
|
|
@@ -30,7 +34,11 @@ public class WlnSyncTask {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
+ @Scheduled(fixedDelay = 30 * 1000)
|
|
|
+ private void syncOrder() {
|
|
|
+ wlnOrderService.syncOrder();
|
|
|
}
|
|
|
|
|
|
}
|