update 优化 通知公告页面增加查看详情功能 支持预览已经编辑好的富文本内容

update 优化 消息盒子相关消息可直接跳转到详情页展示富文本内容
This commit is contained in:
疯狂的狮子Li
2026-03-26 18:05:59 +08:00
parent 029f6a4c11
commit 7722f4f685
3 changed files with 6 additions and 11 deletions

View File

@@ -7,7 +7,6 @@ import org.dromara.common.core.utils.StringUtils;
import java.io.Serial; import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.Map;
/** /**
* 推送给前端的统一消息体 * 推送给前端的统一消息体
@@ -45,11 +44,6 @@ public class PushPayload implements Serializable {
*/ */
private String path; 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); PushPayload payload = of(type, source, message, data);
payload.setPath(path); payload.setPath(path);
payload.setQuery(query);
return payload; return payload;
} }
} }

View File

@@ -82,13 +82,13 @@ public class SysNoticeController extends BaseController {
data.put("noticeType", notice.getNoticeType()); data.put("noticeType", notice.getNoticeType());
data.put("noticeTypeLabel", type); data.put("noticeTypeLabel", type);
data.put("noticeTitle", notice.getNoticeTitle()); data.put("noticeTitle", notice.getNoticeTitle());
data.put("noticeId", notice.getNoticeId());
PushHelper.publishAll(PushPayload.of( PushHelper.publishAll(PushPayload.of(
PushTypeEnum.NOTICE, PushTypeEnum.NOTICE,
PushSourceEnum.NOTICE, PushSourceEnum.NOTICE,
"[" + type + "] " + notice.getNoticeTitle(), "[" + type + "] " + notice.getNoticeTitle(),
data, data,
"/system/notice", "/system/notice?noticeId=" + notice.getNoticeId()
null
)); ));
return R.ok(); return R.ok();
} }

View File

@@ -98,7 +98,9 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
@Override @Override
public int insertNotice(SysNoticeBo bo) { public int insertNotice(SysNoticeBo bo) {
SysNotice notice = MapstructUtils.convert(bo, SysNotice.class); SysNotice notice = MapstructUtils.convert(bo, SysNotice.class);
return baseMapper.insert(notice); int rows = baseMapper.insert(notice);
bo.setNoticeId(notice.getNoticeId());
return rows;
} }
/** /**