| | |
| | | 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; |
| | |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |