From f5202e0f6cfd6d591c0b7118cb02e809182c9c7e Mon Sep 17 00:00:00 2001 From: Charles7c Date: Wed, 21 May 2025 22:27:47 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=92=8C=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SmsConfigServiceImpl.java | 5 +++- .../system/UserMessageController.java | 24 +++++++++---------- .../main/resources/config/application-dev.yml | 4 ++-- .../db/changelog/mysql/main_table.sql | 2 +- .../db/changelog/postgresql/main_table.sql | 2 +- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/continew-module-system/src/main/java/top/continew/admin/system/service/impl/SmsConfigServiceImpl.java b/continew-module-system/src/main/java/top/continew/admin/system/service/impl/SmsConfigServiceImpl.java index 6c471772..fe5fd41c 100644 --- a/continew-module-system/src/main/java/top/continew/admin/system/service/impl/SmsConfigServiceImpl.java +++ b/continew-module-system/src/main/java/top/continew/admin/system/service/impl/SmsConfigServiceImpl.java @@ -80,7 +80,10 @@ public class SmsConfigServiceImpl extends BaseServiceImpl page(MessageQuery query, @Validated PageQuery pageQuery) { @@ -83,11 +91,10 @@ public class UserMessageController { } @Log(ignore = true) - @Operation(summary = "查询未读消息数量", description = "查询当前用户的未读消息数量") - @Parameter(name = "isDetail", description = "是否查询详情", example = "true", in = ParameterIn.QUERY) - @GetMapping("/unread") - public MessageUnreadResp countUnreadMessage(@RequestParam(required = false) Boolean detail) { - return messageService.countUnreadByUserId(UserContextHolder.getUserId(), detail); + @Operation(summary = "查询未读公告数量", description = "查询当前用户的未读公告数量") + @GetMapping("/notice/unread") + public NoticeUnreadResp countUnreadNotice() { + return noticeService.countUnreadByUserId(UserContextHolder.getUserId()); } @Operation(summary = "分页查询公告列表", description = "分页查询公告列表") @@ -108,11 +115,4 @@ public class UserMessageController { noticeService.readNotice(id, UserContextHolder.getUserId()); return detail; } - - @Log(ignore = true) - @Operation(summary = "查询未读公告数量", description = "查询当前用户的未读公告数量") - @GetMapping("/notice/unread") - public NoticeUnreadResp countUnreadNotice() { - return noticeService.countUnreadByUserId(UserContextHolder.getUserId()); - } } diff --git a/continew-webapi/src/main/resources/config/application-dev.yml b/continew-webapi/src/main/resources/config/application-dev.yml index 084b4350..3cd72a4f 100644 --- a/continew-webapi/src/main/resources/config/application-dev.yml +++ b/continew-webapi/src/main/resources/config/application-dev.yml @@ -168,7 +168,7 @@ captcha: expirationInMinutes: 5 --- ### 短信配置 -## 提示:配置文件方式和 [短信配置] 功能可任选其一方式使用,也可共同使用,但实际开发时建议选择一种,注释或删除另一方 +## 提示:配置文件方式和 [系统管理/系统配置/短信配置] 功能可任选其一方式使用,也可共同使用,但实际开发时建议选择一种,注释或删除另一方 sms: http-log: true is-print: true @@ -184,7 +184,7 @@ sms: # sdk-app-id: 你的应用ID --- ### 邮件配置 -## 提示:配置文件方式和 [邮件配置] 功能可任选其一方式使用,实际开发时请注释或删除另一方 +## 提示:配置文件方式和 [系统管理/系统配置/邮件配置] 功能可任选其一方式使用,实际开发时请注释或删除另一方 #spring.mail: # # 根据需要更换 # host: smtp.126.com diff --git a/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql b/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql index 14732068..00bb3f7f 100644 --- a/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql +++ b/continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql @@ -241,7 +241,7 @@ CREATE TABLE IF NOT EXISTS `sys_notice` ( `type` varchar(30) NOT NULL COMMENT '分类', `notice_scope` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '通知范围(1:所有人;2:指定用户)', `notice_users` json DEFAULT NULL COMMENT '通知用户', - `notice_methods` json DEFAULT NULL COMMENT '通知方式(1:登录弹窗;2:系统消息)', + `notice_methods` json DEFAULT NULL COMMENT '通知方式(1:系统消息;2:登录弹窗)', `is_timing` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否定时', `publish_time` datetime DEFAULT NULL COMMENT '发布时间', `is_top` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否置顶', diff --git a/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql b/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql index b7a5956e..84f5dd6d 100644 --- a/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql +++ b/continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql @@ -415,7 +415,7 @@ COMMENT ON COLUMN "sys_notice"."content" IS '内容'; COMMENT ON COLUMN "sys_notice"."type" IS '分类'; COMMENT ON COLUMN "sys_notice"."notice_scope" IS '通知范围(1:所有人;2:指定用户)'; COMMENT ON COLUMN "sys_notice"."notice_users" IS '通知用户'; -COMMENT ON COLUMN "sys_notice"."notice_methods" IS '通知方式(1:登录弹窗;2:系统消息)'; +COMMENT ON COLUMN "sys_notice"."notice_methods" IS '通知方式(1:系统消息;2:登录弹窗)'; COMMENT ON COLUMN "sys_notice"."is_timing" IS '是否定时'; COMMENT ON COLUMN "sys_notice"."publish_time" IS '发布时间'; COMMENT ON COLUMN "sys_notice"."is_top" IS '是否置顶';