修改cgy留言板数据时间修改接口

This commit is contained in:
joylink_zhangsai 2021-03-04 21:27:41 +08:00
parent 0e934ff3f3
commit 1aa72b87ec

View File

@ -412,9 +412,11 @@ public class LearnService implements ILearnService {
.values().stream().sorted(Comparator.comparingLong(LearnMessage::getId)).collect(Collectors.toList());
HashSet<LearnMessage> distinctSet = new HashSet<>(list);
List<Long> deleteIds = allMessage.stream().filter(message -> !distinctSet.contains(message)).map(LearnMessage::getId).collect(Collectors.toList());
example.clear();
example.createCriteria().andIdIn(deleteIds);
learnMessageDAO.deleteByExample(example);
if (!CollectionUtils.isEmpty(deleteIds)) {
example.clear();
example.createCriteria().andIdIn(deleteIds);
learnMessageDAO.deleteByExample(example);
}
//修改时间
int day = 365 * 4;
Random random = new Random();