|
|
|
@ -9,6 +9,8 @@ import org.quartz.JobExecutionException; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.scheduling.quartz.QuartzJobBean; |
|
|
|
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.util.Calendar; |
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
@ -22,8 +24,9 @@ public class SzwhJob extends QuartzJobBean { |
|
|
|
@Override |
|
|
|
protected void executeInternal(JobExecutionContext context) throws JobExecutionException { |
|
|
|
Calendar cal = Calendar.getInstance(); |
|
|
|
Date xxd =cal.getTime(); |
|
|
|
log.info("商品开始更新:"+xxd); |
|
|
|
LocalDateTime localDateTime = LocalDateTime.now(); |
|
|
|
String nowstr = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
|
|
|
log.info("商品开始更新:"+nowstr); |
|
|
|
// 远程获取产品信息
|
|
|
|
goodsService.getApiGoods(); |
|
|
|
} |
|
|
|
|