From 930f47e1bd5f07a794a16d0ea48ee229d84bd7a6 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 23 五月 2025 10:08:22 +0800 Subject: [PATCH] 新增定时任务模块 --- framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java index 33388a9..053fbfc 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java @@ -24,6 +24,7 @@ import cn.lili.modules.lmk.domain.form.VideoForm; import cn.lili.modules.lmk.domain.query.VideoQuery; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import lombok.RequiredArgsConstructor; @@ -278,4 +279,14 @@ } return Result.ok().data(page.getRecords()); } + + @Override + @Transactional(rollbackFor = Exception.class) + public void updateCollectNumBatch(List<CollectTypeNumVO> numList) { + // 鎸�500鏉℃暟鎹繘琛屾媶鍒� + List<List<CollectTypeNumVO>> chunks = ListUtils.partition(numList, 500); + for (List<CollectTypeNumVO> chunk : chunks) { + baseMapper.updateCollectNumBatch(chunk); + } + } } -- Gitblit v1.8.0