TASK:mixi;

This commit is contained in:
shahaibo
2024-04-30 14:00:34 +08:00
parent 7f6aa96901
commit 0d76ffc120

View File

@@ -13,6 +13,7 @@ import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
@@ -75,12 +76,14 @@ public class MiTuExportScheduledTask {
// public static void test(LocalDate today) {
// today = today.minusDays(1);
// }
@Scheduled(cron = "0 0 1 * * ?")
private void getBestSell() {
QueryWrapper<TProduct> bestSellIsNotNull = new QueryWrapper<>();
// bestSellIsNotNull.lambda().isNotNull(TProduct::getBestSell);
List<TProduct> productListAll = productMapper.selectList(bestSellIsNotNull);
LocalDate today = LocalDate.now();
for (int i = 0; i < 3; i++) {
for (int i = 0; i < 1; i++) {
// 将这一天的商品销售数量入库
miTuProductSellNumEntry(today, productListAll);
today = today.minusDays(1);