|
@@ -143,9 +143,8 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @Transactional
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public Long addProclamation(AddProclamationDto addProclamationDto) {
|
|
|
- Boolean isSuccess = false;
|
|
|
News news = BeanUtil.toBean(addProclamationDto, News.class);
|
|
|
news.setTypeId(2);
|
|
|
news.setEnabledMark(EnabledMark.ENABLED.getCode());
|
|
@@ -162,16 +161,18 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //公告需要添加阅读关系配置,关系类型 1=部门 2=人员 3=班级
|
|
|
+ if (addProclamationDto.getSendRange() == 3 && addProclamationDto.getRelationList() != null && addProclamationDto.getRelationList().size() > 0) {
|
|
|
+ addRelationConfig(news, addProclamationDto);
|
|
|
+ }
|
|
|
+
|
|
|
//如果状态是2,表示立即发布的公告,需要将阅读人添加进阅读关系表
|
|
|
if(addProclamationDto.getStatus() == 2){
|
|
|
addRelation(news, addProclamationDto, 2);
|
|
|
+ return news.getId();
|
|
|
}
|
|
|
-
|
|
|
- //公告需要添加阅读关系,关系类型 1=部门 2=人员 3=班级
|
|
|
- if (addProclamationDto.getSendRange() == 3 && addProclamationDto.getRelationList() != null) {
|
|
|
- addRelationConfig(news, addProclamationDto);
|
|
|
- }
|
|
|
- return news.getId();
|
|
|
+ //没有任何问题返回
|
|
|
+ return -1L;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -306,13 +307,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
|
|
|
xjrNews.setSendStartDate(LocalDateTime.now());
|
|
|
xjrNews.setModifyUserId(StpUtil.getLoginIdAsLong());
|
|
|
xjrNews.setModifyDate(LocalDateTime.now());
|
|
|
-
|
|
|
- Boolean isSuccess = addRelation(xjrNews, null, 1);
|
|
|
- if(isSuccess){
|
|
|
- CompletableFuture.runAsync(() -> {
|
|
|
- this.SendMessage(xjrNews.getId());
|
|
|
- });
|
|
|
- }
|
|
|
+ addRelation(xjrNews, null, 1);
|
|
|
}
|
|
|
|
|
|
if (xjrNews.getStatus() == 3) {
|
|
@@ -366,6 +361,7 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
|
|
|
setRelationType(relationDto.getRelationType());
|
|
|
if (department != null) {
|
|
|
setRelationName(department.getName());
|
|
|
+ //setRelationName("中小微企业是经济发展的“毛细血管,十二条措施明确推进破产审判全域智治集成改革,通过推广智慧破产平台、推动执破融合机制改革、推行小微企业破产特别保护,力求在涉企破产纠纷办理中提质效、降成本。扬州中院党组成员、副院长沈红表示,将以提升经营主体司法获得感和满意度为出发点和落脚点,让法治成为扬州营商环境核心竞争力。中小微企业是经济发展的毛细血管,十二条措施明确推进破产审判全域智治集成改革,通过推广智慧破产平台、推动执破融合机制改革、推行小微企业破产特别保护,力求在涉企破产纠纷办理中提质效、降成本。扬州中院党组成员、副院长沈红表示,将以提升经营主体司法获得感和满意度为出发点和落脚点,让法治成为扬州营商环境核心竞争力。");
|
|
|
}
|
|
|
}});
|
|
|
}
|