|
@@ -479,7 +479,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
|
|
|
|
|
|
//对人员进行筛选,避免重复添加
|
|
//对人员进行筛选,避免重复添加
|
|
List<Long> userIdList = new ArrayList<>();
|
|
List<Long> userIdList = new ArrayList<>();
|
|
- if (personalIdList.size() > 0) {
|
|
|
|
|
|
+ if (!personalIdList.isEmpty()) {
|
|
//获取人员的班级或者部门
|
|
//获取人员的班级或者部门
|
|
List<DeptIdOrClassIdVo> deptIdOrClassIdVoList = newsMapper.getDeptIdOrClassId(personalIdList);
|
|
List<DeptIdOrClassIdVo> deptIdOrClassIdVoList = newsMapper.getDeptIdOrClassId(personalIdList);
|
|
for (DeptIdOrClassIdVo deptIdOrClassIdVo : deptIdOrClassIdVoList) {
|
|
for (DeptIdOrClassIdVo deptIdOrClassIdVo : deptIdOrClassIdVoList) {
|
|
@@ -495,17 +495,17 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//添加部门人员
|
|
//添加部门人员
|
|
- if (deptIdList.size() > 0) {
|
|
|
|
|
|
+ if (!deptIdList.isEmpty()) {
|
|
newsRelationMapper.insertDeptUser(xjrNews.getId(), deptIdList);
|
|
newsRelationMapper.insertDeptUser(xjrNews.getId(), deptIdList);
|
|
}
|
|
}
|
|
|
|
|
|
//添加部门人员
|
|
//添加部门人员
|
|
- if (classIdList.size() > 0) {
|
|
|
|
|
|
+ if (!classIdList.isEmpty()) {
|
|
newsRelationMapper.insertClassUser(xjrNews.getId(), classIdList);
|
|
newsRelationMapper.insertClassUser(xjrNews.getId(), classIdList);
|
|
}
|
|
}
|
|
|
|
|
|
//添加部门人员
|
|
//添加部门人员
|
|
- if (userIdList.size() > 0) {
|
|
|
|
|
|
+ if (!userIdList.isEmpty()) {
|
|
newsRelationMapper.insertPersonl(xjrNews.getId(), userIdList);
|
|
newsRelationMapper.insertPersonl(xjrNews.getId(), userIdList);
|
|
}
|
|
}
|
|
|
|
|