diff --git a/schoolNewsServ/.bin/mysql/sql/createTablePermission.sql b/schoolNewsServ/.bin/mysql/sql/createTablePermission.sql index f50ad63..a91c036 100644 --- a/schoolNewsServ/.bin/mysql/sql/createTablePermission.sql +++ b/schoolNewsServ/.bin/mysql/sql/createTablePermission.sql @@ -58,10 +58,11 @@ CREATE TABLE `tb_sys_dept_role` ( 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` ( +DROP TABLE IF EXISTS `tb_sys_user_dept_role`; +CREATE TABLE `tb_sys_user_dept_role` ( `id` VARCHAR(50) NOT NULL COMMENT '用户角色ID', `user_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 '更新者', @@ -70,10 +71,10 @@ CREATE TABLE `tb_sys_user_role` ( `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`) + UNIQUE KEY `uk_user_dept_role` (`user_id`, `dept_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'); +INSERT INTO `tb_sys_user_dept_role` (id, user_id, dept_id, role_id) VALUES ('1', '1', 'default_department', 'admin'); -- 权限表 DROP TABLE IF EXISTS `tb_sys_permission`; @@ -119,7 +120,12 @@ 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'); +('4', 'admin', 'perm_permission_manage'), +('5', 'admin', 'perm_dashboard'), +('6', 'admin', 'perm_user_manage'), +('7', 'admin', 'perm_role_manage'), +('8', 'admin', 'perm_dept_manage'), +('9', 'admin', 'perm_permission_manage'); -- 菜单表 DROP TABLE IF EXISTS `tb_sys_menu`; @@ -149,7 +155,12 @@ INSERT INTO `tb_sys_menu` (id,menu_id, name, parent_id, url, icon, order_num, ty ('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); +('5','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 5, 1), +('6','menu_dashboard', '仪表盘', NULL, '/dashboard', 'dashboard', 6, 1), +('7','menu_user_mgmt', '用户管理', NULL, '/user-management', 'user', 7, 1), +('8','menu_role_mgmt', '角色管理', NULL, '/role-management', 'team', 8, 1), +('9','menu_dept_mgmt', '部门管理', NULL, '/dept-management', 'apartment', 9, 1), +('10','menu_permission_mgmt', '权限管理', NULL, '/permission-management', 'safety-certificate', 10, 1); DROP TABLE IF EXISTS `tb_sys_menu_permission`; CREATE TABLE `tb_sys_menu_permission` ( @@ -167,8 +178,8 @@ CREATE TABLE `tb_sys_menu_permission` ( ) 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'); \ No newline at end of file +('1', 'perm_dashboard', 'menu_dashboard'), +('2', 'perm_user_manage', 'menu_user_mgmt'), +('3', 'perm_role_manage', 'menu_role_mgmt'), +('4', 'perm_dept_manage', 'menu_dept_mgmt'), +('5', 'perm_permission_manage', 'menu_permission_mgmt'); \ No newline at end of file diff --git a/schoolNewsServ/.bin/mysql/sql/createTableUser.sql b/schoolNewsServ/.bin/mysql/sql/createTableUser.sql index 1b9f2de..4ea085a 100644 --- a/schoolNewsServ/.bin/mysql/sql/createTableUser.sql +++ b/schoolNewsServ/.bin/mysql/sql/createTableUser.sql @@ -21,7 +21,7 @@ CREATE TABLE `tb_sys_user` ( -- 推荐:把默认 admin 密码替换为已哈希的值 INSERT INTO `tb_sys_user` (id, username, password, email) VALUES -('1', 'admin', '123456', '3223905473@qq.com'); +('1', 'admin', '$2a$10$/Bo2SXboVUpYfR6EA.y8puYQaMGBcuNYFY/EkQRY3w27IH56EuEcS', '3223905473@qq.com'); -- 用户信息表 DROP TABLE IF EXISTS `tb_sys_user_info`; diff --git a/schoolNewsServ/.doc/apifox/domain/auth/LoginDomain.json b/schoolNewsServ/.doc/apifox/domain/auth/LoginDomain.json new file mode 100644 index 0000000..9e7c980 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/auth/LoginDomain.json @@ -0,0 +1,64 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "LoginDomain", + "description": "登录域对象", + "type": "object", + "properties": { + "user": { + "description": "用户信息", + "example": null + }, + "userInfo": { + "description": "用户详细信息", + "example": null + }, + "roles": { + "type": "array", + "description": "用户角色列表", + "items": {}, + "example": [] + }, + "permissions": { + "type": "array", + "description": "用户权限列表", + "items": {}, + "example": [] + }, + "menus": { + "type": "array", + "description": "用户菜单列表", + "items": {}, + "example": [] + }, + "token": { + "type": "string", + "description": "JWT令牌", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + }, + "tokenExpireTime": { + "type": "string", + "format": "date-time", + "description": "令牌过期时间", + "example": "2025-10-06T16:00:00Z" + }, + "loginTime": { + "type": "string", + "format": "date-time", + "description": "登录时间", + "example": "2025-10-05T16:00:00Z" + }, + "ipAddress": { + "type": "string", + "format": "ipv4", + "description": "登录IP地址", + "example": "192.168.1.100" + }, + "loginType": { + "type": "string", + "description": "登录类型", + "enum": ["email", "username", "phone", "wechat"], + "example": "username" + } + }, + "required": ["token", "loginTime", "loginType"] +} diff --git a/schoolNewsServ/.doc/apifox/domain/auth/LoginParam.json b/schoolNewsServ/.doc/apifox/domain/auth/LoginParam.json new file mode 100644 index 0000000..2763b19 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/auth/LoginParam.json @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "LoginParam", + "description": "登录参数", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "邮箱", + "example": "user@example.com" + }, + "username": { + "type": "string", + "description": "用户名", + "minLength": 1, + "maxLength": 50, + "example": "admin" + }, + "phone": { + "type": "string", + "pattern": "^1[3-9]\\d{9}$", + "description": "手机号", + "example": "13800138000" + }, + "wechatID": { + "type": "string", + "description": "微信ID", + "example": "wx_123456789" + }, + "password": { + "type": "string", + "description": "密码", + "minLength": 6, + "maxLength": 20, + "example": "123456" + }, + "captcha": { + "type": "string", + "description": "验证码", + "example": "1234" + }, + "loginType": { + "type": "string", + "description": "登录类型", + "enum": ["email", "username", "phone", "wechat"], + "example": "username" + }, + "rememberMe": { + "type": "boolean", + "description": "记住我", + "example": false + } + }, + "required": ["password", "loginType"] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/BaseDTO.json b/schoolNewsServ/.doc/apifox/domain/dto/BaseDTO.json new file mode 100644 index 0000000..cd6d91f --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/BaseDTO.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "BaseDTO", + "description": "基础数据传输对象", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "主键ID", + "example": "1234567890123456789" + }, + "createTime": { + "type": "string", + "format": "date-time", + "description": "创建时间", + "example": "2025-10-05T16:00:00Z" + }, + "updateTime": { + "type": "string", + "format": "date-time", + "description": "更新时间", + "example": "2025-10-05T16:30:00Z" + }, + "deleteTime": { + "type": "string", + "format": "date-time", + "description": "删除时间", + "example": null + }, + "deleted": { + "type": "boolean", + "description": "是否删除", + "default": false, + "example": false + } + }, + "required": ["id", "createTime", "updateTime", "deleted"] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysDept.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysDept.json new file mode 100644 index 0000000..118f233 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysDept.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysDept", + "description": "系统部门信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "deptID": { + "type": "string", + "description": "部门ID", + "example": "1234567890123456789" + }, + "parentID": { + "type": "string", + "description": "父部门ID", + "example": "1234567890123456789" + }, + "name": { + "type": "string", + "description": "部门名称", + "minLength": 1, + "maxLength": 50, + "example": "技术部" + }, + "description": { + "type": "string", + "description": "部门描述", + "maxLength": 200, + "example": "技术开发部门" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["deptID", "name"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysDeptRole.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysDeptRole.json new file mode 100644 index 0000000..16ff11b --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysDeptRole.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysDeptRole", + "description": "部门角色关联信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "deptID": { + "type": "string", + "description": "部门ID", + "example": "1234567890123456789" + }, + "roleID": { + "type": "string", + "description": "角色ID", + "example": "1234567890123456789" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["deptID", "roleID"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysLoginLog.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysLoginLog.json new file mode 100644 index 0000000..c6818f4 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysLoginLog.json @@ -0,0 +1,76 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysLoginLog", + "description": "系统登录日志信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "userID": { + "type": "string", + "description": "用户ID", + "example": "1234567890123456789" + }, + "username": { + "type": "string", + "description": "用户名", + "example": "admin" + }, + "ipAddress": { + "type": "string", + "format": "ipv4", + "description": "登录IP地址", + "example": "192.168.1.100" + }, + "ipSource": { + "type": "string", + "description": "IP来源", + "example": "北京市" + }, + "browser": { + "type": "string", + "description": "浏览器类型", + "example": "Chrome" + }, + "os": { + "type": "string", + "description": "操作系统", + "example": "Windows 10" + }, + "password": { + "type": "string", + "description": "登录密码", + "example": "******" + }, + "loginTime": { + "type": "string", + "format": "date-time", + "description": "登录时间", + "example": "2025-10-05T16:00:00Z" + }, + "status": { + "type": "integer", + "description": "登录状态(0-失败,1-成功)", + "enum": [0, 1], + "example": 1 + }, + "errorCount": { + "type": "integer", + "description": "错误次数", + "minimum": 0, + "example": 0 + }, + "message": { + "type": "string", + "description": "登录消息", + "example": "登录成功" + } + }, + "required": ["userID", "username", "ipAddress", "loginTime", "status"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysMenu.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysMenu.json new file mode 100644 index 0000000..dca1931 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysMenu.json @@ -0,0 +1,72 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysMenu", + "description": "系统菜单信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "menuID": { + "type": "string", + "description": "菜单ID", + "example": "1234567890123456789" + }, + "parentID": { + "type": "string", + "description": "父菜单ID", + "example": "1234567890123456789" + }, + "name": { + "type": "string", + "description": "菜单名称", + "minLength": 1, + "maxLength": 50, + "example": "用户管理" + }, + "description": { + "type": "string", + "description": "菜单描述", + "maxLength": 200, + "example": "用户管理菜单" + }, + "url": { + "type": "string", + "description": "菜单URL", + "example": "/user/manage" + }, + "icon": { + "type": "string", + "description": "菜单图标", + "example": "user" + }, + "orderNum": { + "type": "integer", + "description": "菜单顺序", + "minimum": 0, + "example": 1 + }, + "type": { + "type": "integer", + "description": "菜单类型(0-目录,1-菜单,2-按钮)", + "enum": [0, 1, 2], + "example": 1 + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["menuID", "name", "type"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysMenuPermission.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysMenuPermission.json new file mode 100644 index 0000000..96079ee --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysMenuPermission.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysMenuPermission", + "description": "菜单权限关联信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "menuID": { + "type": "string", + "description": "菜单ID", + "example": "1234567890123456789" + }, + "permissionID": { + "type": "string", + "description": "权限ID", + "example": "1234567890123456789" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["menuID", "permissionID"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysPermission.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysPermission.json new file mode 100644 index 0000000..c4fca8e --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysPermission.json @@ -0,0 +1,52 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysPermission", + "description": "系统权限信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "permissionID": { + "type": "string", + "description": "权限ID", + "example": "1234567890123456789" + }, + "name": { + "type": "string", + "description": "权限名称", + "minLength": 1, + "maxLength": 50, + "example": "用户管理" + }, + "description": { + "type": "string", + "description": "权限描述", + "maxLength": 200, + "example": "用户管理权限" + }, + "code": { + "type": "string", + "description": "权限编码", + "minLength": 1, + "maxLength": 50, + "example": "user:manage" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["permissionID", "name", "code"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysRole.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysRole.json new file mode 100644 index 0000000..948bf71 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysRole.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysRole", + "description": "系统角色信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "roleID": { + "type": "string", + "description": "角色ID", + "example": "1234567890123456789" + }, + "name": { + "type": "string", + "description": "角色名称", + "minLength": 1, + "maxLength": 50, + "example": "管理员" + }, + "description": { + "type": "string", + "description": "角色描述", + "maxLength": 200, + "example": "系统管理员角色" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["roleID", "name"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysRolePermission.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysRolePermission.json new file mode 100644 index 0000000..86dc940 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysRolePermission.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysRolePermission", + "description": "角色权限关联信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "roleID": { + "type": "string", + "description": "角色ID", + "example": "1234567890123456789" + }, + "permissionID": { + "type": "string", + "description": "权限ID", + "example": "1234567890123456789" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["roleID", "permissionID"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysUser.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysUser.json new file mode 100644 index 0000000..ff9cb16 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysUser.json @@ -0,0 +1,54 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysUser", + "description": "系统用户信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "用户名", + "minLength": 1, + "maxLength": 50, + "example": "admin" + }, + "password": { + "type": "string", + "description": "密码", + "minLength": 6, + "maxLength": 20, + "example": "123456" + }, + "email": { + "type": "string", + "format": "email", + "description": "邮箱", + "example": "admin@example.com" + }, + "phone": { + "type": "string", + "pattern": "^1[3-9]\\d{9}$", + "description": "手机号", + "example": "13800138000" + }, + "wechatID": { + "type": "string", + "description": "微信号", + "example": "wx_123456789" + }, + "status": { + "type": "integer", + "description": "用户状态", + "enum": [0, 1], + "example": 1 + } + }, + "required": ["username", "password", "email", "phone", "status"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysUserInfo.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysUserInfo.json new file mode 100644 index 0000000..e5ef312 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysUserInfo.json @@ -0,0 +1,63 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysUserInfo", + "description": "用户详细信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "userID": { + "type": "string", + "description": "用户ID", + "example": "1234567890123456789" + }, + "avatar": { + "type": "string", + "description": "头像", + "example": "https://example.com/avatar.jpg" + }, + "gender": { + "type": "integer", + "description": "性别(0-未知,1-女,2-男)", + "enum": [0, 1, 2], + "example": 1 + }, + "familyName": { + "type": "string", + "description": "姓", + "maxLength": 50, + "example": "张" + }, + "givenName": { + "type": "string", + "description": "名", + "maxLength": 50, + "example": "三" + }, + "fullName": { + "type": "string", + "description": "全名", + "maxLength": 100, + "example": "张三" + }, + "idCard": { + "type": "string", + "description": "身份证号", + "pattern": "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", + "example": "110101199001011234" + }, + "address": { + "type": "string", + "description": "地址", + "maxLength": 200, + "example": "北京市朝阳区" + } + }, + "required": ["userID"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/dto/TbSysUserRole.json b/schoolNewsServ/.doc/apifox/domain/dto/TbSysUserRole.json new file mode 100644 index 0000000..bcaa7a8 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/dto/TbSysUserRole.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "TbSysUserRole", + "description": "用户角色关联信息", + "type": "object", + "allOf": [ + { + "$ref": "BaseDTO.json" + }, + { + "type": "object", + "properties": { + "userID": { + "type": "string", + "description": "用户ID", + "example": "1234567890123456789" + }, + "roleID": { + "type": "string", + "description": "角色ID", + "example": "1234567890123456789" + }, + "creator": { + "type": "string", + "description": "创建人", + "example": "admin" + }, + "updater": { + "type": "string", + "description": "更新人", + "example": "admin" + } + }, + "required": ["userID", "roleID"] + } + ] +} diff --git a/schoolNewsServ/.doc/apifox/domain/page/PageDomain.json b/schoolNewsServ/.doc/apifox/domain/page/PageDomain.json new file mode 100644 index 0000000..214c6d8 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/page/PageDomain.json @@ -0,0 +1,19 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PageDomain", + "description": "分页数据实体类", + "type": "object", + "properties": { + "pageParam": { + "$ref": "PageParam.json", + "description": "分页参数" + }, + "dataList": { + "type": "array", + "description": "数据列表", + "items": {}, + "example": [] + } + }, + "required": ["pageParam", "dataList"] +} diff --git a/schoolNewsServ/.doc/apifox/domain/page/PageParam.json b/schoolNewsServ/.doc/apifox/domain/page/PageParam.json new file mode 100644 index 0000000..f4f9721 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/page/PageParam.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "PageParam", + "description": "分页参数", + "type": "object", + "properties": { + "pageNumber": { + "type": "integer", + "description": "当前页码", + "minimum": 1, + "default": 1, + "example": 1 + }, + "pageSize": { + "type": "integer", + "description": "每页显示数量", + "minimum": 1, + "maximum": 1000, + "default": 10, + "example": 10 + }, + "totalPages": { + "type": "integer", + "description": "总页数", + "minimum": 0, + "example": 5 + }, + "totalElements": { + "type": "integer", + "description": "总记录数", + "minimum": 0, + "example": 50 + } + }, + "required": ["pageNumber", "pageSize", "totalPages", "totalElements"] +} diff --git a/schoolNewsServ/.doc/apifox/domain/response/ResultDomain.json b/schoolNewsServ/.doc/apifox/domain/response/ResultDomain.json new file mode 100644 index 0000000..9d86407 --- /dev/null +++ b/schoolNewsServ/.doc/apifox/domain/response/ResultDomain.json @@ -0,0 +1,99 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ResultDomain", + "description": "统一返回结果实体类", + "type": "object", + "properties": { + "code": { + "type": "integer", + "description": "状态码", + "example": 200 + }, + "message": { + "type": "string", + "description": "返回消息", + "example": "操作成功" + }, + "success": { + "type": "boolean", + "description": "操作是否成功", + "example": true + }, + "login": { + "type": "boolean", + "description": "是否登录", + "example": true + }, + "auth": { + "type": "boolean", + "description": "是否有权限", + "example": true + }, + "data": { + "description": "返回数据", + "example": null + }, + "dataList": { + "type": "array", + "description": "返回数据列表", + "items": {}, + "example": [] + }, + "pageParam": { + "$ref": "#/definitions/PageParam", + "description": "分页参数" + }, + "pageDomain": { + "$ref": "#/definitions/PageDomain", + "description": "分页信息" + } + }, + "required": ["code", "message", "success", "login", "auth"], + "definitions": { + "PageParam": { + "type": "object", + "properties": { + "pageNumber": { + "type": "integer", + "description": "当前页码", + "minimum": 1, + "example": 1 + }, + "pageSize": { + "type": "integer", + "description": "每页显示数量", + "minimum": 1, + "example": 10 + }, + "totalPages": { + "type": "integer", + "description": "总页数", + "minimum": 0, + "example": 5 + }, + "totalElements": { + "type": "integer", + "description": "总记录数", + "minimum": 0, + "example": 50 + } + }, + "required": ["pageNumber", "pageSize", "totalPages", "totalElements"] + }, + "PageDomain": { + "type": "object", + "properties": { + "pageParam": { + "$ref": "#/definitions/PageParam", + "description": "分页参数" + }, + "dataList": { + "type": "array", + "description": "数据列表", + "items": {} + } + }, + "required": ["pageParam", "dataList"] + } + } +} diff --git a/schoolNewsServ/.doc/log4j2-template.xml b/schoolNewsServ/.doc/log4j2-template.xml index 8c55206..dce86d0 100644 --- a/schoolNewsServ/.doc/log4j2-template.xml +++ b/schoolNewsServ/.doc/log4j2-template.xml @@ -1,12 +1,6 @@ @@ -18,29 +12,32 @@ - + + + + - - - + + + - + - + @@ -54,7 +51,7 @@ - + @@ -68,7 +65,7 @@ - + @@ -94,8 +91,35 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +