You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
806 B
32 lines
806 B
10 months ago
|
package com.qs.serve.task;
|
||
|
|
||
|
import com.qs.serve.modules.oms.service.OmsOrderOptionsService;
|
||
|
import lombok.AllArgsConstructor;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||
|
import org.springframework.stereotype.Component;
|
||
|
|
||
|
/**
|
||
|
* @author YenHex
|
||
|
* @since 2024/9/26
|
||
|
*/
|
||
|
@Slf4j
|
||
|
@Component
|
||
|
@AllArgsConstructor
|
||
|
@ConditionalOnProperty(value = "project.task", havingValue = "true")
|
||
|
public class OmsTask {
|
||
|
|
||
|
OmsOrderOptionsService omsOrderOptionsService;
|
||
|
|
||
|
/**
|
||
|
* 同步临期品到调度系统的订单中间表
|
||
|
* 每10分钟执行一次
|
||
|
*/
|
||
|
@Scheduled(cron="0 0/10 * * * ?")
|
||
|
public void saveToErpOrder(){
|
||
|
omsOrderOptionsService.syncToErp();
|
||
|
}
|
||
|
|
||
|
}
|