修改cgy留言板数据时间修改接口
This commit is contained in:
parent
0e934ff3f3
commit
1aa72b87ec
@ -412,9 +412,11 @@ public class LearnService implements ILearnService {
|
|||||||
.values().stream().sorted(Comparator.comparingLong(LearnMessage::getId)).collect(Collectors.toList());
|
.values().stream().sorted(Comparator.comparingLong(LearnMessage::getId)).collect(Collectors.toList());
|
||||||
HashSet<LearnMessage> distinctSet = new HashSet<>(list);
|
HashSet<LearnMessage> distinctSet = new HashSet<>(list);
|
||||||
List<Long> deleteIds = allMessage.stream().filter(message -> !distinctSet.contains(message)).map(LearnMessage::getId).collect(Collectors.toList());
|
List<Long> deleteIds = allMessage.stream().filter(message -> !distinctSet.contains(message)).map(LearnMessage::getId).collect(Collectors.toList());
|
||||||
|
if (!CollectionUtils.isEmpty(deleteIds)) {
|
||||||
example.clear();
|
example.clear();
|
||||||
example.createCriteria().andIdIn(deleteIds);
|
example.createCriteria().andIdIn(deleteIds);
|
||||||
learnMessageDAO.deleteByExample(example);
|
learnMessageDAO.deleteByExample(example);
|
||||||
|
}
|
||||||
//修改时间
|
//修改时间
|
||||||
int day = 365 * 4;
|
int day = 365 * 4;
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
|
Loading…
Reference in New Issue
Block a user