chore: 删除启动横幅并将英文注释改为中文

- 移除启动横幅文件与定时任务配置里的英文说明
- 密码认证与角色禁用会话失效处的注释改为中文
- 代码生成的列类型处理注释改为中文,去掉重复的类型列举
- 初始化脚本的表结构与表数据注释改为中文
This commit is contained in:
Ray.Hao
2026-09-27 21:26:44 +08:00
parent 607b6c7bb3
commit 1243a311e0
9 changed files with 29 additions and 54 deletions

View File

@@ -11,7 +11,7 @@ SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for form_definition
-- 表结构:form_definition
-- ----------------------------
DROP TABLE IF EXISTS `form_definition`;
CREATE TABLE `form_definition` (
@@ -36,7 +36,7 @@ CREATE TABLE `form_definition` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单定义表';
-- ----------------------------
-- Table structure for form_data
-- 表结构:form_data
-- ----------------------------
DROP TABLE IF EXISTS `form_data`;
CREATE TABLE `form_data` (
@@ -55,7 +55,7 @@ CREATE TABLE `form_data` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='表单数据表';
-- ----------------------------
-- Table structure for form_snapshot
-- 表结构:form_snapshot
-- ----------------------------
-- 版本快照表:发布时固化规则,数据回显按提交时版本加载,
-- 防止表单定义变更(字段删除/改名)导致历史数据回显漂移;

View File

@@ -18,7 +18,7 @@ SET NAMES utf8mb4; # 设置字符集
SET FOREIGN_KEY_CHECKS = 0; # 关闭外键检查,加快导入速度
-- ----------------------------
-- Table structure for sys_dept
-- 表结构:sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
@@ -39,14 +39,14 @@ CREATE TABLE `sys_dept` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '部门管理表';
-- ----------------------------
-- Records of sys_dept
-- 表数据:sys_dept
-- ----------------------------
INSERT INTO `sys_dept` VALUES (1, '有来技术', 'YOULAI', 0, '0', 1, 1, 1, NULL, 1, now(), 0);
INSERT INTO `sys_dept` VALUES (2, '研发部门', 'RD001', 1, '0,1', 1, 1, 2, NULL, 2, now(), 0);
INSERT INTO `sys_dept` VALUES (3, '测试部门', 'QA001', 1, '0,1', 1, 1, 2, NULL, 2, now(), 0);
-- ----------------------------
-- Table structure for sys_dict
-- 表结构:sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
@@ -64,7 +64,7 @@ CREATE TABLE `sys_dict` (
KEY `idx_dict_code` (`dict_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典表';
-- ----------------------------
-- Records of sys_dict
-- 表数据:sys_dict
-- ----------------------------
INSERT INTO `sys_dict` VALUES (1, 'gender', '性别', 1, NULL, now(), 1, now(), 1, 0);
INSERT INTO `sys_dict` VALUES (2, 'notice_type', '通知类型', 1, NULL, now(), 1, now(), 1, 0);
@@ -72,7 +72,7 @@ INSERT INTO `sys_dict` VALUES (3, 'notice_level', '通知级别', 1, NULL, now()
-- ----------------------------
-- Table structure for sys_dict_item
-- 表结构:sys_dict_item
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
@@ -94,7 +94,7 @@ CREATE TABLE `sys_dict_item` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='字典项表';
-- ----------------------------
-- Records of sys_dict_item
-- 表数据:sys_dict_item
-- ----------------------------
INSERT INTO `sys_dict_item` VALUES (1, 'gender', '1', '男', 'primary', 1, 1, NULL, now(), 1, now(), 1, 0);
INSERT INTO `sys_dict_item` VALUES (2, 'gender', '2', '女', 'danger', 1, 2, NULL, now(), 1, now(), 1, 0);
@@ -110,7 +110,7 @@ INSERT INTO `sys_dict_item` VALUES (11, 'notice_level', 'M', '中', 'warning', 1
INSERT INTO `sys_dict_item` VALUES (12, 'notice_level', 'H', '高', 'danger', 1, 3, '', now(), 1, now(), 1, 0);
-- ----------------------------
-- Table structure for sys_menu
-- 表结构:sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
@@ -136,7 +136,7 @@ CREATE TABLE `sys_menu` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统菜单表';
-- ----------------------------
-- Records of sys_menu
-- 表数据:sys_menu
-- ----------------------------
-- 顶级菜单(基础段 ID=sort 1-7):系统管理(1)/数据大屏(2)/代码生成(3)/通用组件(4)/多级菜单(5)/路由示例(6)/项目资源(7)
-- 扩展段 8-99 由 sql/extensions/ 脚本占用:动态表单(8,dynamic-form.sql)/工作流(9,workflow.sql),新扩展模块从 10 领号顺延
@@ -264,7 +264,7 @@ INSERT INTO `sys_menu` (`id`, `parent_id`, `tree_path`, `name`, `type`, `route_n
INSERT INTO `sys_menu` (`id`, `parent_id`, `tree_path`, `name`, `type`, `route_name`, `route_path`, `component`, `perm`, `keep_alive`, `visible`, `sort`, `icon`, `redirect`, `create_time`, `update_time`, `params`) VALUES (604, 6, '0,6', '页面跳转', 'M', 'RouteNavigate', 'navigate', 'demo/route/navigate/index', NULL, 1, 1, 4, 'el-icon-Position', NULL, now(), now(), NULL);
-- ----------------------------
-- Table structure for sys_role
-- 表结构:sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
@@ -285,7 +285,7 @@ CREATE TABLE `sys_role` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统角色表';
-- ----------------------------
-- Records of sys_role
-- 表数据:sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'ROOT', 1, 1, 1, NULL, now(), NULL, now(), 0);
INSERT INTO `sys_role` VALUES (2, '系统管理员', 'ADMIN', 2, 1, 1, NULL, now(), NULL, NULL, 0);
@@ -296,7 +296,7 @@ INSERT INTO `sys_role` VALUES (6, '普通员工', 'EMPLOYEE', 6, 1, 4, NULL, now
INSERT INTO `sys_role` VALUES (7, '自定义权限用户', 'CUSTOM_USER', 7, 1, 5, NULL, now(), NULL, now(), 0);
-- ----------------------------
-- Table structure for sys_role_menu
-- 表结构:sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
@@ -306,7 +306,7 @@ CREATE TABLE `sys_role_menu` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '角色菜单关联表';
-- ----------------------------
-- Table structure for sys_role_dept
-- 表结构:sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_dept`;
CREATE TABLE `sys_role_dept` (
@@ -316,7 +316,7 @@ CREATE TABLE `sys_role_dept` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '角色部门关联表';
-- ----------------------------
-- Records of sys_role_dept
-- 表数据:sys_role_dept
-- ----------------------------
INSERT IGNORE INTO `sys_role_dept` VALUES (7, 1);
INSERT IGNORE INTO `sys_role_dept` VALUES (7, 2);
@@ -362,7 +362,7 @@ INSERT INTO `sys_role_menu` VALUES (2, 601), (2, 602), (2, 603), (2, 604);
INSERT INTO `sys_role_menu` VALUES (2, 201), (2, 202), (2, 203);
-- ----------------------------
-- Table structure for sys_user
-- 表结构:sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
@@ -385,7 +385,7 @@ CREATE TABLE `sys_user` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '系统用户表';
-- ----------------------------
-- Records of sys_user
-- 表数据:sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 'youlai', '有来技术', 0, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', NULL, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345677', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0);
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', 1, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18888888888', 1, 'youlaitech@163.com', now(), NULL, now(), NULL, 0);
@@ -396,7 +396,7 @@ INSERT INTO `sys_user` VALUES (6, 'employee', '普通员工', 1, '$2a$10$xVWsNOh
INSERT INTO `sys_user` VALUES (7, 'custom_user', '自定义权限用户', 1, '$2a$10$xVWsNOhHrCxh5UbpCE7/HuJ.PAOKcYAqRxD2CO2nVnJS.IAXkr5aq', 3, 'https://foruda.gitee.com/images/1723603502796844527/03cdca2a_716974.gif', '18812345683', 1, 'custom@youlaitech.com', now(), NULL, now(), NULL, 0);
-- ----------------------------
-- Table structure for sys_user_role
-- 表结构:sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
@@ -406,7 +406,7 @@ CREATE TABLE `sys_user_role` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COMMENT = '用户角色关联表';
-- ----------------------------
-- Records of sys_user_role
-- 表数据:sys_user_role
-- ----------------------------
INSERT IGNORE INTO `sys_user_role` VALUES (1, 1);
INSERT IGNORE INTO `sys_user_role` VALUES (2, 2);
@@ -418,7 +418,7 @@ INSERT IGNORE INTO `sys_user_role` VALUES (7, 7);
-- ----------------------------
-- Table structure for sys_log
-- 表结构:sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
@@ -448,7 +448,7 @@ CREATE TABLE `sys_log` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='系统操作日志表';
-- ----------------------------
-- Table structure for gen_table
-- 表结构:gen_table
-- ----------------------------
DROP TABLE IF EXISTS `gen_table`;
CREATE TABLE `gen_table` (
@@ -470,7 +470,7 @@ CREATE TABLE `gen_table` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='代码生成配置表';
-- ----------------------------
-- Table structure for gen_table_column
-- 表结构:gen_table_column
-- ----------------------------
DROP TABLE IF EXISTS `gen_table_column`;
CREATE TABLE `gen_table_column` (
@@ -603,7 +603,7 @@ INSERT INTO `sys_user_notice` VALUES (28, 9, 3, 1, NULL, now(), now(), 0);
INSERT INTO `sys_user_notice` VALUES (29, 10, 3, 0, NULL, now(), now(), 0);
-- ----------------------------
-- Table structure for sys_user_social
-- 表结构:sys_user_social
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_social`;
CREATE TABLE `sys_user_social` (

View File

@@ -37,11 +37,6 @@ public class PasswordAuthService {
new UsernamePasswordAuthenticationToken(username.trim(), password);
// 2. 执行认证(认证中)
// 说明:这里的认证流程由 Spring Security 提供的 AuthenticationManager 执行。
// 默认情况下会委托给 DaoAuthenticationProvider:
// 1) retrieveUser(...):内部通过 UserDetailsService.loadUserByUsername(...) 获取用户信息(本项目为 SecurityUserDetailsService 实现)
// 2) additionalAuthenticationChecks(...):对比请求密码与用户存储密码(由 PasswordEncoder 完成匹配)
// 认证通过后返回已认证的 Authentication(principal 为 SecurityUserDetails,authorities 为角色/权限集合)。
Authentication authentication = authenticationManager.authenticate(authenticationToken);
// 3. 认证成功后生成 JWT 令牌,并存入 Security 上下文,供登录日志 AOP 使用(已认证)

View File

@@ -93,15 +93,15 @@ public enum JavaTypeEnum {
if (columnType == null) {
return "";
}
// Handle values like: varchar(255), bigint unsigned, INT
// 处理 varchar(255)、bigint unsigned、INT 等列类型写法
String normalized = columnType.trim().toLowerCase();
int parenIndex = normalized.indexOf('(');
if (parenIndex > -1) {
normalized = normalized.substring(0, parenIndex);
}
// Remove modifiers
// 去除修饰符
normalized = normalized.replace("unsigned", "").replace("zerofill", "").trim();
// Collapse repeated spaces
// 合并连续空格
normalized = normalized.replaceAll("\\s+", " ");
return normalized;
}

View File

@@ -155,12 +155,8 @@ public class CodegenServiceImpl implements CodegenService {
String effectiveTemplatePath = resolveFrontendTemplatePath(templateName, templateConfig, frontendType);
String extension = resolveFrontendExtension(templateName, templateConfig, frontendType);
/* 1. 生成文件名 UserController */
// User Role Menu Dept
/* 1. 生成文件名 */
String entityName = genTable.getEntityName();
// Controller Service Mapper Entity
// .java .ts .vue
// 文件名 UserController.java
String fileName = getFileName(entityName, templateName, extension);

View File

@@ -8,7 +8,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* xxl-job config
*
* @author xuxueli 2017-04-28
*/

View File

@@ -2,8 +2,6 @@ package com.youlai.boot.system.model.form;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
// import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

View File

@@ -229,7 +229,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements Ro
// 刷新角色的权限缓存
roleMenuService.refreshRolePermsCache(role.getCode());
// When role is disabled, invalidate sessions of all users with this role
// 角色禁用时使该角色下所有用户的会话失效
if (status == 0) {
List<Long> userIds = userRoleService.listUserIdsByRoleId(roleId);
for (Long userId : userIds) {

View File

@@ -1,13 +0,0 @@
${AnsiColor.BRIGHT_BLUE}
__ __ _ _
\ \ / / | | (_)
\ \_/ /__ _ _ | | __ _ _
\ / _ \| | | | | | / _` | |
| | (_) | |_| | | |___| (_| | |
|_|\___/ \__,_| |______\__,_|_|
${AnsiColor.BRIGHT_GREEN}
Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
有来官网: https://www.youlai.tech/
版权所属: 有来开源组织
${AnsiColor.BRIGHT_BLUE}