mirror of https://github.com/elunez/eladmin
commit
ee70018d2d
|
@ -36,6 +36,11 @@
|
||||||
<artifactId>eladmin-tools</artifactId>
|
<artifactId>eladmin-tools</artifactId>
|
||||||
<version>2.7</version>
|
<version>2.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>me.zhengjie</groupId>
|
||||||
|
<artifactId>sport</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- quartz -->
|
<!-- quartz -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -21,9 +21,11 @@ import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
||||||
import me.zhengjie.utils.SpringBeanHolder;
|
import me.zhengjie.utils.SpringBeanHolder;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
import org.springframework.boot.context.ApplicationPidFileWriter;
|
import org.springframework.boot.context.ApplicationPidFileWriter;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||||
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
@ -38,8 +40,10 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
@EnableAsync
|
@EnableAsync
|
||||||
@RestController
|
@RestController
|
||||||
@Api(hidden = true)
|
@Api(hidden = true)
|
||||||
@SpringBootApplication
|
@SpringBootApplication(scanBasePackages = {"me.zhengjie", "com.srr"})
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
|
@EnableJpaRepositories(basePackages = {"me.zhengjie.**.repository", "com.srr.repository"})
|
||||||
|
@EntityScan(basePackages = {"me.zhengjie.**.domain", "com.srr.domain"})
|
||||||
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
|
@EnableJpaAuditing(auditorAwareRef = "auditorAware")
|
||||||
public class AppRun {
|
public class AppRun {
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,16 @@ spring:
|
||||||
# 记录慢SQL
|
# 记录慢SQL
|
||||||
log-slow-sql: true
|
log-slow-sql: true
|
||||||
slow-sql-millis: 2000
|
slow-sql-millis: 2000
|
||||||
merge-sql: true
|
merge-sql: false
|
||||||
wall:
|
wall:
|
||||||
config:
|
config:
|
||||||
multi-statement-allow: true
|
multi-statement-allow: true
|
||||||
|
flyway:
|
||||||
|
enabled: true
|
||||||
|
locations: classpath:db/migration
|
||||||
|
baseline-on-migrate: true
|
||||||
|
validate-on-migrate: false
|
||||||
|
encoding: UTF-8
|
||||||
|
|
||||||
# 登录相关配置
|
# 登录相关配置
|
||||||
login:
|
login:
|
||||||
|
|
|
@ -0,0 +1,866 @@
|
||||||
|
/*
|
||||||
|
Navicat Premium Dump SQL
|
||||||
|
|
||||||
|
Source Server : localhost
|
||||||
|
Source Server Type : MySQL
|
||||||
|
Source Server Version : 110206 (11.2.6-MariaDB)
|
||||||
|
Source Host : localhost:3306
|
||||||
|
Source Schema : eladmin
|
||||||
|
|
||||||
|
Target Server Type : MySQL
|
||||||
|
Target Server Version : 110206 (11.2.6-MariaDB)
|
||||||
|
File Encoding : 65001
|
||||||
|
|
||||||
|
Date: 15/01/2025 18:20:01
|
||||||
|
*/
|
||||||
|
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for code_column
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `code_column`;
|
||||||
|
CREATE TABLE `code_column` (
|
||||||
|
`column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`table_name` varchar(180) DEFAULT NULL COMMENT '表名',
|
||||||
|
`column_name` varchar(255) DEFAULT NULL COMMENT '数据库字段名称',
|
||||||
|
`column_type` varchar(255) DEFAULT NULL COMMENT '数据库字段类型',
|
||||||
|
`dict_name` varchar(255) DEFAULT NULL COMMENT '字典名称',
|
||||||
|
`extra` varchar(255) DEFAULT NULL COMMENT '字段额外的参数',
|
||||||
|
`form_show` bit(1) DEFAULT NULL COMMENT '是否表单显示',
|
||||||
|
`form_type` varchar(255) DEFAULT NULL COMMENT '表单类型',
|
||||||
|
`key_type` varchar(255) DEFAULT NULL COMMENT '数据库字段键类型',
|
||||||
|
`list_show` bit(1) DEFAULT NULL COMMENT '是否在列表显示',
|
||||||
|
`not_null` bit(1) DEFAULT NULL COMMENT '是否为空',
|
||||||
|
`query_type` varchar(255) DEFAULT NULL COMMENT '查询类型',
|
||||||
|
`remark` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||||
|
`date_annotation` varchar(255) DEFAULT NULL COMMENT '日期注解',
|
||||||
|
PRIMARY KEY (`column_id`) USING BTREE,
|
||||||
|
KEY `idx_table_name` (`table_name`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=259 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='代码生成字段信息存储';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of code_column
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for code_config
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `code_config`;
|
||||||
|
CREATE TABLE `code_config` (
|
||||||
|
`config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`table_name` varchar(255) DEFAULT NULL COMMENT '表名',
|
||||||
|
`author` varchar(255) DEFAULT NULL COMMENT '作者',
|
||||||
|
`cover` bit(1) DEFAULT NULL COMMENT '是否覆盖',
|
||||||
|
`module_name` varchar(255) DEFAULT NULL COMMENT '模块名称',
|
||||||
|
`pack` varchar(255) DEFAULT NULL COMMENT '至于哪个包下',
|
||||||
|
`path` varchar(255) DEFAULT NULL COMMENT '前端代码生成的路径',
|
||||||
|
`api_path` varchar(255) DEFAULT NULL COMMENT '前端Api文件路径',
|
||||||
|
`prefix` varchar(255) DEFAULT NULL COMMENT '表前缀',
|
||||||
|
`api_alias` varchar(255) DEFAULT NULL COMMENT '接口名称',
|
||||||
|
PRIMARY KEY (`config_id`) USING BTREE,
|
||||||
|
KEY `idx_table_name` (`table_name`(100))
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='代码生成器配置';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of code_config
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for mnt_app
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `mnt_app`;
|
||||||
|
CREATE TABLE `mnt_app` (
|
||||||
|
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`name` varchar(255) DEFAULT NULL COMMENT '应用名称',
|
||||||
|
`upload_path` varchar(255) DEFAULT NULL COMMENT '上传目录',
|
||||||
|
`deploy_path` varchar(255) DEFAULT NULL COMMENT '部署路径',
|
||||||
|
`backup_path` varchar(255) DEFAULT NULL COMMENT '备份路径',
|
||||||
|
`port` int(255) DEFAULT NULL COMMENT '应用端口',
|
||||||
|
`start_script` varchar(4000) DEFAULT NULL COMMENT '启动脚本',
|
||||||
|
`deploy_script` varchar(4000) DEFAULT NULL COMMENT '部署脚本',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`app_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='应用管理';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of mnt_app
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for mnt_database
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `mnt_database`;
|
||||||
|
CREATE TABLE `mnt_database` (
|
||||||
|
`db_id` varchar(50) NOT NULL COMMENT 'ID',
|
||||||
|
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||||
|
`jdbc_url` varchar(255) NOT NULL COMMENT 'jdbc连接',
|
||||||
|
`user_name` varchar(255) NOT NULL COMMENT '账号',
|
||||||
|
`pwd` varchar(255) NOT NULL COMMENT '密码',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`db_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据库管理';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of mnt_database
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for mnt_deploy
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `mnt_deploy`;
|
||||||
|
CREATE TABLE `mnt_deploy` (
|
||||||
|
`deploy_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`app_id` bigint(20) DEFAULT NULL COMMENT '应用编号',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL,
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`deploy_id`) USING BTREE,
|
||||||
|
KEY `idx_app_id` (`app_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部署管理';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of mnt_deploy
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for mnt_deploy_history
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `mnt_deploy_history`;
|
||||||
|
CREATE TABLE `mnt_deploy_history` (
|
||||||
|
`history_id` varchar(50) NOT NULL COMMENT 'ID',
|
||||||
|
`app_name` varchar(255) NOT NULL COMMENT '应用名称',
|
||||||
|
`deploy_date` datetime NOT NULL COMMENT '部署日期',
|
||||||
|
`deploy_user` varchar(50) NOT NULL COMMENT '部署用户',
|
||||||
|
`ip` varchar(20) NOT NULL COMMENT '服务器IP',
|
||||||
|
`deploy_id` bigint(20) DEFAULT NULL COMMENT '部署编号',
|
||||||
|
PRIMARY KEY (`history_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部署历史管理';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of mnt_deploy_history
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for mnt_deploy_server
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `mnt_deploy_server`;
|
||||||
|
CREATE TABLE `mnt_deploy_server` (
|
||||||
|
`deploy_id` bigint(20) NOT NULL COMMENT '部署ID',
|
||||||
|
`server_id` bigint(20) NOT NULL COMMENT '服务ID',
|
||||||
|
PRIMARY KEY (`deploy_id`,`server_id`) USING BTREE,
|
||||||
|
KEY `idx_deploy_id` (`deploy_id`),
|
||||||
|
KEY `idx_server_id` (`server_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='应用与服务器关联';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of mnt_deploy_server
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for mnt_server
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `mnt_server`;
|
||||||
|
CREATE TABLE `mnt_server` (
|
||||||
|
`server_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`account` varchar(50) DEFAULT NULL COMMENT '账号',
|
||||||
|
`ip` varchar(20) DEFAULT NULL COMMENT 'IP地址',
|
||||||
|
`name` varchar(100) DEFAULT NULL COMMENT '名称',
|
||||||
|
`password` varchar(100) DEFAULT NULL COMMENT '密码',
|
||||||
|
`port` int(11) DEFAULT NULL COMMENT '端口',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`server_id`) USING BTREE,
|
||||||
|
KEY `idx_ip` (`ip`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='服务器管理';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of mnt_server
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_dept
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_dept`;
|
||||||
|
CREATE TABLE `sys_dept` (
|
||||||
|
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
|
||||||
|
`sub_count` int(5) DEFAULT 0 COMMENT '子部门数目',
|
||||||
|
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||||
|
`dept_sort` int(5) DEFAULT 999 COMMENT '排序',
|
||||||
|
`enabled` bit(1) NOT NULL COMMENT '状态',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`dept_id`) USING BTREE,
|
||||||
|
KEY `idx_pid` (`pid`),
|
||||||
|
KEY `idx_enabled` (`enabled`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='部门';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_dept
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 7, 1, '研发部', 3, b'1', 'admin', 'admin', '2019-03-25 09:15:32', '2020-08-02 14:48:47');
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 7, 0, '运维部', 4, b'1', 'admin', 'admin', '2019-03-25 09:20:44', '2020-05-17 14:27:27');
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 8, 0, '测试部', 6, b'1', 'admin', 'admin', '2019-03-25 09:52:18', '2020-06-08 11:59:21');
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, NULL, 2, '华南分部', 0, b'1', 'admin', 'admin', '2019-03-25 11:04:50', '2020-06-08 12:08:56');
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, NULL, 2, '华北分部', 1, b'1', 'admin', 'admin', '2019-03-25 11:04:53', '2020-05-14 12:54:00');
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 8, 0, 'UI部门', 7, b'1', 'admin', 'admin', '2020-05-13 22:56:53', '2020-05-14 12:54:13');
|
||||||
|
INSERT INTO `sys_dept` (`dept_id`, `pid`, `sub_count`, `name`, `dept_sort`, `enabled`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (17, 2, 0, '研发一组', 999, b'1', 'admin', 'admin', '2020-08-02 14:49:07', '2020-08-02 14:49:07');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_dict
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_dict`;
|
||||||
|
CREATE TABLE `sys_dict` (
|
||||||
|
`dict_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`name` varchar(255) NOT NULL COMMENT '字典名称',
|
||||||
|
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`dict_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据字典';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_dict
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 'user_status', '用户状态', NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||||
|
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 'dept_status', '部门状态', NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||||
|
INSERT INTO `sys_dict` (`dict_id`, `name`, `description`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'job_status', '岗位状态', NULL, 'admin', '2019-10-27 20:31:36', '2025-01-14 15:48:29');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_dict_detail
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_dict_detail`;
|
||||||
|
CREATE TABLE `sys_dict_detail` (
|
||||||
|
`detail_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`dict_id` bigint(11) DEFAULT NULL COMMENT '字典id',
|
||||||
|
`label` varchar(255) NOT NULL COMMENT '字典标签',
|
||||||
|
`value` varchar(255) NOT NULL COMMENT '字典值',
|
||||||
|
`dict_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`detail_id`) USING BTREE,
|
||||||
|
KEY `idx_dict_id` (`dict_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='数据字典详情';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_dict_detail
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, 1, '激活', 'true', 1, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||||
|
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, '禁用', 'false', 2, NULL, NULL, NULL, NULL);
|
||||||
|
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 4, '启用', 'true', 1, NULL, NULL, NULL, NULL);
|
||||||
|
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (4, 4, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||||
|
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 5, '启用', 'true', 1, NULL, NULL, NULL, NULL);
|
||||||
|
INSERT INTO `sys_dict_detail` (`detail_id`, `dict_id`, `label`, `value`, `dict_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 5, '停用', 'false', 2, NULL, NULL, '2019-10-27 20:31:36', NULL);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_job
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_job`;
|
||||||
|
CREATE TABLE `sys_job` (
|
||||||
|
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`name` varchar(180) NOT NULL COMMENT '岗位名称',
|
||||||
|
`enabled` bit(1) NOT NULL COMMENT '岗位状态',
|
||||||
|
`job_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`job_id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uniq_name` (`name`),
|
||||||
|
KEY `idx_enabled` (`enabled`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='岗位';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_job
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (8, '人事专员', b'1', 3, NULL, NULL, '2019-03-29 14:52:28', NULL);
|
||||||
|
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, '产品经理', b'1', 4, NULL, NULL, '2019-03-29 14:55:51', NULL);
|
||||||
|
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, '全栈开发', b'1', 2, NULL, 'admin', '2019-03-31 13:39:30', '2020-05-05 11:33:43');
|
||||||
|
INSERT INTO `sys_job` (`job_id`, `name`, `enabled`, `job_sort`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (12, '软件测试', b'1', 5, NULL, 'admin', '2019-03-31 13:39:43', '2020-05-10 19:56:26');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_log
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_log`;
|
||||||
|
CREATE TABLE `sys_log` (
|
||||||
|
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||||
|
`log_type` varchar(10) NOT NULL COMMENT '日志类型:INFI/ERROR',
|
||||||
|
`method` varchar(255) DEFAULT NULL COMMENT '方法名',
|
||||||
|
`params` text DEFAULT NULL COMMENT '参数',
|
||||||
|
`request_ip` varchar(255) DEFAULT NULL COMMENT '请求IP',
|
||||||
|
`time` bigint(20) DEFAULT NULL COMMENT '执行时间',
|
||||||
|
`username` varchar(255) DEFAULT NULL COMMENT '用户名',
|
||||||
|
`address` varchar(255) DEFAULT NULL COMMENT '地址',
|
||||||
|
`browser` varchar(255) DEFAULT NULL COMMENT '浏览器',
|
||||||
|
`exception_detail` text DEFAULT NULL COMMENT '异常',
|
||||||
|
`create_time` datetime NOT NULL COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`log_id`) USING BTREE,
|
||||||
|
KEY `idx_create_time_index` (`create_time`),
|
||||||
|
KEY `idx_log_type` (`log_type`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=3636 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统日志';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_log
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_menu
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_menu`;
|
||||||
|
CREATE TABLE `sys_menu` (
|
||||||
|
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
|
||||||
|
`sub_count` int(5) DEFAULT 0 COMMENT '子菜单数目',
|
||||||
|
`type` int(11) DEFAULT NULL COMMENT '菜单类型',
|
||||||
|
`title` varchar(100) DEFAULT NULL COMMENT '菜单标题',
|
||||||
|
`name` varchar(100) DEFAULT NULL COMMENT '组件名称',
|
||||||
|
`component` varchar(255) DEFAULT NULL COMMENT '组件',
|
||||||
|
`menu_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||||
|
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
|
||||||
|
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
|
||||||
|
`i_frame` bit(1) DEFAULT NULL COMMENT '是否外链',
|
||||||
|
`cache` bit(1) DEFAULT b'0' COMMENT '缓存',
|
||||||
|
`hidden` bit(1) DEFAULT b'0' COMMENT '隐藏',
|
||||||
|
`permission` varchar(255) DEFAULT NULL COMMENT '权限',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`menu_id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uniq_name` (`name`),
|
||||||
|
UNIQUE KEY `uniq_title` (`title`),
|
||||||
|
KEY `idx_pid` (`pid`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统菜单';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_menu
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, NULL, 7, 0, '系统管理', NULL, NULL, 1, 'system', 'system', b'0', b'0', b'0', NULL, NULL, 'admin', '2018-12-18 15:11:29', '2025-01-14 15:48:18');
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 1, 3, 1, '用户管理', 'User', 'system/user/index', 2, 'peoples', 'user', b'0', b'0', b'0', 'user:list', NULL, NULL, '2018-12-18 15:14:44', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 1, 3, 1, '角色管理', 'Role', 'system/role/index', 3, 'role', 'role', b'0', b'0', b'0', 'roles:list', NULL, NULL, '2018-12-18 15:16:07', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 1, 3, 1, '菜单管理', 'Menu', 'system/menu/index', 5, 'menu', 'menu', b'0', b'0', b'0', 'menu:list', NULL, NULL, '2018-12-18 15:17:28', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, NULL, 5, 0, '系统监控', NULL, NULL, 10, 'monitor', 'monitor', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:17:48', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (7, 6, 0, 1, '操作日志', 'Log', 'monitor/log/index', 11, 'log', 'logs', b'0', b'1', b'0', NULL, NULL, 'admin', '2018-12-18 15:18:26', '2020-06-06 13:11:57');
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (9, 6, 0, 1, 'SQL监控', 'Sql', 'monitor/sql/index', 18, 'sqlMonitor', 'druid', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-18 15:19:34', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (10, NULL, 5, 0, '组件管理', NULL, NULL, 50, 'zujian', 'components', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:16', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (11, 10, 0, 1, '图标库', 'Icons', 'components/icons/index', 51, 'icon', 'icon', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-19 13:38:49', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (14, 36, 0, 1, '邮件工具', 'Email', 'tools/email/index', 35, 'email', 'email', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 10:13:09', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (15, 10, 0, 1, '富文本', 'Editor', 'components/Editor', 52, 'fwb', 'tinymce', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-27 11:58:25', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (18, 36, 3, 1, '存储管理', 'Storage', 'tools/storage/index', 34, 'qiniu', 'storage', b'0', b'0', b'0', 'storage:list', NULL, NULL, '2018-12-31 11:12:15', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (19, 36, 0, 1, '支付宝工具', 'AliPay', 'tools/aliPay/index', 37, 'alipay', 'aliPay', b'0', b'0', b'0', NULL, NULL, NULL, '2018-12-31 14:52:38', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (21, NULL, 2, 0, '多级菜单', NULL, '', 900, 'menu', 'nested', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:22:03', '2020-06-21 17:27:35');
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (22, 21, 2, 0, '二级菜单1', NULL, '', 999, 'menu', 'menu1', b'0', b'0', b'0', NULL, NULL, 'admin', '2019-01-04 16:23:29', '2020-06-21 17:27:20');
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (23, 21, 0, 1, '二级菜单2', NULL, 'nested/menu2/index', 999, 'menu', 'menu2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:23:57', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (24, 22, 0, 1, '三级菜单1', 'Test', 'nested/menu1/menu1-1', 999, 'menu', 'menu1-1', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-04 16:24:48', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (27, 22, 0, 1, '三级菜单2', NULL, 'nested/menu1/menu1-2', 999, 'menu', 'menu1-2', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-07 17:27:32', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (28, 1, 3, 1, '任务调度', 'Timing', 'system/timing/index', 999, 'timing', 'timing', b'0', b'0', b'0', 'timing:list', NULL, NULL, '2019-01-07 20:34:40', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (30, 36, 0, 1, '代码生成', 'GeneratorIndex', 'generator/index', 32, 'dev', 'generator', b'0', b'1', b'0', NULL, NULL, NULL, '2019-01-11 15:45:55', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (32, 6, 0, 1, '异常日志', 'ErrorLog', 'monitor/log/errorLog', 12, 'error', 'errorLog', b'0', b'0', b'0', NULL, NULL, NULL, '2019-01-13 13:49:03', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (33, 10, 0, 1, 'Markdown', 'Markdown', 'components/MarkDown', 53, 'markdown', 'markdown', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 13:46:44', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (34, 10, 0, 1, 'Yaml编辑器', 'YamlEdit', 'components/YamlEdit', 54, 'dev', 'yaml', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-08 15:49:40', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (35, 1, 3, 1, '部门管理', 'Dept', 'system/dept/index', 6, 'dept', 'dept', b'0', b'0', b'0', 'dept:list', NULL, NULL, '2019-03-25 09:46:00', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (36, NULL, 6, 0, '系统工具', NULL, '', 30, 'sys-tools', 'sys-tools', b'0', b'0', b'0', NULL, NULL, NULL, '2019-03-29 10:57:35', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (37, 1, 3, 1, '岗位管理', 'Job', 'system/job/index', 7, 'Steve-Jobs', 'job', b'0', b'0', b'0', 'job:list', NULL, NULL, '2019-03-29 13:51:18', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (39, 1, 3, 1, '字典管理', 'Dict', 'system/dict/index', 8, 'dictionary', 'dict', b'0', b'0', b'0', 'dict:list', NULL, NULL, '2019-04-10 11:49:04', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (41, 6, 0, 1, '在线用户', 'OnlineUser', 'monitor/online/index', 10, 'Steve-Jobs', 'online', b'0', b'0', b'0', NULL, NULL, NULL, '2019-10-26 22:08:43', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (44, 2, 0, 2, '用户新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'user:add', NULL, NULL, '2019-10-29 10:59:46', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (45, 2, 0, 2, '用户编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'user:edit', NULL, NULL, '2019-10-29 11:00:08', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (46, 2, 0, 2, '用户删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'user:del', NULL, NULL, '2019-10-29 11:00:23', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (48, 3, 0, 2, '角色创建', NULL, '', 2, '', '', b'0', b'0', b'0', 'roles:add', NULL, NULL, '2019-10-29 12:45:34', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (49, 3, 0, 2, '角色修改', NULL, '', 3, '', '', b'0', b'0', b'0', 'roles:edit', NULL, NULL, '2019-10-29 12:46:16', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (50, 3, 0, 2, '角色删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'roles:del', NULL, NULL, '2019-10-29 12:46:51', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (52, 5, 0, 2, '菜单新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'menu:add', NULL, NULL, '2019-10-29 12:55:07', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (53, 5, 0, 2, '菜单编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'menu:edit', NULL, NULL, '2019-10-29 12:55:40', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (54, 5, 0, 2, '菜单删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'menu:del', NULL, NULL, '2019-10-29 12:56:00', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (56, 35, 0, 2, '部门新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dept:add', NULL, NULL, '2019-10-29 12:57:09', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (57, 35, 0, 2, '部门编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dept:edit', NULL, NULL, '2019-10-29 12:57:27', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (58, 35, 0, 2, '部门删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dept:del', NULL, NULL, '2019-10-29 12:57:41', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (60, 37, 0, 2, '岗位新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'job:add', NULL, NULL, '2019-10-29 12:58:27', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (61, 37, 0, 2, '岗位编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'job:edit', NULL, NULL, '2019-10-29 12:58:45', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (62, 37, 0, 2, '岗位删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'job:del', NULL, NULL, '2019-10-29 12:59:04', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (64, 39, 0, 2, '字典新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'dict:add', NULL, NULL, '2019-10-29 13:00:17', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (65, 39, 0, 2, '字典编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'dict:edit', NULL, NULL, '2019-10-29 13:00:42', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (66, 39, 0, 2, '字典删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'dict:del', NULL, NULL, '2019-10-29 13:00:59', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (73, 28, 0, 2, '任务新增', NULL, '', 2, '', '', b'0', b'0', b'0', 'timing:add', NULL, NULL, '2019-10-29 13:07:28', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (74, 28, 0, 2, '任务编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'timing:edit', NULL, NULL, '2019-10-29 13:07:41', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (75, 28, 0, 2, '任务删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'timing:del', NULL, NULL, '2019-10-29 13:07:54', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (77, 18, 0, 2, '上传文件', NULL, '', 2, '', '', b'0', b'0', b'0', 'storage:add', NULL, NULL, '2019-10-29 13:09:09', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (78, 18, 0, 2, '文件编辑', NULL, '', 3, '', '', b'0', b'0', b'0', 'storage:edit', NULL, NULL, '2019-10-29 13:09:22', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (79, 18, 0, 2, '文件删除', NULL, '', 4, '', '', b'0', b'0', b'0', 'storage:del', NULL, NULL, '2019-10-29 13:09:34', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (80, 6, 0, 1, '服务监控', 'ServerMonitor', 'monitor/server/index', 14, 'codeConsole', 'server', b'0', b'0', b'0', 'monitor:list', NULL, 'admin', '2019-11-07 13:06:39', '2020-05-04 18:20:50');
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (82, 36, 0, 1, '生成配置', 'GeneratorConfig', 'generator/config', 33, 'dev', 'generator/config/:tableName', b'0', b'1', b'1', '', NULL, NULL, '2019-11-17 20:08:56', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (83, 10, 0, 1, '图表库', 'Echarts', 'components/Echarts', 50, 'chart', 'echarts', b'0', b'1', b'0', '', NULL, NULL, '2019-11-21 09:04:32', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (90, NULL, 5, 1, '运维管理', 'Mnt', '', 20, 'mnt', 'mnt', b'0', b'0', b'0', NULL, NULL, NULL, '2019-11-09 10:31:08', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (92, 90, 3, 1, '服务器', 'ServerDeploy', 'maint/server/index', 22, 'server', 'maint/serverDeploy', b'0', b'0', b'0', 'serverDeploy:list', NULL, NULL, '2019-11-10 10:29:25', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (93, 90, 3, 1, '应用管理', 'App', 'maint/app/index', 23, 'app', 'maint/app', b'0', b'0', b'0', 'app:list', NULL, NULL, '2019-11-10 11:05:16', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (94, 90, 3, 1, '部署管理', 'Deploy', 'maint/deploy/index', 24, 'deploy', 'maint/deploy', b'0', b'0', b'0', 'deploy:list', NULL, NULL, '2019-11-10 15:56:55', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (97, 90, 1, 1, '部署备份', 'DeployHistory', 'maint/deployHistory/index', 25, 'backup', 'maint/deployHistory', b'0', b'0', b'0', 'deployHistory:list', NULL, NULL, '2019-11-10 16:49:44', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (98, 90, 3, 1, '数据库管理', 'Database', 'maint/database/index', 26, 'database', 'maint/database', b'0', b'0', b'0', 'database:list', NULL, NULL, '2019-11-10 20:40:04', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (102, 97, 0, 2, '删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deployHistory:del', NULL, NULL, '2019-11-17 09:32:48', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (103, 92, 0, 2, '服务器新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:add', NULL, NULL, '2019-11-17 11:08:33', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (104, 92, 0, 2, '服务器编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:edit', NULL, NULL, '2019-11-17 11:08:57', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (105, 92, 0, 2, '服务器删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'serverDeploy:del', NULL, NULL, '2019-11-17 11:09:15', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (106, 93, 0, 2, '应用新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:add', NULL, NULL, '2019-11-17 11:10:03', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (107, 93, 0, 2, '应用编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:edit', NULL, NULL, '2019-11-17 11:10:28', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (108, 93, 0, 2, '应用删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'app:del', NULL, NULL, '2019-11-17 11:10:55', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (109, 94, 0, 2, '部署新增', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:add', NULL, NULL, '2019-11-17 11:11:22', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (110, 94, 0, 2, '部署编辑', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:edit', NULL, NULL, '2019-11-17 11:11:41', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (111, 94, 0, 2, '部署删除', NULL, '', 999, '', '', b'0', b'0', b'0', 'deploy:del', NULL, NULL, '2019-11-17 11:12:01', NULL);
|
||||||
|
INSERT INTO `sys_menu` (`menu_id`, `pid`, `sub_count`, `type`, `title`, `name`, `component`, `menu_sort`, `icon`, `path`, `i_frame`, `cache`, `hidden`, `permission`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (116, 36, 0, 1, '生成预览', 'Preview', 'generator/preview', 999, 'java', 'generator/preview/:tableName', b'0', b'1', b'1', NULL, NULL, NULL, '2019-11-26 14:54:36', NULL);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_quartz_job
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_quartz_job`;
|
||||||
|
CREATE TABLE `sys_quartz_job` (
|
||||||
|
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Spring Bean名称',
|
||||||
|
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron 表达式',
|
||||||
|
`is_pause` bit(1) DEFAULT NULL COMMENT '状态:1暂停、0启用',
|
||||||
|
`job_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
|
||||||
|
`method_name` varchar(255) DEFAULT NULL COMMENT '方法名称',
|
||||||
|
`params` varchar(255) DEFAULT NULL COMMENT '参数',
|
||||||
|
`description` varchar(255) DEFAULT NULL COMMENT '备注',
|
||||||
|
`person_in_charge` varchar(100) DEFAULT NULL COMMENT '负责人',
|
||||||
|
`email` varchar(100) DEFAULT NULL COMMENT '报警邮箱',
|
||||||
|
`sub_task` varchar(100) DEFAULT NULL COMMENT '子任务ID',
|
||||||
|
`pause_after_failure` bit(1) DEFAULT NULL COMMENT '任务失败后是否暂停',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`job_id`) USING BTREE,
|
||||||
|
KEY `idx_is_pause` (`is_pause`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='定时任务';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_quartz_job
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '测试', NULL, NULL, NULL, NULL, 'admin', '2019-08-22 14:08:29', '2020-05-24 13:58:33');
|
||||||
|
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试', 'run', '', '不带参测试', 'Zheng Jie', '', '6', b'1', NULL, 'admin', '2019-09-26 16:44:39', '2020-05-24 14:48:12');
|
||||||
|
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (5, 'Test', '0/5 * * * * ?', b'1', '任务告警测试', 'run', NULL, '测试', 'test', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:32:41', '2020-05-05 20:36:13');
|
||||||
|
INSERT INTO `sys_quartz_job` (`job_id`, `bean_name`, `cron_expression`, `is_pause`, `job_name`, `method_name`, `params`, `description`, `person_in_charge`, `email`, `sub_task`, `pause_after_failure`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (6, 'testTask', '0/5 * * * * ?', b'1', '测试3', 'run2', NULL, '测试3', 'Zheng Jie', '', NULL, b'1', 'admin', 'admin', '2020-05-05 20:35:41', '2020-05-05 20:36:07');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_quartz_log
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_quartz_log`;
|
||||||
|
CREATE TABLE `sys_quartz_log` (
|
||||||
|
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Bean名称',
|
||||||
|
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron 表达式',
|
||||||
|
`is_success` bit(1) DEFAULT NULL COMMENT '是否执行成功',
|
||||||
|
`job_name` varchar(255) DEFAULT NULL COMMENT '任务名称',
|
||||||
|
`method_name` varchar(255) DEFAULT NULL COMMENT '方法名称',
|
||||||
|
`params` varchar(255) DEFAULT NULL COMMENT '参数',
|
||||||
|
`time` bigint(20) DEFAULT NULL COMMENT '执行耗时',
|
||||||
|
`exception_detail` text DEFAULT NULL COMMENT '异常详情',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||||
|
PRIMARY KEY (`log_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='定时任务日志';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_quartz_log
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_role
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_role`;
|
||||||
|
CREATE TABLE `sys_role` (
|
||||||
|
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`name` varchar(100) NOT NULL COMMENT '名称',
|
||||||
|
`level` int(50) DEFAULT NULL COMMENT '角色级别',
|
||||||
|
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||||
|
`data_scope` varchar(255) DEFAULT NULL COMMENT '数据权限',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`role_id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uniq_name` (`name`),
|
||||||
|
KEY `idx_level` (`level`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_role
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (1, '超级管理员', 1, '-', '全部', NULL, 'admin', '2018-11-23 11:04:37', '2020-08-06 16:10:24');
|
||||||
|
INSERT INTO `sys_role` (`role_id`, `name`, `level`, `description`, `data_scope`, `create_by`, `update_by`, `create_time`, `update_time`) VALUES (2, '普通用户', 2, '-', '本级', NULL, 'admin', '2018-11-23 13:09:06', '2020-09-05 10:45:12');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_roles_depts
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_roles_depts`;
|
||||||
|
CREATE TABLE `sys_roles_depts` (
|
||||||
|
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||||
|
`dept_id` bigint(20) NOT NULL COMMENT '部门ID',
|
||||||
|
PRIMARY KEY (`role_id`,`dept_id`) USING BTREE,
|
||||||
|
KEY `idx_role_id` (`role_id`),
|
||||||
|
KEY `idx_dept_id` (`dept_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色部门关联';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_roles_depts
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_roles_menus
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_roles_menus`;
|
||||||
|
CREATE TABLE `sys_roles_menus` (
|
||||||
|
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
|
||||||
|
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||||
|
PRIMARY KEY (`menu_id`,`role_id`) USING BTREE,
|
||||||
|
KEY `idx_menu_id` (`menu_id`),
|
||||||
|
KEY `idx_role_id` (`role_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='角色菜单关联';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_roles_menus
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (1, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (1, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (2, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (2, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (3, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (5, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (6, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (6, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (7, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (7, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (9, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (9, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (10, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (10, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (11, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (11, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (14, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (14, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (15, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (15, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (18, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (19, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (19, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (21, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (21, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (22, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (22, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (23, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (23, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (24, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (24, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (27, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (27, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (28, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (30, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (30, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (32, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (32, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (33, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (33, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (34, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (34, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (35, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (36, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (36, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (37, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (39, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (41, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (44, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (45, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (46, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (48, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (49, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (50, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (52, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (53, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (54, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (56, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (57, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (58, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (60, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (61, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (62, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (64, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (65, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (66, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (73, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (74, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (75, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (77, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (78, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (79, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (80, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (80, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (82, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (82, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (83, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (83, 2);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (90, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (92, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (93, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (94, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (97, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (98, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (102, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (103, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (104, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (105, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (106, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (107, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (108, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (109, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (110, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (111, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (116, 1);
|
||||||
|
INSERT INTO `sys_roles_menus` (`menu_id`, `role_id`) VALUES (116, 2);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_user
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_user`;
|
||||||
|
CREATE TABLE `sys_user` (
|
||||||
|
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称',
|
||||||
|
`username` varchar(180) DEFAULT NULL COMMENT '用户名',
|
||||||
|
`nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
|
||||||
|
`gender` varchar(2) DEFAULT NULL COMMENT '性别',
|
||||||
|
`phone` varchar(255) DEFAULT NULL COMMENT '手机号码',
|
||||||
|
`email` varchar(180) DEFAULT NULL COMMENT '邮箱',
|
||||||
|
`avatar_name` varchar(255) DEFAULT NULL COMMENT '头像地址',
|
||||||
|
`avatar_path` varchar(255) DEFAULT NULL COMMENT '头像真实路径',
|
||||||
|
`password` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||||
|
`is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号',
|
||||||
|
`enabled` bit(1) DEFAULT NULL COMMENT '状态:1启用、0禁用',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`pwd_reset_time` datetime DEFAULT NULL COMMENT '修改密码的时间',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`user_id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uniq_email` (`email`) USING BTREE,
|
||||||
|
UNIQUE KEY `uniq_username` (`username`) USING BTREE,
|
||||||
|
KEY `idx_dept_id` (`dept_id`) USING BTREE,
|
||||||
|
KEY `idx_enabled` (`enabled`)
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='系统用户';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_user
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (1, 2, 'admin', '管理员', '男', '18888888888', '201507802@qq.com', 'avatar-20250114101539224.png', '/Users/jie/Documents/work/me/admin/eladmin-mp/eladmin/~/avatar/avatar-20250114101539224.png', '$2a$10$Egp1/gvFlt7zhlXVfEFw4OfWQCGPw0ClmMcc6FjTnvXNRVf9zdMRa', b'1', b'1', NULL, 'admin', '2020-05-03 16:38:31', '2018-08-23 09:11:56', '2020-09-05 10:43:31');
|
||||||
|
INSERT INTO `sys_user` (`user_id`, `dept_id`, `username`, `nick_name`, `gender`, `phone`, `email`, `avatar_name`, `avatar_path`, `password`, `is_admin`, `enabled`, `create_by`, `update_by`, `pwd_reset_time`, `create_time`, `update_time`) VALUES (2, 2, 'test', '测试', '男', '19999999999', '231@qq.com', NULL, NULL, '$2a$10$4XcyudOYTSz6fue6KFNMHeUQnCX5jbBQypLEnGk1PmekXt5c95JcK', b'0', b'1', 'admin', 'admin', NULL, '2020-05-05 11:15:49', '2020-09-05 10:43:38');
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_users_jobs
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_users_jobs`;
|
||||||
|
CREATE TABLE `sys_users_jobs` (
|
||||||
|
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||||
|
`job_id` bigint(20) NOT NULL COMMENT '岗位ID',
|
||||||
|
PRIMARY KEY (`user_id`,`job_id`),
|
||||||
|
KEY `idx_user_id` (`user_id`),
|
||||||
|
KEY `idx_job_id` (`job_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='用户与岗位关联表';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_users_jobs
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_users_jobs` (`user_id`, `job_id`) VALUES (1, 11);
|
||||||
|
INSERT INTO `sys_users_jobs` (`user_id`, `job_id`) VALUES (2, 12);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for sys_users_roles
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `sys_users_roles`;
|
||||||
|
CREATE TABLE `sys_users_roles` (
|
||||||
|
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||||
|
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||||
|
PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
|
||||||
|
KEY `idx_user_id` (`user_id`),
|
||||||
|
KEY `idx_role_id` (`role_id`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='用户角色关联';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of sys_users_roles
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO `sys_users_roles` (`user_id`, `role_id`) VALUES (1, 1);
|
||||||
|
INSERT INTO `sys_users_roles` (`user_id`, `role_id`) VALUES (2, 2);
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for tool_alipay_config
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `tool_alipay_config`;
|
||||||
|
CREATE TABLE `tool_alipay_config` (
|
||||||
|
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||||
|
`app_id` varchar(255) DEFAULT NULL COMMENT '应用ID',
|
||||||
|
`charset` varchar(255) DEFAULT NULL COMMENT '编码',
|
||||||
|
`format` varchar(255) DEFAULT NULL COMMENT '类型 固定格式json',
|
||||||
|
`gateway_url` varchar(255) DEFAULT NULL COMMENT '网关地址',
|
||||||
|
`notify_url` varchar(255) DEFAULT NULL COMMENT '异步回调',
|
||||||
|
`private_key` text DEFAULT NULL COMMENT '私钥',
|
||||||
|
`public_key` text DEFAULT NULL COMMENT '公钥',
|
||||||
|
`return_url` varchar(255) DEFAULT NULL COMMENT '回调地址',
|
||||||
|
`sign_type` varchar(255) DEFAULT NULL COMMENT '签名方式',
|
||||||
|
`sys_service_provider_id` varchar(255) DEFAULT NULL COMMENT '商户号',
|
||||||
|
PRIMARY KEY (`config_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='支付宝配置类';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of tool_alipay_config
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for tool_email_config
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `tool_email_config`;
|
||||||
|
CREATE TABLE `tool_email_config` (
|
||||||
|
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||||
|
`from_user` varchar(255) DEFAULT NULL COMMENT '收件人',
|
||||||
|
`host` varchar(255) DEFAULT NULL COMMENT '邮件服务器SMTP地址',
|
||||||
|
`pass` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||||
|
`port` varchar(255) DEFAULT NULL COMMENT '端口',
|
||||||
|
`user` varchar(255) DEFAULT NULL COMMENT '发件者用户名',
|
||||||
|
PRIMARY KEY (`config_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='邮箱配置';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of tool_email_config
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for tool_local_storage
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `tool_local_storage`;
|
||||||
|
CREATE TABLE `tool_local_storage` (
|
||||||
|
`storage_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`real_name` varchar(255) DEFAULT NULL COMMENT '文件真实的名称',
|
||||||
|
`name` varchar(255) DEFAULT NULL COMMENT '文件名',
|
||||||
|
`suffix` varchar(255) DEFAULT NULL COMMENT '后缀',
|
||||||
|
`path` varchar(255) DEFAULT NULL COMMENT '路径',
|
||||||
|
`type` varchar(255) DEFAULT NULL COMMENT '类型',
|
||||||
|
`size` varchar(100) DEFAULT NULL COMMENT '大小',
|
||||||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||||
|
PRIMARY KEY (`storage_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='本地存储';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of tool_local_storage
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for tool_qiniu_config
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `tool_qiniu_config`;
|
||||||
|
CREATE TABLE `tool_qiniu_config` (
|
||||||
|
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||||
|
`access_key` text DEFAULT NULL COMMENT 'accessKey',
|
||||||
|
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符',
|
||||||
|
`host` varchar(255) NOT NULL COMMENT '外链域名',
|
||||||
|
`secret_key` text DEFAULT NULL COMMENT 'secretKey',
|
||||||
|
`type` varchar(255) DEFAULT NULL COMMENT '空间类型',
|
||||||
|
`zone` varchar(255) DEFAULT NULL COMMENT '机房',
|
||||||
|
PRIMARY KEY (`config_id`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云配置';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of tool_qiniu_config
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Table structure for tool_qiniu_content
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `tool_qiniu_content`;
|
||||||
|
CREATE TABLE `tool_qiniu_content` (
|
||||||
|
`content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||||
|
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符',
|
||||||
|
`name` varchar(180) DEFAULT NULL COMMENT '文件名称',
|
||||||
|
`size` varchar(255) DEFAULT NULL COMMENT '文件大小',
|
||||||
|
`type` varchar(255) DEFAULT NULL COMMENT '文件类型:私有或公开',
|
||||||
|
`url` varchar(255) DEFAULT NULL COMMENT '文件url',
|
||||||
|
`suffix` varchar(255) DEFAULT NULL COMMENT '文件后缀',
|
||||||
|
`update_time` datetime DEFAULT NULL COMMENT '上传或同步的时间',
|
||||||
|
PRIMARY KEY (`content_id`) USING BTREE,
|
||||||
|
UNIQUE KEY `uniq_name` (`name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=COMPACT COMMENT='七牛云文件存储';
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- Records of tool_qiniu_content
|
||||||
|
-- ----------------------------
|
||||||
|
BEGIN;
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
|
@ -0,0 +1,54 @@
|
||||||
|
create table sport
|
||||||
|
(
|
||||||
|
id bigint auto_increment primary key,
|
||||||
|
name varchar(32) not null comment '名称',
|
||||||
|
description varchar(255) null comment '描述',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '更新时间',
|
||||||
|
icon varchar(255) null comment '图标',
|
||||||
|
sort int null comment '排序',
|
||||||
|
enabled bit null comment '是否启用'
|
||||||
|
);
|
||||||
|
|
||||||
|
create table club
|
||||||
|
(
|
||||||
|
id bigint auto_increment primary key,
|
||||||
|
name varchar(32) not null comment '名称',
|
||||||
|
description varchar(255) null comment '描述',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '更新时间',
|
||||||
|
icon varchar(255) null comment '图标',
|
||||||
|
sort int null comment '排序',
|
||||||
|
enabled bit null comment '是否启用',
|
||||||
|
location varchar(255) null comment '位置',
|
||||||
|
longitude double null comment '经度',
|
||||||
|
latitude double null comment '纬度'
|
||||||
|
);
|
||||||
|
|
||||||
|
create table court
|
||||||
|
(
|
||||||
|
id bigint auto_increment primary key,
|
||||||
|
club_id bigint null references club (id),
|
||||||
|
sport_id bigint null references sport (id),
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '更新时间',
|
||||||
|
amount int not null default 0 comment '数量'
|
||||||
|
);
|
||||||
|
|
||||||
|
create table event
|
||||||
|
(
|
||||||
|
id bigint auto_increment primary key,
|
||||||
|
name varchar(32) not null comment '名称',
|
||||||
|
description varchar(255) null comment '描述',
|
||||||
|
format enum ('SINGLE', 'DOUBLE', 'TEAM') not null,
|
||||||
|
max_player int null comment '最大人数',
|
||||||
|
location varchar(255) null comment '位置',
|
||||||
|
image varchar(255) null comment '图片',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '更新时间',
|
||||||
|
sort int null comment '排序',
|
||||||
|
enabled bit null comment '是否启用',
|
||||||
|
event_time datetime null comment '时间',
|
||||||
|
club_id bigint null references club (id),
|
||||||
|
create_by bigint null references sys_user (user_id)
|
||||||
|
);
|
|
@ -0,0 +1,12 @@
|
||||||
|
create table player(
|
||||||
|
id bigint auto_increment primary key,
|
||||||
|
name varchar(32) not null comment '名称',
|
||||||
|
description varchar(255) null comment '描述',
|
||||||
|
latitude double null comment '纬度',
|
||||||
|
longitude double null comment '经度',
|
||||||
|
profile_image varchar(255) null comment '图片',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_time datetime null comment '更新时间',
|
||||||
|
rate_score double null comment '评分',
|
||||||
|
user_id int8 null references sys_user (user_id)
|
||||||
|
)
|
7
pom.xml
7
pom.xml
|
@ -13,6 +13,7 @@
|
||||||
<module>eladmin-system</module>
|
<module>eladmin-system</module>
|
||||||
<module>eladmin-tools</module>
|
<module>eladmin-tools</module>
|
||||||
<module>eladmin-generator</module>
|
<module>eladmin-generator</module>
|
||||||
|
<module>sport</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>ELADMIN 后台管理</name>
|
<name>ELADMIN 后台管理</name>
|
||||||
|
@ -222,6 +223,12 @@
|
||||||
<artifactId>javax.inject</artifactId>
|
<artifactId>javax.inject</artifactId>
|
||||||
<version>1</version>
|
<version>1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Flyway MySQL support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.flywaydb</groupId>
|
||||||
|
<artifactId>flyway-mysql</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -0,0 +1,122 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<label class="el-form-item-label">名称</label>
|
||||||
|
<el-input v-model="query.name" clearable placeholder="名称" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||||
|
<label class="el-form-item-label">创建时间</label>
|
||||||
|
<el-input v-model="query.createTime" clearable placeholder="创建时间" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||||
|
<label class="el-form-item-label">是否启用</label>
|
||||||
|
<el-input v-model="query.enabled" clearable placeholder="是否启用" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||||
|
<rrOperation :crud="crud" />
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
||||||
|
<el-form-item label="id">
|
||||||
|
<el-input v-model="form.id" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="名称" prop="name">
|
||||||
|
<el-input v-model="form.name" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述">
|
||||||
|
<el-input v-model="form.description" :rows="3" type="textarea" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<el-date-picker v-model="form.createTime" type="datetime" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新时间">
|
||||||
|
<el-date-picker v-model="form.updateTime" type="datetime" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图标">
|
||||||
|
<el-input v-model="form.icon" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序">
|
||||||
|
<el-input v-model="form.sort" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否启用">
|
||||||
|
未设置字典,请手动设置 Radio
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="small" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="id" label="id" />
|
||||||
|
<el-table-column prop="name" label="名称" />
|
||||||
|
<el-table-column prop="description" label="描述" />
|
||||||
|
<el-table-column prop="createTime" label="创建时间" />
|
||||||
|
<el-table-column prop="updateTime" label="更新时间" />
|
||||||
|
<el-table-column prop="icon" label="图标" />
|
||||||
|
<el-table-column prop="sort" label="排序" />
|
||||||
|
<el-table-column prop="enabled" label="是否启用" />
|
||||||
|
<el-table-column v-if="checkPer(['admin','sport:edit','sport:del'])" label="操作" width="150px" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudSport from '@/api/sport'
|
||||||
|
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
|
const defaultForm = { id: null, name: null, description: null, createTime: null, updateTime: null, icon: null, sort: null, enabled: null }
|
||||||
|
export default {
|
||||||
|
name: 'Sport',
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({ title: 'sport', url: 'api/sport', idField: 'id', sort: 'id,desc', crudMethod: { ...crudSport }})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
add: ['admin', 'sport:add'],
|
||||||
|
edit: ['admin', 'sport:edit'],
|
||||||
|
del: ['admin', 'sport:del']
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
queryTypeOptions: [
|
||||||
|
{ key: 'name', display_name: '名称' },
|
||||||
|
{ key: 'createTime', display_name: '创建时间' },
|
||||||
|
{ key: 'enabled', display_name: '是否启用' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?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">
|
||||||
|
<parent>
|
||||||
|
<artifactId>eladmin</artifactId>
|
||||||
|
<groupId>me.zhengjie</groupId>
|
||||||
|
<version>2.7</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<properties>
|
||||||
|
<hutool.version>5.8.35</hutool.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<artifactId>sport</artifactId>
|
||||||
|
<name>sport</name>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!--工具包-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>${hutool.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>me.zhengjie</groupId>
|
||||||
|
<artifactId>eladmin-tools</artifactId>
|
||||||
|
<version>2.7</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1,27 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/sport',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/sport/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/sport',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
|
@ -0,0 +1,82 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import cn.hutool.core.bean.copier.CopyOptions;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import org.hibernate.annotations.*;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @description /
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
@Entity
|
||||||
|
@Data
|
||||||
|
@Table(name="sport")
|
||||||
|
public class Sport implements Serializable {
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@Column(name = "`id`")
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Column(name = "`name`",nullable = false)
|
||||||
|
@NotBlank
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Column(name = "`description`")
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@Column(name = "`create_time`")
|
||||||
|
@CreationTimestamp
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
@Column(name = "`update_time`")
|
||||||
|
@UpdateTimestamp
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
|
||||||
|
@Column(name = "`icon`")
|
||||||
|
@ApiModelProperty(value = "图标")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@Column(name = "`sort`")
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@Column(name = "`enabled`")
|
||||||
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
public void copy(Sport source){
|
||||||
|
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.repository;
|
||||||
|
|
||||||
|
import com.srr.domain.Sport;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
public interface SportRepository extends JpaRepository<Sport, Long>, JpaSpecificationExecutor<Sport> {
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.rest;
|
||||||
|
|
||||||
|
import me.zhengjie.annotation.Log;
|
||||||
|
import com.srr.domain.Sport;
|
||||||
|
import com.srr.service.SportService;
|
||||||
|
import com.srr.service.dto.SportQueryCriteria;
|
||||||
|
import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import me.zhengjie.utils.PageResult;
|
||||||
|
import com.srr.service.dto.SportDto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "sport")
|
||||||
|
@RequestMapping("/api/sport")
|
||||||
|
public class SportController {
|
||||||
|
|
||||||
|
private final SportService sportService;
|
||||||
|
|
||||||
|
@AnonymousGetMapping(value = "/ping")
|
||||||
|
public String ping() {
|
||||||
|
return "pong";
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
@PreAuthorize("@el.check('sport:list')")
|
||||||
|
public void exportSport(HttpServletResponse response, SportQueryCriteria criteria) throws IOException {
|
||||||
|
sportService.download(sportService.queryAll(criteria), response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@ApiOperation("查询sport")
|
||||||
|
@PreAuthorize("@el.check('sport:list')")
|
||||||
|
public ResponseEntity<PageResult<SportDto>> querySport(SportQueryCriteria criteria, Pageable pageable){
|
||||||
|
return new ResponseEntity<>(sportService.queryAll(criteria,pageable),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增sport")
|
||||||
|
@ApiOperation("新增sport")
|
||||||
|
@PreAuthorize("@el.check('sport:add')")
|
||||||
|
public ResponseEntity<Object> createSport(@Validated @RequestBody Sport resources){
|
||||||
|
sportService.create(resources);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改sport")
|
||||||
|
@ApiOperation("修改sport")
|
||||||
|
@PreAuthorize("@el.check('sport:edit')")
|
||||||
|
public ResponseEntity<Object> updateSport(@Validated @RequestBody Sport resources){
|
||||||
|
sportService.update(resources);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping
|
||||||
|
@Log("删除sport")
|
||||||
|
@ApiOperation("删除sport")
|
||||||
|
@PreAuthorize("@el.check('sport:del')")
|
||||||
|
public ResponseEntity<Object> deleteSport(@ApiParam(value = "传ID数组[]") @RequestBody Long[] ids) {
|
||||||
|
sportService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,83 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.service;
|
||||||
|
|
||||||
|
import com.srr.domain.Sport;
|
||||||
|
import com.srr.service.dto.SportDto;
|
||||||
|
import com.srr.service.dto.SportQueryCriteria;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import me.zhengjie.utils.PageResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @description 服务接口
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
public interface SportService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param criteria 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return Map<String,Object>
|
||||||
|
*/
|
||||||
|
PageResult<SportDto> queryAll(SportQueryCriteria criteria, Pageable pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有数据不分页
|
||||||
|
* @param criteria 条件参数
|
||||||
|
* @return List<SportDto>
|
||||||
|
*/
|
||||||
|
List<SportDto> queryAll(SportQueryCriteria criteria);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
* @param id ID
|
||||||
|
* @return SportDto
|
||||||
|
*/
|
||||||
|
SportDto findById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param resources /
|
||||||
|
*/
|
||||||
|
void create(Sport resources);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param resources /
|
||||||
|
*/
|
||||||
|
void update(Sport resources);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出数据
|
||||||
|
* @param all 待导出的数据
|
||||||
|
* @param response /
|
||||||
|
* @throws IOException /
|
||||||
|
*/
|
||||||
|
void download(List<SportDto> all, HttpServletResponse response) throws IOException;
|
||||||
|
}
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @description /
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SportDto implements Serializable {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Timestamp updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "图标")
|
||||||
|
private String icon;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
private Boolean enabled;
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.List;
|
||||||
|
import me.zhengjie.annotation.Query;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class SportQueryCriteria{
|
||||||
|
|
||||||
|
/** 模糊 */
|
||||||
|
@Query(type = Query.Type.INNER_LIKE)
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 精确 */
|
||||||
|
@Query
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Timestamp createTime;
|
||||||
|
|
||||||
|
/** 精确 */
|
||||||
|
@Query
|
||||||
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
private Boolean enabled;
|
||||||
|
}
|
|
@ -0,0 +1,111 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.service.impl;
|
||||||
|
|
||||||
|
import com.srr.domain.Sport;
|
||||||
|
import me.zhengjie.utils.ValidationUtil;
|
||||||
|
import me.zhengjie.utils.FileUtil;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import com.srr.repository.SportRepository;
|
||||||
|
import com.srr.service.SportService;
|
||||||
|
import com.srr.service.dto.SportDto;
|
||||||
|
import com.srr.service.dto.SportQueryCriteria;
|
||||||
|
import com.srr.service.mapstruct.SportMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.data.domain.Page;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import me.zhengjie.utils.PageUtil;
|
||||||
|
import me.zhengjie.utils.QueryHelp;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import me.zhengjie.utils.PageResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @description 服务实现
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SportServiceImpl implements SportService {
|
||||||
|
|
||||||
|
private final SportRepository sportRepository;
|
||||||
|
private final SportMapper sportMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<SportDto> queryAll(SportQueryCriteria criteria, Pageable pageable){
|
||||||
|
Page<Sport> page = sportRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable);
|
||||||
|
return PageUtil.toPage(page.map(sportMapper::toDto));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SportDto> queryAll(SportQueryCriteria criteria){
|
||||||
|
return sportMapper.toDto(sportRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public SportDto findById(Long id) {
|
||||||
|
Sport sport = sportRepository.findById(id).orElseGet(Sport::new);
|
||||||
|
ValidationUtil.isNull(sport.getId(),"Sport","id",id);
|
||||||
|
return sportMapper.toDto(sport);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void create(Sport resources) {
|
||||||
|
sportRepository.save(resources);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void update(Sport resources) {
|
||||||
|
Sport sport = sportRepository.findById(resources.getId()).orElseGet(Sport::new);
|
||||||
|
ValidationUtil.isNull( sport.getId(),"Sport","id",resources.getId());
|
||||||
|
sport.copy(resources);
|
||||||
|
sportRepository.save(sport);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAll(Long[] ids) {
|
||||||
|
for (Long id : ids) {
|
||||||
|
sportRepository.deleteById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(List<SportDto> all, HttpServletResponse response) throws IOException {
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (SportDto sport : all) {
|
||||||
|
Map<String,Object> map = new LinkedHashMap<>();
|
||||||
|
map.put("名称", sport.getName());
|
||||||
|
map.put("描述", sport.getDescription());
|
||||||
|
map.put("创建时间", sport.getCreateTime());
|
||||||
|
map.put("更新时间", sport.getUpdateTime());
|
||||||
|
map.put("图标", sport.getIcon());
|
||||||
|
map.put("排序", sport.getSort());
|
||||||
|
map.put("是否启用", sport.getEnabled());
|
||||||
|
list.add(map);
|
||||||
|
}
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019-2025 Zheng Jie
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package com.srr.service.mapstruct;
|
||||||
|
|
||||||
|
import me.zhengjie.base.BaseMapper;
|
||||||
|
import com.srr.domain.Sport;
|
||||||
|
import com.srr.service.dto.SportDto;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.ReportingPolicy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @website https://eladmin.vip
|
||||||
|
* @author Chanheng
|
||||||
|
* @date 2025-05-17
|
||||||
|
**/
|
||||||
|
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||||
|
public interface SportMapper extends BaseMapper<SportDto, Sport> {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue