mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-09 08:57:16 +08:00
chore: 调整部分代码格式和注释
This commit is contained in:
@@ -80,7 +80,10 @@ public class SmsConfigServiceImpl extends BaseServiceImpl<SmsConfigMapper, SmsCo
|
||||
|
||||
@Override
|
||||
public SmsConfigDO getDefaultConfig() {
|
||||
return baseMapper.lambdaQuery().eq(SmsConfigDO::getIsDefault, true).eq(SmsConfigDO::getStatus, DisEnableStatusEnum.ENABLE).one();
|
||||
return baseMapper.lambdaQuery()
|
||||
.eq(SmsConfigDO::getIsDefault, true)
|
||||
.eq(SmsConfigDO::getStatus, DisEnableStatusEnum.ENABLE)
|
||||
.one();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -57,6 +57,14 @@ public class UserMessageController {
|
||||
private final NoticeService noticeService;
|
||||
private final MessageService messageService;
|
||||
|
||||
@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
|
||||
public PageResp<MessageResp> 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());
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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 '是否置顶',
|
||||
|
@@ -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 '是否置顶';
|
||||
|
Reference in New Issue
Block a user