mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-27 15:53:23 +08:00
update 优化 通知公告页面增加查看详情功能 支持预览已经编辑好的富文本内容
update 优化 消息盒子相关消息可直接跳转到详情页展示富文本内容
This commit is contained in:
@@ -7,7 +7,6 @@ import org.dromara.common.core.utils.StringUtils;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 推送给前端的统一消息体
|
||||
@@ -45,11 +44,6 @@ public class PushPayload implements Serializable {
|
||||
*/
|
||||
private String path;
|
||||
|
||||
/**
|
||||
* 前端跳转参数
|
||||
*/
|
||||
private Map<String, Object> query;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
@@ -74,10 +68,9 @@ public class PushPayload implements Serializable {
|
||||
);
|
||||
}
|
||||
|
||||
public static PushPayload of(PushTypeEnum type, PushSourceEnum source, String message, Object data, String path, Map<String, Object> query) {
|
||||
public static PushPayload of(PushTypeEnum type, PushSourceEnum source, String message, Object data, String path) {
|
||||
PushPayload payload = of(type, source, message, data);
|
||||
payload.setPath(path);
|
||||
payload.setQuery(query);
|
||||
return payload;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,13 +82,13 @@ public class SysNoticeController extends BaseController {
|
||||
data.put("noticeType", notice.getNoticeType());
|
||||
data.put("noticeTypeLabel", type);
|
||||
data.put("noticeTitle", notice.getNoticeTitle());
|
||||
data.put("noticeId", notice.getNoticeId());
|
||||
PushHelper.publishAll(PushPayload.of(
|
||||
PushTypeEnum.NOTICE,
|
||||
PushSourceEnum.NOTICE,
|
||||
"[" + type + "] " + notice.getNoticeTitle(),
|
||||
data,
|
||||
"/system/notice",
|
||||
null
|
||||
"/system/notice?noticeId=" + notice.getNoticeId()
|
||||
));
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,9 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
|
||||
@Override
|
||||
public int insertNotice(SysNoticeBo bo) {
|
||||
SysNotice notice = MapstructUtils.convert(bo, SysNotice.class);
|
||||
return baseMapper.insert(notice);
|
||||
int rows = baseMapper.insert(notice);
|
||||
bo.setNoticeId(notice.getNoticeId());
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user