|  |  |  | 
|---|
|  |  |  | import com.zy.common.entity.Parameter; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Value; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Async; | 
|---|
|  |  |  | import org.springframework.scheduling.annotation.Scheduled; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ApiLogService apiLogService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Value("${erp.enable}") | 
|---|
|  |  |  | private Boolean erpEnable; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0 0 1 * * ? ") | 
|---|
|  |  |  | public void clearApiLog(){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Scheduled(cron = "0/5 * * * * ? ") | 
|---|
|  |  |  | //    @Scheduled(cron = "0/5 * * * * ? ") | 
|---|
|  |  |  | @Async("orderThreadPool") | 
|---|
|  |  |  | public void completeAndReport(){ | 
|---|
|  |  |  | if (!erpEnable) return; | 
|---|
|  |  |  | String erpReport = Parameter.get().getErpReport(); | 
|---|
|  |  |  | if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) { | 
|---|
|  |  |  | List<Order> orders = orderService.selectComplete(); | 
|---|