Commit 62a20469 authored by fangxinjiang's avatar fangxinjiang

项目xml 优化

parent 596964d2
...@@ -38,6 +38,7 @@ import java.util.ArrayList; ...@@ -38,6 +38,7 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* *
...@@ -146,7 +147,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl ...@@ -146,7 +147,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
saves.add(ms); saves.add(ms);
} }
if (Common.isNotNull(tempMap)){ if (Common.isNotNull(tempMap)){
this.removeByIds(tempMap.values()); this.removeByIds(tempMap.values().stream().map(MsgInfo::getId).collect(Collectors.toList()));
} }
if (Common.isNotNull(saves)){ if (Common.isNotNull(saves)){
this.saveBatch(saves); this.saveBatch(saves);
...@@ -200,7 +201,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl ...@@ -200,7 +201,7 @@ public class MsgInfoServiceImpl extends ServiceImpl<MsgInfoMapper, MsgInfo> impl
saves.add(ms); saves.add(ms);
} }
if (Common.isNotNull(tempMap)){ if (Common.isNotNull(tempMap)){
this.removeByIds(tempMap.values()); this.removeByIds(tempMap.values().stream().map(MsgInfo::getId).collect(Collectors.toList()));
} }
this.saveBatch(saves); this.saveBatch(saves);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment