chore: 合并 master 分支

This commit is contained in:
Ray.Hao
2025-03-06 20:43:05 +08:00
41 changed files with 633 additions and 1037 deletions

View File

@@ -2,11 +2,6 @@ server:
port: 8989
spring:
jackson:
## 默认序列化时间格式
date-format: yyyy-MM-dd HH:mm:ss
## 默认序列化时区
time-zone: GMT+8
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
@@ -40,6 +35,8 @@ spring:
time-to-live: 3600000
# 缓存null值防止缓存穿透
cache-null-values: true
caffeine:
spec: initialCapacity=50,maximumSize=1000,expireAfterWrite=600s
# 邮件配置
mail:
host: smtp.youlai.tech
@@ -81,9 +78,9 @@ security:
jwt:
# JWT 秘钥
key: SecretKey012345678901234567890123456789012345678901234567890123456789
# 访问令牌 有效期(单位:秒),默认 1 小时
# 访问令牌 有效期(单位:秒),默认 1 小时-1 表示永不过期
access-token-time-to-live: 3600
# 刷新令牌有效期(单位:秒),默认 7 天
# 刷新令牌有效期(单位:秒),默认 7 天-1 表示永不过期
refresh-token-time-to-live: 604800
# 无需认证的请求路径
redis-token:

View File

@@ -2,11 +2,6 @@ server:
port: 8989
spring:
jackson:
## 默认序列化时间格式
date-format: yyyy-MM-dd HH:mm:ss
## 默认序列化时区
time-zone: GMT+8
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
@@ -39,6 +34,8 @@ spring:
time-to-live: 3600000
# 缓存null值防止缓存穿透
cache-null-values: true
caffeine:
spec: initialCapacity=50,maximumSize=1000,expireAfterWrite=600s
# 邮件配置
mail:
host: smtp.youlai.tech
@@ -53,7 +50,6 @@ spring:
enable: true
# 邮件发送者
from: youlaitech@163.com
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
global-config:
@@ -80,9 +76,9 @@ security:
jwt:
# JWT 秘钥
key: SecretKey012345678901234567890123456789012345678901234567890123456789
# 访问令牌 有效期(单位:秒),默认 1 小时
# 访问令牌 有效期(单位:秒),默认 1 小时-1 表示永不过期
access-token-time-to-live: 3600
# 刷新令牌有效期(单位:秒),默认 7 天
# 刷新令牌有效期(单位:秒),默认 7 天-1 表示永不过期
refresh-token-time-to-live: 604800
# 无需认证的请求路径
ignore-urls:

View File

@@ -14,6 +14,7 @@
u.gender,
u.avatar,
u.STATUS,
u.email,
d.NAME AS dept_name,
GROUP_CONCAT( r.NAME ) AS roleNames,
u.create_time
@@ -23,7 +24,9 @@
LEFT JOIN sys_user_role sur ON u.id = sur.user_id
LEFT JOIN sys_role r ON sur.role_id = r.id
<where>
u.is_deleted = 0 AND u.username != 'root'
u.is_deleted = 0
<!-- 超级管理员不显示在列表 -->
AND r.code != '${@com.youlai.boot.common.constant.SystemConstants@ROOT_ROLE_CODE}'
<if test='queryParams.keywords!=null and queryParams.keywords.trim() neq ""'>
AND (
u.username LIKE CONCAT('%',#{queryParams.keywords},'%')
@@ -37,12 +40,6 @@
<if test='queryParams.deptId!=null'>
AND concat(',',concat(d.tree_path,',',d.id),',') like concat('%,',#{queryParams.deptId},',%')
</if>
<if test='queryParams.roleIds!=null and queryParams.roleIds.size > 0'>
AND sur.role_id in
<foreach collection="queryParams.roleIds" item="roleId" open="(" close=")" separator=",">
#{roleId}
</foreach>
</if>
<if test="queryParams.createTime != null and queryParams.createTime.size > 0">
<if test="queryParams.createTime[0] != null and queryParams.createTime[0] != ''">
<bind name="startDate" value="queryParams.createTime[0].length() == 10 ? queryParams.createTime[0] + ' 00:00:00' : queryParams.createTime[0]"/>
@@ -117,9 +114,9 @@
<result property="username" column="username" jdbcType="VARCHAR"/>
<result property="password" column="password" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="BOOLEAN"/>
<result property="deptId" column="dept_id" jdbcType="BIGINT"></result>
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
<collection property="roles" ofType="string" javaType="java.util.Set">
<result column="code"></result>
<result column="code" />
</collection>
</resultMap>
@@ -182,18 +179,15 @@
u.username,
u.nickname,
u.mobile,
CASE u.gender
WHEN 1 THEN '男'
WHEN 2 THEN '女'
ELSE '保密'
END gender,
u.email,
u.gender,
d.NAME AS dept_name,
u.create_time
FROM
sys_user u
LEFT JOIN sys_dept d ON u.dept_id = d.id
<where>
u.is_deleted = 0 AND u.username != 'root'
u.is_deleted = 0
<if test='keywords!=null and keywords.trim() neq ""'>
AND (u.username LIKE CONCAT('%',#{keywords},'%')
OR u.nickname LIKE CONCAT('%',#{keywords},'%')
@@ -219,6 +213,7 @@
u.gender,
u.avatar,
u.STATUS,
u.email,
d.NAME AS deptName,
GROUP_CONCAT(r.NAME) AS roleNames,
u.create_time

View File

@@ -7,6 +7,7 @@ import lombok.Getter;
import lombok.Setter;
#if(${hasLocalDateTime})
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
#end
#if(${hasBigDecimal})
import java.math.BigDecimal;
@@ -46,6 +47,9 @@ public class ${entityName}Form implements Serializable {
#if($fieldConfig.maxLength)
@Size(max=$fieldConfig.maxLength, message="$fieldConfig.fieldComment长度不能超过${fieldConfig.maxLength}个字符")
#end
#if($fieldConfig.fieldType == 'LocalDateTime')
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
#end
private ${fieldConfig.fieldType} ${fieldConfig.fieldName};
#end