删除信息接口改造,支持指定人删除

This commit is contained in:
zhangqinbin
2022-01-22 13:52:50 +08:00
parent efcadec866
commit 6ac203a8eb

View File

@ -171,10 +171,16 @@ public class BizMessageProducerServiceImpl implements BizMessageProducerService
List<String> magIds = messageList.stream().map(BizMessage::getId).distinct().collect(Collectors.toList());
Map<String,Integer> map = new HashMap<>();
if(magIds!=null&&magIds.size()>0) {
List<String> userIds = new ArrayList<>();
userIds.add(userId);
List<String> userIds = null;
if(userId!=null){
userIds = new ArrayList<>();
userIds.add(userId);
}
List<String> finalUserIds = userIds;
magIds.forEach(magid->{
messageMapper.deleteAuthorizeByServicecdoe(magid,userIds);
messageMapper.deleteAuthorizeByServicecdoe(magid, finalUserIds);
});
}
return true;