serv init
This commit is contained in:
13
.vscode/settings.json
vendored
Normal file
13
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
// 对所有文件生效
|
||||
"editor.tabSize": 2,
|
||||
// 仅对TS文件生效(优先级更高)
|
||||
"[typescript]": {
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[java]":{
|
||||
"editor.tabSize": 4
|
||||
},
|
||||
"maven.view": "hierarchical",
|
||||
"java.compile.nullAnalysis.mode": "automatic"
|
||||
}
|
||||
2
schoolNewsServ/.bin/mysql/sql/createDB.sql
Normal file
2
schoolNewsServ/.bin/mysql/sql/createDB.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- MySQL Script to create the database
|
||||
CREATE DATABASE IF NOT EXISTS `dlabeling` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
|
||||
174
schoolNewsServ/.bin/mysql/sql/createTablePermission.sql
Normal file
174
schoolNewsServ/.bin/mysql/sql/createTablePermission.sql
Normal file
@@ -0,0 +1,174 @@
|
||||
use dlabeling;
|
||||
-- 部门表
|
||||
DROP TABLE IF EXISTS `tb_sys_dept`;
|
||||
CREATE TABLE `tb_sys_dept` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'id',
|
||||
`dept_id` VARCHAR(50) NOT NULL COMMENT '部门ID',
|
||||
`name` VARCHAR(100) NOT NULL COMMENT '部门名称',
|
||||
`parent_id` VARCHAR(50) DEFAULT NULL COMMENT '父部门ID',
|
||||
`description` VARCHAR(255) DEFAULT NULL COMMENT '部门描述',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_dept_id` (`dept_id`),
|
||||
KEY `idx_dept_parent` (`parent_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_dept` (id,dept_id,name, description) VALUES ('1','default_department', '默认部门', '系统默认创建的部门');
|
||||
|
||||
-- 角色表
|
||||
DROP TABLE IF EXISTS `tb_sys_role`;
|
||||
CREATE TABLE `tb_sys_role` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'id',
|
||||
`role_id` VARCHAR(50) NOT NULL COMMENT '角色ID',
|
||||
`name` VARCHAR(100) NOT NULL COMMENT '角色名称',
|
||||
`description` VARCHAR(255) DEFAULT NULL COMMENT '角色描述',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_role_id` (`role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_role` (id,role_id, name, description) VALUES ('1','admin', '管理员', '系统管理员角色');
|
||||
|
||||
-- 部门-角色关联
|
||||
DROP TABLE IF EXISTS `tb_sys_dept_role`;
|
||||
CREATE TABLE `tb_sys_dept_role` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '部门角色ID',
|
||||
`dept_id` VARCHAR(50) NOT NULL COMMENT '部门ID',
|
||||
`role_id` VARCHAR(50) NOT NULL COMMENT '角色ID',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_dept_role` (`dept_id`, `role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_dept_role` (id, dept_id, role_id) VALUES ('1', 'default_department', 'admin');
|
||||
|
||||
-- 用户-角色关联
|
||||
DROP TABLE IF EXISTS `tb_sys_user_role`;
|
||||
CREATE TABLE `tb_sys_user_role` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '用户角色ID',
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID',
|
||||
`role_id` VARCHAR(50) NOT NULL COMMENT '角色ID',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_user_role` (`user_id`, `role_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_user_role` (id, user_id, role_id) VALUES ('1', '1', 'admin');
|
||||
|
||||
-- 权限表
|
||||
DROP TABLE IF EXISTS `tb_sys_permission`;
|
||||
CREATE TABLE `tb_sys_permission` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'id',
|
||||
`permission_id` VARCHAR(50) NOT NULL COMMENT '权限ID',
|
||||
`name` VARCHAR(100) NOT NULL COMMENT '权限名称',
|
||||
`code` VARCHAR(100) NOT NULL COMMENT '权限代码',
|
||||
`description` VARCHAR(255) DEFAULT NULL COMMENT '权限描述',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_permission_id` (`permission_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_permission` (id,permission_id, name, code, description) VALUES
|
||||
('1','perm_user_manage', '用户管理', 'user:manage', '用户管理权限'),
|
||||
('2','perm_role_manage', '角色管理', 'role:manage', '角色管理权限'),
|
||||
('3','perm_dept_manage', '部门管理', 'dept:manage', '部门管理权限'),
|
||||
('4','perm_permission_manage', '权限管理', 'permission:manage', '权限管理权限');
|
||||
|
||||
-- 角色-权限关联
|
||||
DROP TABLE IF EXISTS `tb_sys_role_permission`;
|
||||
CREATE TABLE `tb_sys_role_permission` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '角色权限ID',
|
||||
`role_id` VARCHAR(50) NOT NULL COMMENT '角色ID',
|
||||
`permission_id` VARCHAR(50) NOT NULL COMMENT '权限ID',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_role_permission` (`role_id`, `permission_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_role_permission` (id, role_id, permission_id) VALUES
|
||||
('1', 'admin', 'perm_user_manage'),
|
||||
('2', 'admin', 'perm_role_manage'),
|
||||
('3', 'admin', 'perm_dept_manage'),
|
||||
('4', 'admin', 'perm_permission_manage');
|
||||
|
||||
-- 菜单表
|
||||
DROP TABLE IF EXISTS `tb_sys_menu`;
|
||||
CREATE TABLE `tb_sys_menu` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT 'id',
|
||||
`menu_id` VARCHAR(50) NOT NULL COMMENT '菜单ID',
|
||||
`name` VARCHAR(100) NOT NULL COMMENT '菜单名称',
|
||||
`parent_id` VARCHAR(50) DEFAULT NULL COMMENT '父菜单ID',
|
||||
`url` VARCHAR(255) DEFAULT NULL COMMENT '菜单URL',
|
||||
`icon` VARCHAR(100) DEFAULT NULL COMMENT '菜单图标',
|
||||
`order_num` INT(4) DEFAULT 0 COMMENT '菜单排序号',
|
||||
`type` INT(4) DEFAULT 0 COMMENT '菜单类型(0目录 1菜单 2按钮)',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_menu_id` (`menu_id`),
|
||||
KEY `idx_menu_parent` (`parent_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
-- Insert default menus
|
||||
INSERT INTO `tb_sys_menu` (id,menu_id, name, parent_id, url, icon, order_num, type) VALUES
|
||||
('1','menu_dashboard', '仪表盘', NULL, '/dashboard', 'dashboard', 1, 1),
|
||||
('2','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 2, 1),
|
||||
('3','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 3, 1),
|
||||
('4','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 4, 1),
|
||||
('5','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 5, 1);
|
||||
|
||||
DROP TABLE IF EXISTS `tb_sys_menu_permission`;
|
||||
CREATE TABLE `tb_sys_menu_permission` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '菜单权限ID',
|
||||
`permission_id` VARCHAR(50) NOT NULL COMMENT '权限ID',
|
||||
`menu_id` VARCHAR(50) NOT NULL COMMENT '菜单ID',
|
||||
`creator` VARCHAR(50) DEFAULT NULL COMMENT '创建者',
|
||||
`updater` VARCHAR(50) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_menu_permission` (`menu_id`, `permission_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
-- Insert default role-menu associations for admin role
|
||||
INSERT INTO `tb_sys_menu_permission` (id, permission_id, menu_id) VALUES
|
||||
('1', 'admin', 'menu_dashboard'),
|
||||
('2', 'admin', 'menu_user_mgmt'),
|
||||
('3', 'admin', 'menu_role_mgmt'),
|
||||
('4', 'admin', 'menu_dept_mgmt'),
|
||||
('5', 'admin', 'menu_permission_mgmt');
|
||||
67
schoolNewsServ/.bin/mysql/sql/createTableUser.sql
Normal file
67
schoolNewsServ/.bin/mysql/sql/createTableUser.sql
Normal file
@@ -0,0 +1,67 @@
|
||||
use dlabeling;
|
||||
-- MySQL Script to create the user table
|
||||
DROP TABLE IF EXISTS `tb_sys_user`;
|
||||
CREATE TABLE `tb_sys_user` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '用户ID',
|
||||
`username` VARCHAR(50) NOT NULL COMMENT '用户名',
|
||||
`password` VARCHAR(128) NOT NULL COMMENT '密码(建议存储 bcrypt/argon2 哈希)',
|
||||
`email` VARCHAR(100) DEFAULT NULL COMMENT '电子邮件',
|
||||
`phone` VARCHAR(20) DEFAULT NULL COMMENT '电话号码',
|
||||
`wechat_id` VARCHAR(50) DEFAULT NULL COMMENT '微信ID',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
`status` INT(4) NOT NULL DEFAULT 1 COMMENT '状态',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_user_username` (`username`),
|
||||
UNIQUE KEY `uk_user_email` (`email`),
|
||||
KEY `idx_user_phone` (`phone`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
-- 推荐:把默认 admin 密码替换为已哈希的值
|
||||
INSERT INTO `tb_sys_user` (id, username, password, email) VALUES
|
||||
('1', 'admin', '123456', '3223905473@qq.com');
|
||||
|
||||
-- 用户信息表
|
||||
DROP TABLE IF EXISTS `tb_sys_user_info`;
|
||||
CREATE TABLE `tb_sys_user_info` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '用户信息ID',
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID',
|
||||
`avatar` VARCHAR(255) DEFAULT NULL COMMENT '头像',
|
||||
`gender` INT(4) DEFAULT 0 COMMENT '性别',
|
||||
`family_name` VARCHAR(50) DEFAULT NULL COMMENT '姓',
|
||||
`given_name` VARCHAR(50) DEFAULT NULL COMMENT '名',
|
||||
`full_name` VARCHAR(100) DEFAULT NULL COMMENT '全名',
|
||||
`id_card` VARCHAR(50) DEFAULT NULL COMMENT '身份证号',
|
||||
`address` VARCHAR(255) DEFAULT NULL COMMENT '地址',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`update_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`delete_time` TIMESTAMP NULL DEFAULT NULL COMMENT '删除时间',
|
||||
`deleted` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_user_info_user_id` (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
INSERT INTO `tb_sys_user_info` (id, user_id, full_name) VALUES ('1', '1', '管理员');
|
||||
|
||||
DROP TABLE IF EXISTS `tb_sys_login_log`;
|
||||
CREATE TABLE `tb_sys_login_log` (
|
||||
`id` VARCHAR(50) NOT NULL COMMENT '登录日志ID',
|
||||
`user_id` VARCHAR(50) NOT NULL COMMENT '用户ID',
|
||||
`username` VARCHAR(50) NOT NULL COMMENT '用户名',
|
||||
`ip_address` VARCHAR(45) DEFAULT NULL COMMENT 'IP地址',
|
||||
`ip_source` VARCHAR(100) DEFAULT NULL COMMENT 'IP来源',
|
||||
`browser` VARCHAR(100) DEFAULT NULL COMMENT '浏览器',
|
||||
`os` VARCHAR(100) DEFAULT NULL COMMENT '操作系统',
|
||||
`password` VARCHAR(100) DEFAULT NULL COMMENT '密码',
|
||||
`login_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '登录时间',
|
||||
`status` INT(4) DEFAULT 1 COMMENT '登录状态(0失败 1成功)',
|
||||
`error_count` INT(4) DEFAULT 0 COMMENT '错误次数',
|
||||
`message` VARCHAR(255) DEFAULT NULL COMMENT '登录消息',
|
||||
`create_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
PRIMARY KEY (`id`),
|
||||
index `idx_user_id` (`user_id`) USING BTREE,
|
||||
index `idx_login_time` (`login_time`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|
||||
|
||||
37
schoolNewsServ/.gitignore
vendored
Normal file
37
schoolNewsServ/.gitignore
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
HELP.md
|
||||
*/target
|
||||
*/*/target
|
||||
*.jar
|
||||
*.iml
|
||||
|
||||
.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
21
schoolNewsServ/admin/pom.xml
Normal file
21
schoolNewsServ/admin/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>admin</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
7
schoolNewsServ/admin/src/main/java/org/xyzh/Main.java
Normal file
7
schoolNewsServ/admin/src/main/java/org/xyzh/Main.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
21
schoolNewsServ/api/api-auth/pom.xml
Normal file
21
schoolNewsServ/api/api-auth/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api-auth</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.xyzh.api.auth.login;
|
||||
|
||||
import org.xyzh.common.core.domain.LoginParam;
|
||||
import org.xyzh.common.core.domain.LoginDomain;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
/**
|
||||
* @description LoginService.java文件描述 登录服务接口
|
||||
* @filename LoginService.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public interface LoginService {
|
||||
|
||||
/**
|
||||
* @description 登录
|
||||
* @param loginParam 登录参数
|
||||
* @return ResultDomain<String> 返回结果
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
ResultDomain<String> login(LoginParam loginParam);
|
||||
|
||||
/**
|
||||
* @description 退出登录
|
||||
* @param loginDomain 登录域
|
||||
* @return ResultDomain<String> 返回结果
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
ResultDomain<String> logout(LoginDomain loginDomain);
|
||||
|
||||
|
||||
}
|
||||
21
schoolNewsServ/api/api-system/pom.xml
Normal file
21
schoolNewsServ/api/api-system/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api-system</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,111 @@
|
||||
package org.xyzh.api.system.menu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
import org.xyzh.common.dto.menu.TbSysMenu;
|
||||
|
||||
/**
|
||||
* @description MenuRemoteService.java文件描述 菜单远程服务接口
|
||||
* @filename MenuRemoteService.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public interface MenuService {
|
||||
|
||||
/**
|
||||
* @description 添加菜单
|
||||
* @param menu 菜单对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void addMenu(TbSysMenu menu);
|
||||
|
||||
/**
|
||||
* @description 更新菜单
|
||||
* @param menu 菜单对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void updateMenu(TbSysMenu menu);
|
||||
|
||||
/**
|
||||
* @description 删除菜单
|
||||
* @param menuID 菜单ID
|
||||
* @param deep 是否深度删除(删除该菜单及其所有子菜单)
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void deleteMenu(String menuID, boolean deep);
|
||||
|
||||
/**
|
||||
* @description 导入菜单
|
||||
* @param menus 菜单列表
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void importMenus(List<TbSysMenu> menus);
|
||||
|
||||
/**
|
||||
* @description 导出菜单
|
||||
* @param filter 菜单对象
|
||||
* @return 菜单列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysMenu> exportMenus(TbSysMenu filter);
|
||||
|
||||
/**
|
||||
* @description 查找菜单
|
||||
* @param menu 菜单对象
|
||||
* @return 菜单对象
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
TbSysMenu find(TbSysMenu filter);
|
||||
|
||||
/**
|
||||
* @description 分页查找菜单
|
||||
* @param menu 菜单对象
|
||||
* @param pageParam 分页参数
|
||||
* @return 菜单列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysMenu> findPageMenus(TbSysMenu menu, PageParam pageParam);
|
||||
|
||||
/**
|
||||
* @description 根据菜单ID列表查找菜单
|
||||
* @param menuIDs 菜单ID列表
|
||||
* @return 菜单列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysMenu> findByIDs(List<String> menuIDs);
|
||||
|
||||
/**
|
||||
* @description 查找子菜单
|
||||
* @param parentID 父菜单ID
|
||||
* @return 子菜单列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysMenu> findChildListByParentID(String parentID);
|
||||
|
||||
/**
|
||||
* @description 查找所有菜单
|
||||
* @return 菜单列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysMenu> findAll();
|
||||
|
||||
List<TbSysMenu> permissionMenus(List<String> permissionIDList);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package org.xyzh.api.system.permission;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.xyzh.common.dto.permission.TbSysPermission;
|
||||
|
||||
/**
|
||||
* @description PermissionRemoteService.java文件描述 权限远程服务接口
|
||||
* @filename PermissionRemoteService.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public interface PermissionService {
|
||||
|
||||
/**
|
||||
* @description 添加权限
|
||||
* @param permission 权限对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void addPermission(TbSysPermission permission);
|
||||
|
||||
/**
|
||||
* @description 更新权限
|
||||
* @param permission 权限对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void updatePermission(TbSysPermission permission);
|
||||
|
||||
/**
|
||||
* @description 删除权限
|
||||
* @param permissionID 权限ID
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void deletePermission(String permissionID);
|
||||
|
||||
/**
|
||||
* @description 批量导入权限
|
||||
* @param permissions 权限列表
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void importPermissions(List<TbSysPermission> permissions);
|
||||
|
||||
/**
|
||||
* @description 条件导出权限
|
||||
* @param filter 权限对象
|
||||
* @return 权限列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysPermission> exportPermissions(TbSysPermission filter);
|
||||
|
||||
/**
|
||||
* @description 权限ID查询
|
||||
* @param permissionID 权限ID
|
||||
* @return 权限对象
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
TbSysPermission findByID(String permissionID);
|
||||
|
||||
/**
|
||||
* @description 批量权限ID查询
|
||||
* @param permissionIDs 权限ID列表
|
||||
* @return 权限对象列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysPermission> findByIDs(Collection<String> permissionIDs);
|
||||
|
||||
/**
|
||||
* @description 根据用户ID查询用户权限集合
|
||||
* @param userID 用户ID
|
||||
* @return 权限集合
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
Set<TbSysPermission> findUserPermissions(String userID);
|
||||
|
||||
/**
|
||||
* @description 根据角色ID查询角色权限集合
|
||||
* @param roleID 角色ID
|
||||
* @return 权限集合
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
Set<TbSysPermission> findRolePermissions(String roleID);
|
||||
|
||||
/**
|
||||
* @description 根据角色ID列表查询角色权限集合
|
||||
* @param roleIDList 角色ID列表
|
||||
* @return 权限集合
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
Set<TbSysPermission> findRolesPermissions(List<String> roleIDList);
|
||||
|
||||
/**
|
||||
* @description 判断用户是否拥有某个权限
|
||||
* @param userID 用户ID
|
||||
* @param permissionCode 权限编码
|
||||
* @return true-拥有;false-不拥有
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
boolean hasPermission(String userID, String permissionCode);
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package org.xyzh.api.system.role;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import org.xyzh.common.dto.role.TbSysRole;
|
||||
|
||||
|
||||
/**
|
||||
* @description RoleRemoteService.java文件描述 角色远程服务接口
|
||||
* @filename RoleRemoteService.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public interface RoleService {
|
||||
|
||||
/**
|
||||
* @description 添加角色
|
||||
* @param role 角色对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void addRole(TbSysRole role);
|
||||
|
||||
/**
|
||||
* @description 更新角色
|
||||
* @param role 角色对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void updateRole(TbSysRole role);
|
||||
|
||||
/**
|
||||
* @description 删除角色
|
||||
* @param roleID 角色ID
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void deleteRole(String roleID);
|
||||
|
||||
/**
|
||||
* @description 批量导入角色
|
||||
* @param roles 角色列表
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void importRoles(List<TbSysRole> roles);
|
||||
|
||||
/**
|
||||
* @description 条件导出角色
|
||||
* @param filter 角色对象
|
||||
* @return 角色列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysRole> exportRoles(TbSysRole filter);
|
||||
|
||||
/**
|
||||
* @description 通过主键查找
|
||||
* @param roleID 角色ID
|
||||
* @return 角色对象
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
TbSysRole findByID(String roleID);
|
||||
|
||||
/**
|
||||
* @description 批量通过主键查找
|
||||
* @param roleIDs 角色ID集合
|
||||
* @return 角色列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysRole> findByIDs(Collection<String> roleIDs);
|
||||
|
||||
/**
|
||||
* @description 根据用户ID查询用户角色列表
|
||||
* @param userID 用户ID
|
||||
* @return 角色列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysRole> findUserRoleList(String userID);
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package org.xyzh.api.system.user;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.xyzh.common.dto.user.TbSysUser;
|
||||
|
||||
/**
|
||||
* @description UserRemoteService.java文件描述 用户远程服务接口
|
||||
* @filename UserRemoteService.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public interface UserService {
|
||||
|
||||
/**
|
||||
* @description 添加用户
|
||||
* @param user 用户对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void addUser(TbSysUser user);
|
||||
|
||||
/**
|
||||
* @description 更新用户
|
||||
* @param user 用户对象
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void updateUser(TbSysUser user);
|
||||
|
||||
/**
|
||||
* @description 删除用户(逻辑或物理取决于实现)
|
||||
* @param userId 用户ID
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void deleteUser(String userID);
|
||||
|
||||
/**
|
||||
* @description 批量导入用户
|
||||
* @param users 用户列表
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
void importUsers(List<TbSysUser> users);
|
||||
|
||||
/**
|
||||
* @description 条件导出用户
|
||||
* @param filter 用户对象
|
||||
* @return 用户列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysUser> exportUsers(TbSysUser filter);
|
||||
|
||||
/**
|
||||
* @description 查找用户
|
||||
* @param filter 用户对象
|
||||
* @return 用户对象
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
TbSysUser find(TbSysUser filter);
|
||||
|
||||
/**
|
||||
* @description 通过主键集合查找用户列表
|
||||
* @param userIds 用户ID集合
|
||||
* @return 用户列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysUser> findByIDs(Collection<String> userIDs);
|
||||
|
||||
/**
|
||||
* @description 根据角色ID查询用户列表
|
||||
* @param roleId 角色ID
|
||||
* @return 用户列表
|
||||
* @author yslg
|
||||
* @since 2025-09-27
|
||||
*/
|
||||
List<TbSysUser> listUsersByRoleID(String roleID);
|
||||
}
|
||||
38
schoolNewsServ/api/pom.xml
Normal file
38
schoolNewsServ/api/pom.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>api-system</module>
|
||||
<module>api-auth</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-dto</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
21
schoolNewsServ/auth/pom.xml
Normal file
21
schoolNewsServ/auth/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>auth</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
7
schoolNewsServ/auth/src/main/java/org/xyzh/Main.java
Normal file
7
schoolNewsServ/auth/src/main/java/org/xyzh/Main.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
21
schoolNewsServ/common/common-annotation/pom.xml
Normal file
21
schoolNewsServ/common/common-annotation/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-annotation</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
27
schoolNewsServ/common/common-core/pom.xml
Normal file
27
schoolNewsServ/common/common-core/pom.xml
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-dto</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.xyzh.common.core.constant;
|
||||
|
||||
/**
|
||||
* @description Constants.java文件描述
|
||||
* @filename Constants.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class Constants {
|
||||
|
||||
/**
|
||||
* @description JSON_WHITELIST_STR JSON白名单
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public static final String JSON_WHITELIST_STR = "org.xyzh";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package org.xyzh.common.core.domain;
|
||||
|
||||
public class LoginDomain {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package org.xyzh.common.core.domain;
|
||||
|
||||
/**
|
||||
* @description LoginParam.java文件描述 登录参数
|
||||
* @filename LoginParam.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public class LoginParam {
|
||||
|
||||
/**
|
||||
* @description 邮箱
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* @description 密码
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
private String password;
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,404 @@
|
||||
package org.xyzh.common.core.domain;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.xyzh.common.core.page.PageDomain;
|
||||
import org.xyzh.common.core.page.PageParam;
|
||||
|
||||
/**
|
||||
* @description ResultDomain.java文件描述 统一返回结果实体类
|
||||
* @filename ResultDomain.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class ResultDomain<T> implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 状态码
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* @description 返回消息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* @description 操作是否成功
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private boolean success;
|
||||
|
||||
/**
|
||||
* @description 是否登录
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private boolean login;
|
||||
|
||||
/**
|
||||
* @description 是否有权限
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private boolean auth;
|
||||
|
||||
/**
|
||||
* @description 返回数据
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private T data;
|
||||
|
||||
/**
|
||||
* @description 返回数据列表
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private List<T> dataList;
|
||||
|
||||
/**
|
||||
* @description 分页参数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private PageParam pageParam;
|
||||
|
||||
/**
|
||||
* @description 分页信息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private PageDomain<T> pageDomain;
|
||||
|
||||
public ResultDomain() {
|
||||
}
|
||||
|
||||
public ResultDomain(int code, String message, T data) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public ResultDomain(int code, String message, List<T> dataList) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.dataList = dataList;
|
||||
}
|
||||
public ResultDomain(int code, String message, PageDomain<T> pageDomain) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.pageDomain = pageDomain;
|
||||
this.pageParam = pageDomain.getPageParam();
|
||||
this.dataList = pageDomain.getDataList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取状态码
|
||||
* @return int 状态码
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置状态码
|
||||
* @param code 状态码
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取返回消息
|
||||
* @return String 返回消息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置返回消息
|
||||
* @param message 返回消息
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取数据
|
||||
* @return T 数据
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置数据
|
||||
* @param data 数据
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取数据列表
|
||||
* @return List<T> 数据列表
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public List<T> getDataList() {
|
||||
return dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置数据列表
|
||||
* @param dataList 数据列表
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setDataList(List<T> dataList) {
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取分页参数
|
||||
* @return PageParam 分页参数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public PageParam getPageParam() {
|
||||
return pageParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置分页参数
|
||||
* @param pageParam 分页参数
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setPageParam(PageParam pageParam) {
|
||||
this.pageParam = pageParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取分页信息
|
||||
* @return PageDomain<T> 分页信息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public PageDomain<T> getPageDomain() {
|
||||
return pageDomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置分页信息
|
||||
* @param pageDomain 分页信息
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setPageDomain(PageDomain<T> pageDomain) {
|
||||
this.pageDomain = pageDomain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取成功标志
|
||||
* @return boolean 成功标志
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置成功标志
|
||||
* @param success 成功标志
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取登录标志
|
||||
* @return boolean 登录标志
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public boolean isLogin() {
|
||||
return login;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置登录标志
|
||||
* @param login 登录标志
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setLogin(boolean login) {
|
||||
this.login = login;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取权限标志
|
||||
* @return boolean 权限标志
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public boolean isAuth() {
|
||||
return auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置权限标志
|
||||
* @param auth 权限标志
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setAuth(boolean auth) {
|
||||
this.auth = auth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 操作成功
|
||||
* @param message 返回消息
|
||||
* @param data 返回数据
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void success(String message, T data) {
|
||||
this.code = HttpStatus.OK.value();
|
||||
this.message = message;
|
||||
this.success = true;
|
||||
this.auth = true;
|
||||
this.login = true;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 操作成功
|
||||
* @param message 返回消息
|
||||
* @param dataList 返回数据列表
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void success(String message, List<T> dataList) {
|
||||
this.code = HttpStatus.OK.value();
|
||||
this.message = message;
|
||||
this.success = true;
|
||||
this.auth = true;
|
||||
this.login = true;
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 操作成功
|
||||
* @param message 返回消息
|
||||
* @param pageDomain 返回分页信息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void success(String message, PageDomain<T> pageDomain) {
|
||||
this.code = HttpStatus.OK.value();
|
||||
this.message = message;
|
||||
this.success = true;
|
||||
this.auth = true;
|
||||
this.login = true;
|
||||
this.pageDomain = pageDomain;
|
||||
this.pageParam = pageDomain.getPageParam();
|
||||
this.dataList = pageDomain.getDataList();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 操作失败
|
||||
* @param message 返回消息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void fail(String message) {
|
||||
this.code = HttpStatus.BAD_REQUEST.value();
|
||||
this.message = message;
|
||||
this.success = false;
|
||||
this.auth = true;
|
||||
this.login = true;
|
||||
this.data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 操作失败
|
||||
* @param code 状态码
|
||||
* @param message 返回消息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void fail(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
this.success = false;
|
||||
this.auth = true;
|
||||
this.login = true;
|
||||
this.data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 未登录
|
||||
* @param message 返回消息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void noLogin(String message) {
|
||||
this.code = HttpStatus.UNAUTHORIZED.value();
|
||||
this.message = message;
|
||||
this.success = false;
|
||||
this.auth = false;
|
||||
this.login = false;
|
||||
this.data = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 无权限
|
||||
* @param message 返回消息
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void noAuth(String message) {
|
||||
this.code = HttpStatus.FORBIDDEN.value();
|
||||
this.message = message;
|
||||
this.success = false;
|
||||
this.auth = false;
|
||||
this.login = true;
|
||||
this.data = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package org.xyzh.common.core.entity;
|
||||
|
||||
import java.sql.Date;
|
||||
import java.io.Serializable;
|
||||
/**
|
||||
* @description BaseEntity.java文件描述 基础实体类
|
||||
* @filename BaseEntity.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description id 主键
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* @description 创建时间
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* @description 更新时间
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* @description 删除时间
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private Date deleteTime;
|
||||
|
||||
/**
|
||||
* @description 是否删除 0:未删除 1:已删除
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* @description 版本号
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
|
||||
/**
|
||||
* @description 备注
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package org.xyzh.common.core.entity;
|
||||
import java.util.List;
|
||||
import org.xyzh.common.core.enums.DataStatus;
|
||||
|
||||
/**
|
||||
* @description DataEntity.java文件描述 数据实体类
|
||||
* @filename DataEntity.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class DataEntity<T> extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 创建人ID
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String creatorID;
|
||||
|
||||
/**
|
||||
* @description 创建人名称
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* @description 更新人ID
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String updatorID;
|
||||
|
||||
/**
|
||||
* @description 更新人名称
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String updatorName;
|
||||
|
||||
/**
|
||||
* @description 删除人ID
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String deleterID;
|
||||
|
||||
/**
|
||||
* @description 删除人名称
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String deleterName;
|
||||
|
||||
/**
|
||||
* @description 所有者ID
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String ownerID;
|
||||
|
||||
/**
|
||||
* @description 所有者名称
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private String ownerName;
|
||||
|
||||
/**
|
||||
* @description 数据状态
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private DataStatus dataStatus;
|
||||
|
||||
/**
|
||||
* @description 是否可见
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private Boolean visible;
|
||||
|
||||
/**
|
||||
* @description 实体数据
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private T data;
|
||||
|
||||
/**
|
||||
* @description 实体数据列表
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private List<T> dataList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package org.xyzh.common.core.enums;
|
||||
|
||||
/**
|
||||
* @description DataStatus枚举类 数据状态枚举类
|
||||
* @filename DataStatus.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public enum DataStatus {
|
||||
|
||||
WAITING("0", "待处理", "数据待处理"),
|
||||
PROCESSING("1", "处理中", "数据处理中"),
|
||||
COMPLETED("2", "已完成", "数据已完成"),
|
||||
FAILED("3", "处理失败", "数据处理失败"),
|
||||
CANCELLED("4", "已取消", "数据已取消"),
|
||||
DELETED("5", "已删除", "数据已删除");
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
private final String description;
|
||||
|
||||
DataStatus(String code, String name, String description) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取枚举值
|
||||
* @param
|
||||
* @return String 枚举值
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取枚举名称
|
||||
* @return String 枚举名称
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取枚举描述
|
||||
* @return String 枚举描述
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package org.xyzh.common.core.enums;
|
||||
|
||||
public enum UserStatus {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package org.xyzh.common.core.page;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
/**
|
||||
* @description PageDomain.java文件描述 分页数据实体类
|
||||
* @filename PageDomain.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class PageDomain<T> implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 分页参数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private PageParam pageParam;
|
||||
|
||||
/**
|
||||
* @description 数据列表
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private List<T> dataList;
|
||||
|
||||
public PageDomain() {
|
||||
}
|
||||
|
||||
public PageDomain(PageParam pageParam, List<T> dataList) {
|
||||
this.pageParam = pageParam;
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
public PageDomain(int pageNumber, int pageSize, int totalPages, long totalElements, List<T> dataList) {
|
||||
this.pageParam = new PageParam(pageNumber, pageSize, totalPages, totalElements);
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置分页参数
|
||||
* @param pageParam 分页参数
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setPageParam(PageParam pageParam) {
|
||||
this.pageParam = pageParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取分页参数
|
||||
* @return PageParam 分页参数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public PageParam getPageParam() {
|
||||
return pageParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置数据列表
|
||||
* @param dataList 数据列表
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setDataList(List<T> dataList) {
|
||||
this.dataList = dataList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取数据列表
|
||||
* @return List<T> 数据列表
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public List<T> getDataList() {
|
||||
return dataList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package org.xyzh.common.core.page;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @description PageParam.java文件描述 分页参数
|
||||
* @filename PageParam.java
|
||||
* @author yslg
|
||||
* @copyright yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class PageParam implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 当前页码
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private int pageNumber;
|
||||
|
||||
/**
|
||||
* @description 每页显示数量
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private int pageSize;
|
||||
|
||||
/**
|
||||
* @description 总页数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private int totalPages;
|
||||
|
||||
/**
|
||||
* @description 总记录数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
private long totalElements;
|
||||
|
||||
public PageParam() {
|
||||
this.pageNumber = 1;
|
||||
this.pageSize = 10;
|
||||
this.totalPages = 0;
|
||||
this.totalElements = 0;
|
||||
}
|
||||
|
||||
public PageParam(int pageNumber, int pageSize) {
|
||||
this.pageNumber = pageNumber;
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public PageParam(int pageNumber, int pageSize, int totalPages, long totalElements) {
|
||||
this.pageNumber = pageNumber;
|
||||
this.pageSize = pageSize;
|
||||
this.totalPages = totalPages;
|
||||
this.totalElements = totalElements;
|
||||
}
|
||||
/**
|
||||
* @description 设置当前页码
|
||||
* @param pageNumber 当前页码
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setPageNumber(int pageNumber) {
|
||||
this.pageNumber = pageNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取当前页码
|
||||
* @return 当前页码
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public int getPageNumber() {
|
||||
return pageNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置每页显示数量
|
||||
* @param pageSize 每页显示数量
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setPageSize(int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取每页显示数量
|
||||
* @return 每页显示数量
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public int getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置总页数
|
||||
* @param totalPages 总页数
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setTotalPages(int totalPages) {
|
||||
this.totalPages = totalPages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取总页数
|
||||
* @return 总页数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public int getTotalPages() {
|
||||
return totalPages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置总记录数
|
||||
* @param totalElements 总记录数
|
||||
* @return void
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public void setTotalElements(long totalElements) {
|
||||
this.totalElements = totalElements;
|
||||
if (this.pageSize > 0) {
|
||||
this.totalPages = (int) ((totalElements + pageSize - 1) / pageSize);
|
||||
} else {
|
||||
this.totalPages = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取总记录数
|
||||
* @return 总记录数
|
||||
* @author yslg
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public long getTotalElements() {
|
||||
return totalElements;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
21
schoolNewsServ/common/common-dto/pom.xml
Normal file
21
schoolNewsServ/common/common-dto/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-dto</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,161 @@
|
||||
package org.xyzh.common.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Date;
|
||||
|
||||
|
||||
/**
|
||||
* @description BaseDTO.java文件描述
|
||||
* @filename BaseDTO.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-07
|
||||
*/
|
||||
public class BaseDTO implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description id 主键
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* @description 创建时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* @description 更新时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* @description 删除时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private Date deleteTime;
|
||||
|
||||
/**
|
||||
* @description 是否删除
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
|
||||
|
||||
public BaseDTO() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取ID
|
||||
* @return String ID
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public String getID() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置ID
|
||||
* @param id ID
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public void setID(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取创建时间
|
||||
* @return Date 创建时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置创建时间
|
||||
* @param createTime 创建时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取更新时间
|
||||
* @return Date 更新时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置更新时间
|
||||
* @param updateTime 更新时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取删除时间
|
||||
* @return Date 删除时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public Date getDeleteTime() {
|
||||
return deleteTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置删除时间
|
||||
* @param deleteTime 删除时间
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public void setDeleteTime(Date deleteTime) {
|
||||
this.deleteTime = deleteTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取是否删除
|
||||
* @return Integer 是否删除
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 设置是否删除
|
||||
* @param deleted 是否删除
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return "BaseDTO { id=" + id + ", createTime=" + createTime + ", updateTime=" + updateTime + ", deleteTime=" + deleteTime + ", deleted=" + deleted + " }";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package org.xyzh.common.dto.dept;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysDept.java文件描述 部门信息
|
||||
* @filename TbSysDept.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysDept extends BaseDTO{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 部门ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String deptID;
|
||||
|
||||
/**
|
||||
* @description 父部门ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String parentID;
|
||||
|
||||
/**
|
||||
* @description 部门名称
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @description 部门描述
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysDept{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", deptID='" + deptID + '\'' +
|
||||
", parentID='" + parentID + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package org.xyzh.common.dto.dept;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysDeptRole.java文件描述 部门角色关联信息
|
||||
* @filename TbSysDeptRole.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysDeptRole extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 部门ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String deptID;
|
||||
|
||||
/**
|
||||
* @description 角色ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String roleID;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public String updater;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysDeptRole{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", deptID='" + deptID + '\'' +
|
||||
", roleID='" + roleID + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
package org.xyzh.common.dto.log;
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysLoginLog.java文件描述 登录日志信息
|
||||
* @filename TbSysLoginLog.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysLoginLog extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 用户ID
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 用户名
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* @description 登录IP地址
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String ipAddress;
|
||||
|
||||
/**
|
||||
* @description IP来源
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String ipSource;
|
||||
|
||||
/**
|
||||
* @description 浏览器类型
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* @description 操作系统
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* @description 登录密码
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* @description 登录时间
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String loginTime;
|
||||
|
||||
/**
|
||||
* @description 登录状态(0失败 1成功)
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* @description 错误次数
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private Integer errorCount;
|
||||
|
||||
/**
|
||||
* @description 登录消息
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
private String message;
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public void setUserID(String userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public String getIpSource() {
|
||||
return ipSource;
|
||||
}
|
||||
|
||||
public void setIpSource(String ipSource) {
|
||||
this.ipSource = ipSource;
|
||||
}
|
||||
|
||||
public String getBrowser() {
|
||||
return browser;
|
||||
}
|
||||
|
||||
public void setBrowser(String browser) {
|
||||
this.browser = browser;
|
||||
}
|
||||
|
||||
public String getOs() {
|
||||
return os;
|
||||
}
|
||||
|
||||
public void setOs(String os) {
|
||||
this.os = os;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getLoginTime() {
|
||||
return loginTime;
|
||||
}
|
||||
|
||||
public void setLoginTime(String loginTime) {
|
||||
this.loginTime = loginTime;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getErrorCount() {
|
||||
return errorCount;
|
||||
}
|
||||
|
||||
public void setErrorCount(Integer errorCount) {
|
||||
this.errorCount = errorCount;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysLoginLog{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", userID='" + userID + '\'' +
|
||||
", username='" + username + '\'' +
|
||||
", ipAddress='" + ipAddress + '\'' +
|
||||
", ipSource='" + ipSource + '\'' +
|
||||
", browser='" + browser + '\'' +
|
||||
", os='" + os + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
", loginTime='" + loginTime + '\'' +
|
||||
", status=" + status +
|
||||
", errorCount=" + errorCount +
|
||||
", message='" + message + '\'' +
|
||||
", createTime='" + getCreateTime() + '\'' +
|
||||
", updateTime='" + getUpdateTime() + '\'' +
|
||||
", deleteTime='" + getDeleteTime() + '\'' +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
package org.xyzh.common.dto.menu;
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysMenu.java文件描述 菜单信息
|
||||
* @filename TbSysMenu.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysMenu extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 菜单ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String menuID;
|
||||
|
||||
/**
|
||||
* @description 父菜单ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String parentID;
|
||||
|
||||
/**
|
||||
* @description 菜单名称
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @description 菜单描述
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 菜单URL
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* @description 菜单图标
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* @description 菜单顺序
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* @description 菜单类型 0目录 1菜单 2按钮
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getMenuID() {
|
||||
return menuID;
|
||||
}
|
||||
|
||||
public void setMenuID(String menuID) {
|
||||
this.menuID = menuID;
|
||||
}
|
||||
|
||||
public String getParentID() {
|
||||
return parentID;
|
||||
}
|
||||
|
||||
public void setParentID(String parentID) {
|
||||
this.parentID = parentID;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public Integer getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public Integer getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Integer type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysMenu{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", menuID='" + menuID + '\'' +
|
||||
", parentID='" + parentID + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
", icon='" + icon + '\'' +
|
||||
", orderNum=" + orderNum +
|
||||
", type=" + type +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package org.xyzh.common.dto.menu;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysMenuPermission.java文件描述 菜单权限信息
|
||||
* @filename TbSysMenuPermission.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysMenuPermission extends BaseDTO{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 菜单ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String menuID;
|
||||
|
||||
/**
|
||||
* @description 权限ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String permissionID;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getMenuID() {
|
||||
return menuID;
|
||||
}
|
||||
|
||||
public void setMenuID(String menuID) {
|
||||
this.menuID = menuID;
|
||||
}
|
||||
|
||||
public String getPermissionID() {
|
||||
return permissionID;
|
||||
}
|
||||
|
||||
public void setPermissionID(String permissionID) {
|
||||
this.permissionID = permissionID;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysMenuPermission{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", menuID='" + menuID + '\'' +
|
||||
", permissionID='" + permissionID + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package org.xyzh.common.dto.permission;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysPermission.java文件描述 权限信息
|
||||
* @filename TbSysPermission.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysPermission extends BaseDTO{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 权限ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String permissionID;
|
||||
|
||||
/**
|
||||
* @description 权限名称
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @description 权限描述
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 权限编码
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getPermissionID() {
|
||||
return permissionID;
|
||||
}
|
||||
|
||||
public void setPermissionID(String permissionID) {
|
||||
this.permissionID = permissionID;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysPermission{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", permissionID='" + permissionID + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", code='" + code + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.xyzh.common.dto.role;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysRole.java文件描述 角色信息
|
||||
* @filename TbSysRole.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysRole extends BaseDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 角色ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String roleID;
|
||||
|
||||
/**
|
||||
* @description 角色名称
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @description 角色描述
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getRoleID() {
|
||||
return roleID;
|
||||
}
|
||||
|
||||
public void setRoleID(String roleID) {
|
||||
this.roleID = roleID;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysRole{" +
|
||||
"id='" + getID() + '\'' +
|
||||
",roleID='" + roleID + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.xyzh.common.dto.role;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
/**
|
||||
* @description TbSysRolePermission.java文件描述 角色权限关联信息
|
||||
* @filename TbSysRolePermission.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public class TbSysRolePermission extends BaseDTO{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 角色ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String roleID;
|
||||
|
||||
/**
|
||||
* @description 权限ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String permissionID;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2025-09-16
|
||||
*/
|
||||
public String updater;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysRolePermission{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", roleID='" + roleID + '\'' +
|
||||
", permissionID='" + permissionID + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package org.xyzh.common.dto.user;
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysUser.java文件描述
|
||||
* @filename TbSysUser.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
public class TbSysUser extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 用户名
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* @description 密码
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* @description 邮箱
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* @description 手机号
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* @description 微信号
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private String wechatID;
|
||||
|
||||
/**
|
||||
* @description 用户状态
|
||||
* @author yslg
|
||||
* @since 2025-09-10
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getWechatID() {
|
||||
return wechatID;
|
||||
}
|
||||
|
||||
public void setWechatID(String wechatID) {
|
||||
this.wechatID = wechatID;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysUser{" +
|
||||
"id=" + getID() +
|
||||
", username='" + username + '\'' +
|
||||
", password='" + password + '\'' +
|
||||
", email='" + email + '\'' +
|
||||
", phone='" + phone + '\'' +
|
||||
", wechatID='" + wechatID + '\'' +
|
||||
", status=" + status +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
package org.xyzh.common.dto.user;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysUserInfo.java文件描述 用户信息
|
||||
* @filename TbSysUserInfo.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
public class TbSysUserInfo extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 用户ID
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 头像
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* @description 性别(0-未知,1-女,2-男)
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private Integer gender;
|
||||
|
||||
/**
|
||||
* @description 姓
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String familyName;
|
||||
|
||||
/**
|
||||
* @description 名
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String givenName;
|
||||
|
||||
/**
|
||||
* @description 全名
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String fullName;
|
||||
|
||||
/**
|
||||
* @description ID卡号
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* @description 地址
|
||||
* @author yslg
|
||||
* @since 2025-09-11
|
||||
*/
|
||||
private String address;
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public void setUserID(String userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public Integer getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(Integer gender) {
|
||||
this.gender = gender;
|
||||
}
|
||||
|
||||
public String getFamilyName() {
|
||||
return familyName;
|
||||
}
|
||||
|
||||
public void setFamilyName(String familyName) {
|
||||
this.familyName = familyName;
|
||||
}
|
||||
|
||||
public String getGivenName() {
|
||||
return givenName;
|
||||
}
|
||||
|
||||
public void setGivenName(String givenName) {
|
||||
this.givenName = givenName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysUserInfo{" +
|
||||
"id=" + getID() +
|
||||
", userID='" + userID + '\'' +
|
||||
", avatar='" + avatar + '\'' +
|
||||
", gender=" + gender +
|
||||
", familyName='" + familyName + '\'' +
|
||||
", givenName='" + givenName + '\'' +
|
||||
", fullName='" + fullName + '\'' +
|
||||
", idCard='" + idCard + '\'' +
|
||||
", address='" + address + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package org.xyzh.common.dto.user;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description TbSysUserRole.java文件描述 用户角色
|
||||
* @filename TbSysUserRole.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-26
|
||||
*/
|
||||
public class TbSysUserRole extends BaseDTO{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 用户ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 角色ID
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String roleID;
|
||||
|
||||
/**
|
||||
* @description 创建人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新人
|
||||
* @author yslg
|
||||
* @since 2024-06
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public void setUserID(String userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getRoleID() {
|
||||
return roleID;
|
||||
}
|
||||
|
||||
public void setRoleID(String roleID) {
|
||||
this.roleID = roleID;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbSysUserRole{" +
|
||||
"id='" + getID() + '\'' +
|
||||
", userID='" + userID + '\'' +
|
||||
", roleID='" + roleID + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
", updater='" + updater + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleteTime=" + getDeleteTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
21
schoolNewsServ/common/common-exception/pom.xml
Normal file
21
schoolNewsServ/common/common-exception/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-exception</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
22
schoolNewsServ/common/common-jdbc/pom.xml
Normal file
22
schoolNewsServ/common/common-jdbc/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-jdbc</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
21
schoolNewsServ/common/common-redis/pom.xml
Normal file
21
schoolNewsServ/common/common-redis/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-redis</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
21
schoolNewsServ/common/common-util/pom.xml
Normal file
21
schoolNewsServ/common/common-util/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-util</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
78
schoolNewsServ/common/pom.xml
Normal file
78
schoolNewsServ/common/pom.xml
Normal file
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>common-core</module>
|
||||
<module>common-dto</module>
|
||||
<module>common-annotation</module>
|
||||
<module>common-exception</module>
|
||||
<module>common-redis</module>
|
||||
<module>common-jdbc</module>
|
||||
<module>common-util</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<version>${jakarta.servlet.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-dto</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-annotation</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-exception</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-redis</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-jdbc</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common-util</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
21
schoolNewsServ/news/pom.xml
Normal file
21
schoolNewsServ/news/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
7
schoolNewsServ/news/src/main/java/org/xyzh/Main.java
Normal file
7
schoolNewsServ/news/src/main/java/org/xyzh/Main.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
209
schoolNewsServ/pom.xml
Normal file
209
schoolNewsServ/pom.xml
Normal file
@@ -0,0 +1,209 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<modules>
|
||||
<module>api</module>
|
||||
<module>auth</module>
|
||||
<module>system</module>
|
||||
<module>common</module>
|
||||
<module>admin</module>
|
||||
<module>news</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<school-news.version>1.0.0</school-news.version>
|
||||
<java.version>21</java.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
<spring-framework.version>6.2.10</spring-framework.version>
|
||||
<spring-boot.version>3.5.6</spring-boot.version>
|
||||
<spring-cloud.version>2025.0.0</spring-cloud.version>
|
||||
<spring-cloud-alibaba.version>2025.0.0.0-preview</spring-cloud-alibaba.version>
|
||||
|
||||
<!-- 数据库依赖 -->
|
||||
<mysql.version>9.4.0</mysql.version>
|
||||
<hikaricp.version>7.0.2</hikaricp.version>
|
||||
|
||||
<fastjson.version>2.0.58</fastjson.version>
|
||||
<jakarta.servlet.version>6.1.0</jakarta.servlet.version>
|
||||
|
||||
<lombok.version>1.18.40</lombok.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- school-news 系统 -->
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>auth</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</dependency>
|
||||
<!-- Spring相关依赖 -->
|
||||
<!-- 覆盖SpringFramework的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>${spring-framework.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- SpringBoot 依赖配置 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- SpringCloud 微服务 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring-cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba 微服务 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${spring-cloud-alibaba.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
|
||||
<!-- 数据库 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jdbc</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
<version>${hikaricp.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON 解析器和生成器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jakarta.servlet</groupId>
|
||||
<artifactId>jakarta.servlet-api</artifactId>
|
||||
<version>${jakarta.servlet.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</project>
|
||||
21
schoolNewsServ/system/pom.xml
Normal file
21
schoolNewsServ/system/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>school-news</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.xyzh</groupId>
|
||||
<artifactId>system</artifactId>
|
||||
<version>${school-news.version}</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
7
schoolNewsServ/system/src/main/java/org/xyzh/Main.java
Normal file
7
schoolNewsServ/system/src/main/java/org/xyzh/Main.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package org.xyzh;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user