1 Commits
dev ... tmp

Author SHA1 Message Date
979403df06 临时 2025-10-01 21:37:43 +08:00
20 changed files with 50 additions and 56 deletions

View File

@@ -6,7 +6,7 @@ body:
- type: markdown
attributes:
value: |
感谢您使用 ContiNew Admin请您花些时间填写这份 Bug 报告。**温馨提示:我们利用业余时间维护开源项目,没有额外精力及人员维护已发布版本,所以请务必检查最新版本是否正常,如已修复请自行跟进修复!**
感谢您使用 ContiNew Admin请您花些时间填写这份 Bug 报告。
- type: checkboxes
id: checkboxes
attributes:

View File

@@ -4,7 +4,7 @@
<img src="https://img.shields.io/badge/SNAPSHOT-v4.1.0-%23ff3f59.svg" alt="Release" />
</a>
<a href="https://github.com/continew-org/continew-starter" title="ContiNew Starter" target="_blank">
<img src="https://img.shields.io/badge/ContiNew Starter-2.14.0-%236CB52D.svg" alt="ContiNew Starter" />
<img src="https://img.shields.io/badge/ContiNew Starter-2.13.4-%236CB52D.svg" alt="ContiNew Starter" />
</a>
<a href="https://spring.io/projects/spring-boot" title="Spring Boot" target="_blank">
<img src="https://img.shields.io/badge/Spring Boot-3.3.12-%236CB52D.svg?logo=Spring-Boot" alt="Spring Boot" />
@@ -240,7 +240,7 @@ public class DeptController extends BaseController<DeptService, DeptResp, DeptDe
| <a href="https://arco.design/vue/docs/start" target="_blank">Arco Design</a> | 2.57.0 | 字节跳动推出的前端 UI 框架,年轻化的色彩和组件设计。 |
| <a href="https://www.typescriptlang.org/zh/" target="_blank">TypeScript</a> | 5.0.4 | TypeScript 是微软开发的一个开源的编程语言,通过在 JavaScript 的基础上添加静态类型定义构建而成。 |
| <a href="https://vite.dev/" target="_blank">Vite</a> | 5.1.5 | 下一代的前端工具链,为开发提供极速响应。 |
| [ContiNew Starter](https://github.com/continew-org/continew-starter) | 2.14.0 | ContiNew Starter 包含了一系列经过企业实践优化的依赖包(如 MyBatis-Plus、SaToken可轻松集成到应用中为开发人员减少手动引入依赖及配置的麻烦为 Spring Boot Web 项目的灵活快速构建提供支持。 |
| [ContiNew Starter](https://github.com/continew-org/continew-starter) | 2.13.4 | ContiNew Starter 包含了一系列经过企业实践优化的依赖包(如 MyBatis-Plus、SaToken可轻松集成到应用中为开发人员减少手动引入依赖及配置的麻烦为 Spring Boot Web 项目的灵活快速构建提供支持。 |
| <a href="https://spring.io/projects/spring-boot" target="_blank">Spring Boot</a> | 3.3.12 | 简化 Spring 应用的初始搭建和开发过程基于“约定优于配置”的理念使开发人员不再需要定义样板化的配置。Spring Boot 3.0 开始,要求 Java 17 作为最低版本) |
| <a href="https://undertow.io/" target="_blank">Undertow</a> | 2.3.18.Final | 采用 Java 开发的灵活的高性能 Web 服务器,提供包括阻塞和基于 NIO 的非堵塞机制。 |
| <a href="https://sa-token.dev33.cn/" target="_blank">Sa-Token + JWT</a> | 1.44.0 | 轻量级 Java 权限认证框架,让鉴权变得简单、优雅。 |

View File

@@ -33,9 +33,14 @@ import org.springframework.boot.SpringBootVersion;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import top.continew.admin.common.context.UserContext;
import top.continew.admin.common.context.UserContextHolder;
import top.continew.starter.core.autoconfigure.application.ApplicationProperties;
import top.continew.starter.core.util.SpringUtils;
import top.continew.starter.extension.crud.annotation.EnableCrudApi;
import top.continew.starter.web.annotation.EnableGlobalResponse;
import top.continew.starter.web.model.R;
@@ -59,6 +64,7 @@ public class ContiNewAdminApplication implements ApplicationRunner {
private final ApplicationProperties applicationProperties;
private final ServerProperties serverProperties;
private final ThreadPoolTaskExecutor threadPoolTaskExecutor;
public static void main(String[] args) {
SpringApplication.run(ContiNewAdminApplication.class, args);
@@ -93,5 +99,15 @@ public class ContiNewAdminApplication implements ApplicationRunner {
log.info("更新日志: https://continew.top/docs/admin/changelog/");
log.info("ContiNew Admin: 持续迭代优化的,高质量多租户中后台管理系统框架");
log.info("--------------------------------------------------------");
UserContext userContext = new UserContext();
userContext.setId(222L);
UserContextHolder.setContext(userContext);
log.info("userId: {}", UserContextHolder.getUserId());
SpringUtils.getProxy(this).async();
}
@Async
public void async() {
log.info("async: {}", UserContextHolder.getUserId());
}
}

View File

@@ -238,10 +238,6 @@ sa-token.extension:
justauth:
enabled: true
type:
WECHAT_OPEN:
client-id: wx4a**********bcc2
client-secret: 32e5*************************1ef
redirect-uri: ${application.url}/social/callback?source=wechat_open
GITEE:
client-id: 5d271b7f638941812aaf8bfc2e2f08f06d6235ef934e0e39537e2364eb8452c4
client-secret: 1f7d08**********5b7**********29e

View File

@@ -240,10 +240,6 @@ sa-token.extension:
justauth:
enabled: true
type:
WECHAT_OPEN:
client-id: wx4a**********bcc2
client-secret: 32e5*************************1ef
redirect-uri: ${application.url}/social/callback?source=wechat_open
GITEE:
client-id: 5d271b7f638941812aaf8bfc2e2f08f06d6235ef934e0e39537e2364eb8452c4
client-secret: 1f7d08**********5b7**********29e

View File

@@ -7,7 +7,7 @@ application:
description: 持续迭代优化的前后端分离中后台管理系统框架,开箱即用,持续提供舒适的开发体验。
# 版本
version: 4.1.0-SNAPSHOT
starter: 2.14.0
starter: 2.13.4
# 基本包
base-package: top.continew.admin
## 作者信息配置
@@ -142,11 +142,11 @@ continew-starter.web.response:
# 自定义成功响应码默认0
default-success-code: 0
# 自定义成功提示默认ok
default-success-msg: 操作成功
default-success-msg: ok
# 自定义失败响应码默认1
default-error-code: 1
# 自定义失败提示默认error
default-error-msg: 服务器异常,请联系管理员
default-error-msg: error
# 是否将原生异常错误信息填充到状态信息中
origin-exception-using-detail-message: false
# 响应类全名(配置后 response-style 将不再生效)

View File

@@ -16,7 +16,6 @@
package top.continew.admin.system.controller;
import cn.hutool.core.collection.CollUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
@@ -82,8 +81,8 @@ public class UserMessageController {
@GetMapping("/{id}")
public MessageDetailResp getMessage(@PathVariable Long id) {
MessageDetailResp detail = messageService.get(id);
CheckUtils.throwIf(detail == null || (NoticeScopeEnum.USER.equals(detail.getScope()) && !CollUtil
.contains(detail.getUsers(), UserContextHolder.getUserId().toString())), "消息不存在或无权限访问");
CheckUtils.throwIf(detail == null || (NoticeScopeEnum.USER.equals(detail.getScope()) && !detail.getUsers()
.contains(UserContextHolder.getUserId().toString())), "消息不存在或无权限访问");
messageService.readMessage(Collections.singletonList(id), UserContextHolder.getUserId());
detail.setIsRead(true);
return detail;

View File

@@ -29,11 +29,6 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public enum SocialSourceEnum {
/**
* 微信
*/
WECHAT_OPEN("微信"),
/**
* 码云
*/

View File

@@ -44,7 +44,6 @@ public class ClientQuery implements Serializable {
* 客户端类型
*/
@Schema(description = "客户端类型", example = "PC")
@Query(type = QueryType.EQ)
private String clientType;
/**
@@ -58,6 +57,5 @@ public class ClientQuery implements Serializable {
* 状态
*/
@Schema(description = "状态", example = "1")
@Query(type = QueryType.EQ)
private DisEnableStatusEnum status;
}

View File

@@ -49,6 +49,5 @@ public class DeptQuery implements Serializable {
* 状态
*/
@Schema(description = "状态", example = "1")
@Query(type = QueryType.EQ)
private DisEnableStatusEnum status;
}

View File

@@ -49,13 +49,11 @@ public class DictItemQuery implements Serializable {
* 状态
*/
@Schema(description = "状态", example = "1")
@Query(type = QueryType.EQ)
private DisEnableStatusEnum status;
/**
* 字典 ID
*/
@Schema(description = "字典 ID")
@Query(type = QueryType.EQ)
private Long dictId;
}

View File

@@ -49,13 +49,11 @@ public class FileQuery implements Serializable {
* 上级目录
*/
@Schema(description = "上级目录", example = "/")
@Query(type = QueryType.EQ)
private String parentPath;
/**
* 类型
*/
@Schema(description = "类型", example = "2")
@Query(type = QueryType.EQ)
private FileTypeEnum type;
}

View File

@@ -52,7 +52,6 @@ public class MenuQuery implements Serializable {
* 状态
*/
@Schema(description = "状态", example = "1")
@Query(type = QueryType.EQ)
private DisEnableStatusEnum status;
public MenuQuery(DisEnableStatusEnum status) {

View File

@@ -51,7 +51,6 @@ public class OptionQuery implements Serializable {
* 类别
*/
@Schema(description = "类别", example = "SITE")
@Query(type = QueryType.EQ)
@EnumValue(value = OptionCategoryEnum.class, message = "类别无效")
private String category;
}

View File

@@ -50,20 +50,19 @@ public class SmsConfigQuery implements Serializable {
* 厂商
*/
@Schema(description = "厂商", example = "cloopen")
@Query(type = QueryType.EQ)
@Query
private String supplier;
/**
* Access Key
*/
@Schema(description = "Access Key", example = "7aaf0708674db3ee05676ecbc2f31b7b")
@Query(type = QueryType.EQ)
@Query
private String accessKey;
/**
* 状态
*/
@Schema(description = "状态", example = "1")
@Query(type = QueryType.EQ)
private DisEnableStatusEnum status;
}

View File

@@ -20,7 +20,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import top.continew.admin.common.enums.SuccessFailureStatusEnum;
import top.continew.starter.data.annotation.Query;
import top.continew.starter.data.enums.QueryType;
import java.io.Serial;
import java.io.Serializable;
@@ -43,20 +42,20 @@ public class SmsLogQuery implements Serializable {
* 配置 ID
*/
@Schema(description = "配置 ID", example = "1")
@Query(type = QueryType.EQ)
@Query
private Long configId;
/**
* 手机号
*/
@Schema(description = "手机号", example = "18888888888")
@Query(type = QueryType.EQ)
@Query
private String phone;
/**
* 发送状态
*/
@Schema(description = "发送状态", example = "1")
@Query(type = QueryType.EQ)
@Query
private SuccessFailureStatusEnum status;
}

View File

@@ -50,13 +50,11 @@ public class StorageQuery implements Serializable {
* 状态
*/
@Schema(description = "状态", example = "1")
@Query(type = QueryType.EQ)
private DisEnableStatusEnum status;
/**
* 类型
*/
@Schema(description = "类型", example = "2")
@Query(type = QueryType.EQ)
private StorageTypeEnum type;
}

View File

@@ -81,15 +81,21 @@ public class MessageDetailResp implements Serializable {
@Schema(description = "通知用户", example = "[1,2]")
private List<String> users;
/**
* 创建时间
*/
@Schema(description = "创建时间", example = "2023-08-08 08:08:08", type = "string")
private LocalDateTime createTime;
/**
* 是否已读
*/
@Schema(description = "是否已读", example = "true")
private Boolean isRead;
/**
* 读取时间
*/
@Schema(description = "读取时间", example = "2023-08-08 23:59:59", type = "string")
private LocalDateTime readTime;
/**
* 创建时间
*/
@Schema(description = "创建时间", example = "2023-08-08 08:08:08", type = "string")
private LocalDateTime createTime;
}

View File

@@ -2,11 +2,6 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="top.continew.admin.system.mapper.MessageMapper">
<resultMap id="messageDetailMap" type="top.continew.admin.system.model.resp.message.MessageDetailResp">
<id column="id" property="id" />
<result property="users" column="users" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" />
</resultMap>
<select id="selectMessagePage" resultType="top.continew.admin.system.model.resp.message.MessageResp">
SELECT
t1.id,
@@ -14,16 +9,17 @@
t1.type,
t1.path,
t1.scope,
t1.users,
t1.create_time,
t2.read_time IS NOT NULL AS isRead,
t2.read_time AS readTime
FROM sys_message AS t1
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id <if test="query.userId != null">AND t2.user_id = #{query.userId}</if>
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id
<where>
<if test="query.userId != null">
<choose>
<when test="_databaseId == 'mysql'">
(t1.scope = 1 OR (t1.scope = 2 AND JSON_CONTAINS(t1.users, CONCAT('"', #{query.userId}, '"'))))
(t1.scope = 1 OR (t1.scope = 2 AND JSON_EXTRACT(t1.users, "$[0]") = CAST(#{query.userId} AS CHAR)))
</when>
<when test="_databaseId == 'pgsql'">
(t1.scope = 1 OR (t1.scope = 2 AND t1.users::jsonb @> jsonb_build_array(#{query.userId}::text)))
@@ -43,7 +39,7 @@
ORDER BY t1.create_time DESC
</select>
<select id="selectMessageById" resultMap="messageDetailMap">
<select id="selectMessageById" resultType="top.continew.admin.system.model.resp.message.MessageDetailResp">
SELECT
t1.id,
t1.title,
@@ -52,8 +48,11 @@
t1.path,
t1.scope,
t1.users,
t1.create_time
t1.create_time,
t2.read_time IS NOT NULL AS isRead,
t2.read_time AS readTime
FROM sys_message AS t1
LEFT JOIN sys_message_log AS t2 ON t2.message_id = t1.id
WHERE t1.id = #{id}
</select>

View File

@@ -13,7 +13,7 @@
<parent>
<groupId>top.continew.starter</groupId>
<artifactId>continew-starter</artifactId>
<version>2.14.0</version>
<version>2.14.0-SNAPSHOT</version>
</parent>
<groupId>top.continew.admin</groupId>