Skip to content

Commit f5202e0

Browse files
committed
chore: 调整部分代码格式和注释
1 parent 5a9958c commit f5202e0

File tree

5 files changed

+20
-17
lines changed

5 files changed

+20
-17
lines changed

continew-module-system/src/main/java/top/continew/admin/system/service/impl/SmsConfigServiceImpl.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@ public void setDefaultConfig(Long id) {
8080

8181
@Override
8282
public SmsConfigDO getDefaultConfig() {
83-
return baseMapper.lambdaQuery().eq(SmsConfigDO::getIsDefault, true).eq(SmsConfigDO::getStatus, DisEnableStatusEnum.ENABLE).one();
83+
return baseMapper.lambdaQuery()
84+
.eq(SmsConfigDO::getIsDefault, true)
85+
.eq(SmsConfigDO::getStatus, DisEnableStatusEnum.ENABLE)
86+
.one();
8487
}
8588

8689
/**

continew-webapi/src/main/java/top/continew/admin/controller/system/UserMessageController.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ public class UserMessageController {
5757
private final NoticeService noticeService;
5858
private final MessageService messageService;
5959

60+
@Log(ignore = true)
61+
@Operation(summary = "查询未读消息数量", description = "查询当前用户的未读消息数量")
62+
@Parameter(name = "isDetail", description = "是否查询详情", example = "true", in = ParameterIn.QUERY)
63+
@GetMapping("/unread")
64+
public MessageUnreadResp countUnreadMessage(@RequestParam(required = false) Boolean detail) {
65+
return messageService.countUnreadByUserId(UserContextHolder.getUserId(), detail);
66+
}
67+
6068
@Operation(summary = "分页查询消息列表", description = "分页查询消息列表")
6169
@GetMapping
6270
public PageResp<MessageResp> page(MessageQuery query, @Validated PageQuery pageQuery) {
@@ -83,11 +91,10 @@ public void readAll() {
8391
}
8492

8593
@Log(ignore = true)
86-
@Operation(summary = "查询未读消息数量", description = "查询当前用户的未读消息数量")
87-
@Parameter(name = "isDetail", description = "是否查询详情", example = "true", in = ParameterIn.QUERY)
88-
@GetMapping("/unread")
89-
public MessageUnreadResp countUnreadMessage(@RequestParam(required = false) Boolean detail) {
90-
return messageService.countUnreadByUserId(UserContextHolder.getUserId(), detail);
94+
@Operation(summary = "查询未读公告数量", description = "查询当前用户的未读公告数量")
95+
@GetMapping("/notice/unread")
96+
public NoticeUnreadResp countUnreadNotice() {
97+
return noticeService.countUnreadByUserId(UserContextHolder.getUserId());
9198
}
9299

93100
@Operation(summary = "分页查询公告列表", description = "分页查询公告列表")
@@ -108,11 +115,4 @@ public NoticeDetailResp getNotice(@PathVariable Long id) {
108115
noticeService.readNotice(id, UserContextHolder.getUserId());
109116
return detail;
110117
}
111-
112-
@Log(ignore = true)
113-
@Operation(summary = "查询未读公告数量", description = "查询当前用户的未读公告数量")
114-
@GetMapping("/notice/unread")
115-
public NoticeUnreadResp countUnreadNotice() {
116-
return noticeService.countUnreadByUserId(UserContextHolder.getUserId());
117-
}
118118
}

continew-webapi/src/main/resources/config/application-dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ captcha:
168168
expirationInMinutes: 5
169169

170170
--- ### 短信配置
171-
## 提示:配置文件方式和 [短信配置] 功能可任选其一方式使用,也可共同使用,但实际开发时建议选择一种,注释或删除另一方
171+
## 提示:配置文件方式和 [系统管理/系统配置/短信配置] 功能可任选其一方式使用,也可共同使用,但实际开发时建议选择一种,注释或删除另一方
172172
sms:
173173
http-log: true
174174
is-print: true
@@ -184,7 +184,7 @@ sms:
184184
# sdk-app-id: 你的应用ID
185185

186186
--- ### 邮件配置
187-
## 提示:配置文件方式和 [邮件配置] 功能可任选其一方式使用,实际开发时请注释或删除另一方
187+
## 提示:配置文件方式和 [系统管理/系统配置/邮件配置] 功能可任选其一方式使用,实际开发时请注释或删除另一方
188188
#spring.mail:
189189
# # 根据需要更换
190190
# host: smtp.126.com

continew-webapi/src/main/resources/db/changelog/mysql/main_table.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ CREATE TABLE IF NOT EXISTS `sys_notice` (
241241
`type` varchar(30) NOT NULL COMMENT '分类',
242242
`notice_scope` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '通知范围(1:所有人;2:指定用户)',
243243
`notice_users` json DEFAULT NULL COMMENT '通知用户',
244-
`notice_methods` json DEFAULT NULL COMMENT '通知方式(1:登录弹窗;2:系统消息',
244+
`notice_methods` json DEFAULT NULL COMMENT '通知方式(1:系统消息;2:登录弹窗',
245245
`is_timing` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否定时',
246246
`publish_time` datetime DEFAULT NULL COMMENT '发布时间',
247247
`is_top` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否置顶',

continew-webapi/src/main/resources/db/changelog/postgresql/main_table.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ COMMENT ON COLUMN "sys_notice"."content" IS '内容';
415415
COMMENT ON COLUMN "sys_notice"."type" IS '分类';
416416
COMMENT ON COLUMN "sys_notice"."notice_scope" IS '通知范围(1:所有人;2:指定用户)';
417417
COMMENT ON COLUMN "sys_notice"."notice_users" IS '通知用户';
418-
COMMENT ON COLUMN "sys_notice"."notice_methods" IS '通知方式(1:登录弹窗;2:系统消息';
418+
COMMENT ON COLUMN "sys_notice"."notice_methods" IS '通知方式(1:系统消息;2:登录弹窗';
419419
COMMENT ON COLUMN "sys_notice"."is_timing" IS '是否定时';
420420
COMMENT ON COLUMN "sys_notice"."publish_time" IS '发布时间';
421421
COMMENT ON COLUMN "sys_notice"."is_top" IS '是否置顶';

0 commit comments

Comments
 (0)