初始化

master
ShiSiWei 2023-10-05 19:13:20 +08:00
commit a88fc2c1a3
135 changed files with 4671 additions and 0 deletions

8
.idea/.gitignore vendored 100644
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

18
.idea/compiler.xml 100644
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="bbyb-examination" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="bbyb-examination" options="-parameters" />
</option>
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/../../maven_repository/org/springframework/boot/spring-boot-starter-parent/2.6.2/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JpaBuddyIdeaProjectConfig">
<option name="renamerInitialized" value="true" />
</component>
</project>

15
.idea/misc.xml 100644
View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
<component name="ProjectType">
<option name="id" value="jpab" />
</component>
</project>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/system-server.iml" filepath="$PROJECT_DIR$/.idea/system-server.iml" />
</modules>
</component>
</project>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

6
.idea/vcs.xml 100644
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,509 @@
/*
Navicat MySQL Data Transfer
Source Server : 116.62.209.98
Source Server Version : 50717
Source Host : 116.62.209.98:3306
Source Database : bbyb_examination
Target Server Type : MYSQL
Target Server Version : 50717
File Encoding : 65001
Date: 2023-08-08 11:08:35
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for examination_apply
-- ----------------------------
DROP TABLE IF EXISTS `examination_apply`;
CREATE TABLE `examination_apply` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id;id',
`user_id` int(20) DEFAULT NULL COMMENT '考生id;考生id',
`plan_id` int(20) DEFAULT NULL COMMENT '考试计划id;考试计划id',
`examination_code` varchar(20) DEFAULT NULL COMMENT '考号;考号',
`apply_state` int(2) DEFAULT '0' COMMENT '申请状态;申请状态0 未处理 1 已通过 2 未通过)',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人;创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间;创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人;更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间;更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试申请表;考试申请表';
-- ----------------------------
-- Records of examination_apply
-- ----------------------------
-- ----------------------------
-- Table structure for examination_major
-- ----------------------------
DROP TABLE IF EXISTS `examination_major`;
CREATE TABLE `examination_major` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id;id',
`major_code` varchar(50) DEFAULT NULL COMMENT '专业编码;专业编码',
`major_name` varchar(50) DEFAULT NULL COMMENT '专业名称;专业名称',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人;创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间;创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人;更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间;更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试专业表;考试专业表';
-- ----------------------------
-- Records of examination_major
-- ----------------------------
-- ----------------------------
-- Table structure for examination_paper
-- ----------------------------
DROP TABLE IF EXISTS `examination_paper`;
CREATE TABLE `examination_paper` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`paper_name` varchar(100) DEFAULT NULL COMMENT '试卷名称;试卷名称',
`paper_code` varchar(50) DEFAULT NULL COMMENT '试卷号;试卷号',
`subject_id` int(20) DEFAULT NULL COMMENT '考试科目id;考试科目id',
`examination_start_time` datetime DEFAULT NULL COMMENT '考试开始时间;考试开始时间',
`examination_end_time` datetime DEFAULT NULL COMMENT '考试结束时间;考试结束时间',
`plan_id` int(20) DEFAULT NULL COMMENT '所属考试计划id;所属考试计划id',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='试卷表;试卷表';
-- ----------------------------
-- Records of examination_paper
-- ----------------------------
-- ----------------------------
-- Table structure for examination_paper_answer
-- ----------------------------
DROP TABLE IF EXISTS `examination_paper_answer`;
CREATE TABLE `examination_paper_answer` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`question_id` int(20) DEFAULT NULL COMMENT '题目id;题目id',
`answer_text` varchar(4000) DEFAULT NULL COMMENT '标准答案;标准答案',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='试卷答案表;试卷答案表';
-- ----------------------------
-- Records of examination_paper_answer
-- ----------------------------
-- ----------------------------
-- Table structure for examination_paper_question
-- ----------------------------
DROP TABLE IF EXISTS `examination_paper_question`;
CREATE TABLE `examination_paper_question` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id;id',
`paper_id` int(20) DEFAULT NULL COMMENT '试卷id;试卷id',
`question_title` varchar(4000) DEFAULT NULL COMMENT '题目标题;题目标题',
`quertion_num` varchar(3) DEFAULT NULL COMMENT '题目号;题目号',
`quertion_type` varchar(10) DEFAULT NULL COMMENT '题型;题型',
`pre_question_id` int(20) DEFAULT NULL COMMENT '上一道题目id;上一道题目id',
`score` decimal(5,1) DEFAULT NULL COMMENT '题目分数;题目分数',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人;创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间;创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人;更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间;更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='试卷题目表;试卷题目表';
-- ----------------------------
-- Records of examination_paper_question
-- ----------------------------
-- ----------------------------
-- Table structure for examination_paper_result
-- ----------------------------
DROP TABLE IF EXISTS `examination_paper_result`;
CREATE TABLE `examination_paper_result` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`question_id` int(20) DEFAULT NULL COMMENT '考试题目id;考试题目id',
`user_id` int(20) DEFAULT NULL COMMENT '考试人;考试人',
`answer_text` varchar(4000) DEFAULT NULL COMMENT '答案;答案',
`score` decimal(4,1) DEFAULT NULL COMMENT '得分;得分',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试结果表;考试结果表';
-- ----------------------------
-- Records of examination_paper_result
-- ----------------------------
-- ----------------------------
-- Table structure for examination_paper_score
-- ----------------------------
DROP TABLE IF EXISTS `examination_paper_score`;
CREATE TABLE `examination_paper_score` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`paper_id` int(20) DEFAULT NULL COMMENT '试卷id;paper_id',
`user_id` int(20) DEFAULT NULL COMMENT '考生id;user_id',
`score` decimal(4,1) DEFAULT '0.0' COMMENT '总分数',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试数据表;考试数据表';
-- ----------------------------
-- Records of examination_paper_score
-- ----------------------------
-- ----------------------------
-- Table structure for examination_plan
-- ----------------------------
DROP TABLE IF EXISTS `examination_plan`;
CREATE TABLE `examination_plan` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`plan_name` varchar(100) DEFAULT NULL COMMENT '考试计划名称;考试计划名称',
`plan_explain` varchar(255) DEFAULT NULL COMMENT '计划说明;计划说明',
`plan_start_time` datetime DEFAULT NULL COMMENT '计划开始时间;考试开始时间',
`plan_end_time` datetime DEFAULT NULL COMMENT '计划结束时间;考试结束时间',
`major_id` int(20) DEFAULT NULL COMMENT '考试专业;考试专业',
`user_in_charge` int(20) DEFAULT NULL COMMENT '计划负责人;计划负责人',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试计划;考试计划';
-- ----------------------------
-- Records of examination_plan
-- ----------------------------
-- ----------------------------
-- Table structure for examination_subject
-- ----------------------------
DROP TABLE IF EXISTS `examination_subject`;
CREATE TABLE `examination_subject` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`subject_code` varchar(50) DEFAULT NULL COMMENT '学科编码;学科编码',
`subject_name` varchar(50) DEFAULT NULL COMMENT '学科名称;学科名称',
`major_id` int(20) DEFAULT NULL COMMENT '专业id;专业id',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='考试学科表;考试学科表';
-- ----------------------------
-- Records of examination_subject
-- ----------------------------
-- ----------------------------
-- Table structure for menu
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`menu_code` varchar(50) DEFAULT NULL COMMENT '菜单编码',
`menu_name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
`menu_authority_code` varchar(50) DEFAULT NULL COMMENT '菜单权限编码',
`menu_path` varchar(100) DEFAULT NULL COMMENT '菜单路径',
`parent_menu_id` int(11) DEFAULT NULL COMMENT '父级菜单id',
`level` int(2) DEFAULT NULL COMMENT '菜单等级',
`menu_type` int(1) DEFAULT '0' COMMENT '菜单类型0 菜单 1 按钮)',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) DEFAULT '0' COMMENT '数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 COMMENT='菜单表;菜单表';
-- ----------------------------
-- Records of menu
-- ----------------------------
INSERT INTO `menu` VALUES ('3', '基础设置', '基础设置', 'system/base', 'system/base', '0', '1', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('4', '账号信息', '账号信息', 'system/base/user', 'system/base/user', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('5', '菜单信息', '菜单信息', 'system/base/menu', 'system/base/menu', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('6', '角色信息', '角色信息', 'system/base/role', 'system/base/role', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('7', '字典信息', '字典信息', 'system/base/dic', 'system/base/dic', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('8', '题型信息', '题型信息', 'system/base/questionType', 'system/base/questionType', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('9', '考试管理', '考试管理', 'system/examination', 'system/examination', '0', '1', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('10', '考试计划', '考试计划', 'system/examination/plan', 'system/examination/plan', '9', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('11', '试卷管理', '试卷管理', 'system/examination/paper', 'system/examination/paper', '9', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('12', '考试申请', '考试申请', 'system/examination/apply', 'system/examination/apply', '9', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('13', '答卷管理', '答卷管理', 'system/examination/result', 'system/examination/result', '9', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('14', '考试结果统计', '考试结果统计', 'system/examination/statistics', 'system/examination/statistics', '9', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('15', '考试学科', '考试学科', 'system/base/subject', 'system/base/subject', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('16', '考试专业', '考试专业', 'system/base/major', 'system/base/major', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('17', '新增', '新增', 'system/base/user/add', 'system/base/useradd', '4', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('18', '修改', '修改', 'system/base/user/update', 'system/base/user/update', '4', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('19', '删除', '删除', 'system/base/user/delete', 'system/base/user/delete', '4', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('20', '新增', '新增', 'system/base/menu/add', 'system/base/menu/add', '5', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('21', '修改', '修改', 'system/base/menu/update', 'system/base/menu/update', '5', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('22', '删除', '删除', 'system/base/menu/delete', 'system/base/menu/delete', '5', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('23', '新增', '新增', 'system/base/role/add', 'system/base/role/add', '6', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('24', '修改', '修改', 'system/base/role/update', 'system/base/role/update', '6', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('25', '删除', '删除', 'system/base/role/delete', 'system/base/role/delete', '6', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('26', '新增', '新增', 'system/base/dic/add', 'system/base/dic/add', '7', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('27', '修改', '修改', 'system/base/dic/update', 'system/base/dic/update', '7', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('28', '删除', '删除', 'system/base/dic/delete', 'system/base/dic/delete', '7', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('29', '新增', '新增', 'system/base/questionType/add', 'system/base/questionType/add', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('30', '修改', '修改', 'system/base/questionType/update', 'system/base/questionType/update', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('31', '删除', '删除', 'system/base/questionType/delete', 'system/base/questionType/delete', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('32', '新增', '新增', 'system/examination/plan/add', 'system/examination/plan/add', '10', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('33', '修改', '修改', 'system/examination/plan/update', 'system/examination/plan/update', '10', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('34', '删除', '删除', 'system/examination/plan/delete', 'system/examination/plan/delete', '10', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('35', '新增', '新增', 'system/examination/paper/add', 'system/examination/paper/add', '11', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('36', '修改', '修改', 'system/examination/paper/update', 'system/examination/paper/update', '11', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('37', '删除', '删除', 'system/examination/paper/delete', 'system/examination/paper/delete', '11', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('38', '申请', '申请', 'system/examination/apply/add', 'system/examination/apply/add', '12', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('39', '修改', '修改', 'system/examination/apply/update', 'system/examination/apply/update', '12', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('40', '删除', '删除', 'system/examination/apply/delete', 'system/examination/apply/delete', '12', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('41', '审核', '审核', 'system/examination/apply/audit', 'system/examination/apply/audit', '12', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('42', '修改', '修改', 'system/examination/result/update', 'system/examination/result/update', '13', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('43', '重新核对答案', '重新核对答案', 'system/examination/result/recheck', 'system/examination/result/recheck', '13', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('44', '新增', '新增', 'system/base/subject/add', 'system/base/subject/add', '15', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('45', '修改', '修改', 'system/base/subject/update', 'system/base/subject/update', '15', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('46', '删除', '删除', 'system/base/subject/delete', 'system/base/subject/delete', '15', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('47', '新增', '新增', 'system/base/major/add', 'system/base/major/add', '16', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('48', '修改', '修改', 'system/base/major/update', 'system/base/major/update', '16', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu` VALUES ('49', '删除', '删除', 'system/base/major/delete', 'system/base/major/delete', '16', '3', '1', 'admin', '2023-02-10 13:31:26', null, null, '0');
-- ----------------------------
-- Table structure for menu_copy1
-- ----------------------------
DROP TABLE IF EXISTS `menu_copy1`;
CREATE TABLE `menu_copy1` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`menu_code` varchar(50) DEFAULT NULL COMMENT '菜单编码',
`menu_name` varchar(50) DEFAULT NULL COMMENT '菜单名称',
`menu_authority_code` varchar(50) DEFAULT NULL COMMENT '菜单权限编码',
`menu_path` varchar(100) DEFAULT NULL COMMENT '菜单路径',
`parent_menu_id` int(11) DEFAULT NULL COMMENT '父级菜单id',
`level` int(2) DEFAULT NULL COMMENT '菜单等级',
`menu_type` int(1) DEFAULT '0' COMMENT '菜单类型0 菜单 1 按钮)',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) DEFAULT '0' COMMENT '数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='菜单表;菜单表';
-- ----------------------------
-- Records of menu_copy1
-- ----------------------------
INSERT INTO `menu_copy1` VALUES ('3', '基础设置', '基础设置', 'system/base', 'system/base', '0', '1', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu_copy1` VALUES ('4', '账号信息', '账号信息', 'system/base/user', 'system/base/user', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu_copy1` VALUES ('5', '菜单信息', '菜单信息', 'system/base/menu', 'system/base/menu', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
INSERT INTO `menu_copy1` VALUES ('6', '角色信息', '角色信息', 'system/base/role', 'system/base/role', '3', '2', '0', 'admin', '2023-02-10 13:31:26', null, null, '0');
-- ----------------------------
-- Table structure for question_type
-- ----------------------------
DROP TABLE IF EXISTS `question_type`;
CREATE TABLE `question_type` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id;id',
`question_code` varchar(50) DEFAULT NULL COMMENT '题型编码;题型编码',
`question_name` varchar(50) DEFAULT NULL COMMENT '题型名称;题型名称',
`grading_type` int(1) DEFAULT NULL COMMENT '判卷方式;判卷方式1 匹配答案 2 主观判断)',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人;创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间;创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人;更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间;更新时间',
`invalid` int(1) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='题型表;题型表';
-- ----------------------------
-- Records of question_type
-- ----------------------------
-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`role_code` varchar(50) DEFAULT NULL COMMENT '角色编码',
`role_name` varchar(50) DEFAULT NULL COMMENT '角色名称',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COMMENT='角色表;角色表';
-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES ('1', 'asd', 'qwe', 'zxc', '2023-08-07 12:12:12', '杰克', '2023-08-07 12:12:12', '1');
INSERT INTO `role` VALUES ('2', 'asd', 'qwe', 'zxc', '2023-08-07 12:12:12', '杰克', '2023-08-07 12:12:12', '1');
INSERT INTO `role` VALUES ('3', '11246', 'fghcj', 'qwf', '2023-09-02 12:23:23', 'ssssssdf', '2023-09-02 12:23:23', '1');
INSERT INTO `role` VALUES ('5', '12344', 'fghj', 'qwf', '2023-09-02 12:23:23', 'ssssssdf', '2023-09-02 12:23:23', '1');
INSERT INTO `role` VALUES ('7', '12345', 'fghej', 'qwf', '2023-09-02 12:23:23', 'ssssssdf', '2023-09-02 12:23:23', '1');
INSERT INTO `role` VALUES ('19', 'qwe', 'qwd', 'asdv', '2023-01-01 12:12:23', 'wef', '2023-01-01 12:12:23', '1');
INSERT INTO `role` VALUES ('21', 'lign_role_code1', 'lign_role_name1', '张三', '2023-03-06 16:38:16', '张三', '2023-03-06 16:38:16', '1');
INSERT INTO `role` VALUES ('27', 'lign_role_code3', 'lign_role_name3', '张三', '2023-03-07 09:26:03', '张三', '2023-03-07 09:26:03', '0');
INSERT INTO `role` VALUES ('28', 'test_role1', '测试角色1', null, '2023-03-07 13:37:50', null, '2023-03-07 13:37:50', '1');
INSERT INTO `role` VALUES ('29', 'test_role1', '测试角色1', null, '2023-03-07 14:30:29', null, '2023-03-07 14:30:29', '0');
INSERT INTO `role` VALUES ('30', 'TEST', '测试角色2', null, '2023-03-07 14:39:56', null, '2023-03-07 15:19:15', '1');
INSERT INTO `role` VALUES ('31', 'test_role1', '测试角色1', null, '2023-03-07 17:05:26', null, '2023-03-07 17:05:26', '1');
INSERT INTO `role` VALUES ('32', 'test_role3', '测试角色3', null, '2023-03-07 17:33:30', null, '2023-03-07 17:33:30', '1');
INSERT INTO `role` VALUES ('33', 'asd', 'qwe', 'zxc', '2023-08-07 12:12:12', '杰克', '2023-08-07 12:12:12', '1');
-- ----------------------------
-- Table structure for role_menu
-- ----------------------------
DROP TABLE IF EXISTS `role_menu`;
CREATE TABLE `role_menu` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`role_id` int(20) DEFAULT NULL COMMENT '角色id',
`menu_id` int(20) DEFAULT NULL COMMENT '菜单id',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COMMENT='角色菜单关联表;角色菜单关联表';
-- ----------------------------
-- Records of role_menu
-- ----------------------------
INSERT INTO `role_menu` VALUES ('28', '19', '3', '创建人', '2023-03-06 15:34:28', null, null, '0');
INSERT INTO `role_menu` VALUES ('29', '19', '4', '创建人', '2023-03-06 15:34:28', null, null, '0');
INSERT INTO `role_menu` VALUES ('30', '19', '17', '创建人', '2023-03-06 15:34:28', null, null, '0');
INSERT INTO `role_menu` VALUES ('31', '19', '5', '创建人', '2023-03-06 15:34:28', null, null, '0');
INSERT INTO `role_menu` VALUES ('32', '19', '20', '创建人', '2023-03-06 15:34:28', null, null, '0');
INSERT INTO `role_menu` VALUES ('33', '19', '21', '创建人', '2023-03-06 15:34:28', null, null, '0');
INSERT INTO `role_menu` VALUES ('81', '11', '5', '系统管理员', '2023-08-08 00:19:35', '系统管理员', '2023-08-08 00:19:35', '1');
INSERT INTO `role_menu` VALUES ('82', '11', '6', '系统管理员', '2023-08-08 00:19:35', '系统管理员', '2023-08-08 00:19:35', '1');
INSERT INTO `role_menu` VALUES ('83', '11', '7', '系统管理员', '2023-08-08 00:19:35', '系统管理员', '2023-08-08 00:19:35', '1');
INSERT INTO `role_menu` VALUES ('84', '11', '5', '系统管理员', '2023-08-08 00:19:35', '系统管理员', '2023-08-08 00:19:35', '0');
INSERT INTO `role_menu` VALUES ('85', '11', '6', '系统管理员', '2023-08-08 00:19:35', '系统管理员', '2023-08-08 00:19:35', '0');
INSERT INTO `role_menu` VALUES ('86', '11', '7', '系统管理员', '2023-08-08 00:19:35', '系统管理员', '2023-08-08 00:19:35', '0');
-- ----------------------------
-- Table structure for role_user
-- ----------------------------
DROP TABLE IF EXISTS `role_user`;
CREATE TABLE `role_user` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`role_id` int(20) DEFAULT NULL COMMENT '角色id',
`user_id` int(20) DEFAULT NULL COMMENT '用户id',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=100041 DEFAULT CHARSET=utf8 COMMENT='角色用户关联表;角色用户关联表';
-- ----------------------------
-- Records of role_user
-- ----------------------------
INSERT INTO `role_user` VALUES ('100001', '19', '29', '创建人', '2023-03-06 15:51:11', null, null, '0');
INSERT INTO `role_user` VALUES ('100002', '19', '11', '张三', '2023-08-07 02:05:18', '张三', '2023-08-07 02:05:18', '1');
INSERT INTO `role_user` VALUES ('100008', '11', '11', '张三', '2023-08-07 02:05:24', null, '2023-08-07 02:05:24', '0');
INSERT INTO `role_user` VALUES ('100009', '33', '11', '张三', '2023-08-07 01:55:27', null, '2023-08-07 01:55:27', '0');
INSERT INTO `role_user` VALUES ('100010', '29', '11', null, '2023-08-07 01:55:29', null, '2023-08-07 01:55:29', '0');
INSERT INTO `role_user` VALUES ('100011', '30', '29', null, '2023-03-07 14:40:11', null, '2023-03-07 14:40:11', '1');
INSERT INTO `role_user` VALUES ('100032', '2', '1', '系统管理员', '2023-08-07 15:08:48', '系统管理员', '2023-08-07 15:08:48', '0');
INSERT INTO `role_user` VALUES ('100033', '3', '1', '系统管理员', '2023-08-07 15:08:48', '系统管理员', '2023-08-07 15:08:48', '0');
INSERT INTO `role_user` VALUES ('100034', '3', '1', '系统管理员', '2023-08-07 15:08:48', '系统管理员', '2023-08-07 15:08:48', '0');
INSERT INTO `role_user` VALUES ('100035', '4', '19', '系统管理员', '2023-08-08 00:19:30', '系统管理员', '2023-08-08 00:19:30', '1');
INSERT INTO `role_user` VALUES ('100036', '5', '19', '系统管理员', '2023-08-08 00:19:30', '系统管理员', '2023-08-08 00:19:30', '1');
INSERT INTO `role_user` VALUES ('100037', '6', '19', '系统管理员', '2023-08-08 00:19:30', '系统管理员', '2023-08-08 00:19:30', '1');
INSERT INTO `role_user` VALUES ('100038', '4', '19', '系统管理员', '2023-08-08 00:19:30', '系统管理员', '2023-08-08 00:19:30', '0');
INSERT INTO `role_user` VALUES ('100039', '5', '19', '系统管理员', '2023-08-08 00:19:30', '系统管理员', '2023-08-08 00:19:30', '0');
INSERT INTO `role_user` VALUES ('100040', '6', '19', '系统管理员', '2023-08-08 00:19:30', '系统管理员', '2023-08-08 00:19:30', '0');
-- ----------------------------
-- Table structure for sys_dic
-- ----------------------------
DROP TABLE IF EXISTS `sys_dic`;
CREATE TABLE `sys_dic` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`group_name` varchar(50) DEFAULT NULL COMMENT '字典分组名称',
`item_name` varchar(50) DEFAULT NULL COMMENT '项目名称',
`item_code` varchar(50) DEFAULT NULL COMMENT '项目编码',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(2) NOT NULL DEFAULT '0' COMMENT '是否作废;数据作废标识0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据字典表;数据字典表';
-- ----------------------------
-- Records of sys_dic
-- ----------------------------
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
`user_code` varchar(50) DEFAULT NULL COMMENT '用户编码',
`user_name` varchar(50) DEFAULT NULL COMMENT '用户名称',
`phone` varchar(100) DEFAULT NULL COMMENT '手机号',
`password` varchar(255) DEFAULT NULL COMMENT '密码',
`email` varchar(100) DEFAULT NULL COMMENT '邮箱',
`id_card` varchar(100) DEFAULT NULL COMMENT '身份证号',
`gender` int(1) DEFAULT NULL COMMENT '性别1 男 2 女)',
`is_admin` int(1) DEFAULT '0' COMMENT '是否超级管理员0 否 1 是)',
`is_enable` int(1) DEFAULT '0' COMMENT '是否启用0 启用 1 禁用)',
`create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`invalid` int(1) DEFAULT NULL COMMENT '数据是否作废0 正常 1 作废)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COMMENT='用户表;用户表';
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', '110001', '管理员', '13211112222', '670b14728ad9902aecba32e22fa4f6bd', null, null, '1', '1', '0', 'abc', '2023-02-10 13:31:26', null, null, null);
INSERT INTO `user` VALUES ('2', '110002', '业务人员张', '13211116666', '670b14728ad9902aecba32e22fa4f6bd', null, null, '1', '0', '0', 'abc', '2023-02-10 13:31:26', null, null, null);
INSERT INTO `user` VALUES ('23', 'lign', 'lign', '15551123333', '123456', null, null, null, '0', '0', null, null, null, null, null);
INSERT INTO `user` VALUES ('29', 'test002', '测试002', '18612345678', '98745678', 'abc@qq.com', '', '1', '1', '0', '', null, null, null, '0');
-- ----------------------------
-- Function structure for queryMenuChildren
-- ----------------------------
DROP FUNCTION IF EXISTS `queryMenuChildren`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` FUNCTION `queryMenuChildren`(nodeId INT) RETURNS varchar(20000) CHARSET utf8
BEGIN
DECLARE sTemp INT;
DECLARE sTempChd INT;
SET sTemp='$';
SET sTempChd = nodeId;
WHILE sTempChd IS NOT NULL DO
SET sTemp= CONCAT(sTemp,',',sTempChd);
SELECT GROUP_CONCAT(id) INTO sTempChd FROM `menu` WHERE FIND_IN_SET(parent_menu_id,sTempChd)>0;
END WHILE;
RETURN sTemp;
END
;;
DELIMITER ;

147
pom.xml 100644
View File

@ -0,0 +1,147 @@
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- 项目依赖的父工程-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.8</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<!-- 项目的基本信息-->
<groupId>com.bbyb.operating.examination</groupId>
<artifactId>bbyb-examination</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>bbyb-examination</name>
<description>bbyb-examination</description>
<!-- 项目jdk版本-->
<properties>
<java.version>1.8</java.version>
</properties>
<!-- 依赖-->
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-typehandlers-jsr310</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!--knife4j-->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.9</version>
</dependency>
<!-- 以下是单元测试依赖-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<!-- mockito3 -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.12.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.6.28</version>
<scope>test</scope>
</dependency>
<!-- mockito for junit5 -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>2.23.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>junit-jupiter-api</artifactId>
<groupId>org.junit.jupiter</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.24.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("com.bbyb.operating.examination.mapper")
public class BbybExaminationApplication {
public static void main(String[] args) {
SpringApplication.run(BbybExaminationApplication.class, args);
System.out.printf("启动成功================================================================================================================================================");
}
}

View File

@ -0,0 +1,63 @@
/**
* Copyright (c) 2016-2019 All rights reserved.
*
* https://www.renren.io
*
*
*/
package com.bbyb.operating.examination.config;
/**
*
*
* @author Mark sunlightcs@gmail.com
*/
public class BizException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String msg;
private int code = 500;
public BizException(String msg) {
super(msg);
this.msg = msg;
}
public BizException(String msg, Throwable e) {
super(msg, e);
this.msg = msg;
}
public BizException(int code, String msg) {
super(msg);
this.msg = msg;
this.code = code;
}
public BizException(String msg, int code, Throwable e) {
super(msg, e);
this.msg = msg;
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}

View File

@ -0,0 +1,20 @@
package com.bbyb.operating.examination.config;
import com.bbyb.operating.examination.model.vo.CommonResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
/**
* @ClassName: GlobalExceptionHandler
* @Date: 2023/8/8 17:53
* @Version: 1.0
* @Description:
*/
@RestControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(BizException.class)
public CommonResult handleRRException(BizException e){
return CommonResult.error(e.getCode(),e.getMessage());
}
}

View File

@ -0,0 +1,72 @@
package com.bbyb.operating.examination.config;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.TimeZone;
/**
* className: JacksonConfig
* datetime: 2023/2/13 17:41
* author: lx
*/
@Configuration
public class JacksonConfig {
/** 默认日期时间格式 */
public static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
/** 默认日期格式 */
public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
/** 默认时间格式 */
public static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
ObjectMapper objectMapper = new ObjectMapper();
// 忽略json字符串中不识别的属性
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
// 忽略无法转换的对象
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
// PrettyPrinter 格式化输出
objectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);
// NULL不参与序列化
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
// 指定时区
objectMapper.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
// 日期类型字符串处理
objectMapper.setDateFormat(new SimpleDateFormat(DEFAULT_DATE_TIME_FORMAT));
// java8日期日期处理
JavaTimeModule javaTimeModule = new JavaTimeModule();
javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
objectMapper.registerModule(javaTimeModule);
converter.setObjectMapper(objectMapper);
return converter;
}
}

View File

@ -0,0 +1,42 @@
package com.bbyb.operating.examination.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/**
* @BelongsProject: demo02
* @BelongsPackage: com.bw.handler
* @Author: JCC
* @CreateTime: 2023-10-2 10:17
*/
@Configuration
@EnableSwagger2WebMvc
public class Knife4jConfiguration {
@Bean(value = "defaultApi2")
public Docket defaultApi2() {
Docket docket = new Docket(DocumentationType.SWAGGER_2)
.apiInfo(new ApiInfoBuilder()
.title("测试==demo")
.description("# swagger-bootstrap-ui-demo RESTful APIs")
.termsOfServiceUrl("http://www.xx.com/")
.contact(new Contact("玉面小白龙", "", "123@qq.com"))
.version("1.0")
.build())
//分组名称
.groupName("2.X版本")
.select()
//这里指定文档Controller层扫描包路径
.apis(RequestHandlerSelectors.basePackage("com.bbyb.operating.examination.controller"))
.paths(PathSelectors.any())
.build();
return docket;
}
}

View File

@ -0,0 +1,72 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.Role;
import com.bbyb.operating.examination.model.vo.CommonResult;
import com.bbyb.operating.examination.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* className: RoleController
* datetime: 2023/10/2 9:28
* author: JCC
*/
@RestController()
@RequestMapping("/role")
public class RoleController {
@Autowired
private RoleService roleService;
@PostMapping(value = "add")
public CommonResult<Boolean> addRole(@RequestBody Role role){
roleService.addRole(role);
return new CommonResult<>(true);
}
@GetMapping("/allRole")
public List<Role> getAllRole(){
return roleService.getAllRole();
}
/**
* ID
* @param id
* @return int
* @date 2023/10/2 9:52
*/
@PostMapping("/deleteRole/{id}")
public CommonResult<Boolean> deleteRole(@PathVariable Integer id) {
roleService.deleteRole(id);
return new CommonResult<>(true);
};
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.Role
* @date 2023/10/2 9:52
*/
@PostMapping("/getRole/{id}")
public Role getRole(@PathVariable Integer id) {
return roleService.getRole(id);
};
/**
*
* @param row
* @return int
* @date 2023/10/2 9:52
*/
@PostMapping("/updateRole")
public CommonResult<Boolean> updateRole(@RequestBody Role row) {
roleService.updateRole(row);
return new CommonResult<>(true);
};
}

View File

@ -0,0 +1,78 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.RoleMenu;
import com.bbyb.operating.examination.model.vo.CommonResult;
import com.bbyb.operating.examination.service.RoleMenuService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* className: RoleMenuController
* datetime: 2023/10/2 9:28
* author: JCC
*/
@RestController()
@RequestMapping("/roleMenu")
public class RoleMenuController {
@Autowired
private RoleMenuService RoleMenuService;
@PostMapping(value = "add")
public CommonResult<Boolean> addRoleMenu(@RequestBody RoleMenu RoleMenu){
String errorMsg = RoleMenuService.addRoleMenu(RoleMenu);
if(StringUtils.isNotEmpty(errorMsg)){
return new CommonResult<>(603, errorMsg);
}
return new CommonResult<>(true);
}
@GetMapping("/allRoleMenu")
public List<RoleMenu> getAllRoleMenu(){
return RoleMenuService.getAllRoleMenu();
}
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
@PostMapping("/deleteRoleMenu/{id}")
public CommonResult<Boolean> deleteRoleMenu(@PathVariable Integer id) {
RoleMenuService.deleteRoleMenu(id);
return new CommonResult<>(true);
};
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.RoleMenu
* @date 2023/8/8 16:52
*/
@PostMapping("/getRoleMenu/{id}")
public RoleMenu getRoleMenu(@PathVariable Integer id) {
return RoleMenuService.getRoleMenu(id);
};
/**
*
* @param row
* @return int
* @date 2023/8/8 16:53
*/
@PostMapping("/updateRoleMenu")
public CommonResult<Boolean> updateRoleMenu(@RequestBody RoleMenu row) {
RoleMenuService.updateRoleMenu(row);
return new CommonResult<>(true);
};
}

View File

@ -0,0 +1,77 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.RoleUser;
import com.bbyb.operating.examination.model.vo.CommonResult;
import com.bbyb.operating.examination.service.RoleUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* className: RoleUserController
* datetime: 2023/10/2 9:28
* author: JCC
*/
@RestController()
@RequestMapping("/roleUser")
public class RoleUserController {
@Autowired
private RoleUserService RoleUserService;
@PostMapping(value = "add")
public CommonResult<Boolean> addRoleUser(@RequestBody RoleUser RoleUser){
String errorMsg = RoleUserService.addRoleUser(RoleUser);
if(StringUtils.isNotEmpty(errorMsg)){
return new CommonResult<>(603, errorMsg);
}
return new CommonResult<>(true);
}
@GetMapping("/allRoleUser")
public List<RoleUser> getAllRoleUser(){
return RoleUserService.getAllRoleUser();
}
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
@PostMapping("/deleteRoleUser/{id}")
public CommonResult<Boolean> deleteRoleUser(@PathVariable Integer id) {
RoleUserService.deleteRoleUser(id);
return new CommonResult<>(true);
};
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.RoleUser
* @date 2023/8/8 16:52
*/
@PostMapping("/getRoleUser/{id}")
public RoleUser getRoleUser(@PathVariable Integer id) {
return RoleUserService.getRoleUser(id);
};
/**
*
* @param row
* @return int
* @date 2023/8/8 16:53
*/
@PostMapping("/updateRoleUser")
public CommonResult<Boolean> updateRoleUser(@RequestBody RoleUser row) {
RoleUserService.updateRoleUser(row);
return new CommonResult<>(true);
};
}

View File

@ -0,0 +1,104 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.Menu;
import com.bbyb.operating.examination.model.po.Role;
import com.bbyb.operating.examination.model.po.User;
import com.bbyb.operating.examination.model.vo.CommonResult;
import com.bbyb.operating.examination.service.UserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* className: UserController
* datetime: 2023/10/2 9:28
* author: JCC
*/
@RestController()
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@PostMapping(value = "add")
public CommonResult<Boolean> addUser(@RequestBody User user){
if(user == null){
return new CommonResult<>(601, "用户信息不能为空");
}
if(StringUtils.isBlank(user.getUserCode())){
return new CommonResult<>(601, "用户编码不能为空");
}
if(StringUtils.isBlank(user.getUserName())){
return new CommonResult<>(601, "用户名不能为空");
}
if(StringUtils.isBlank(user.getPhone())){
return new CommonResult<>(601, "用户手机号不能为空");
}
if(StringUtils.isBlank(user.getPassword())){
return new CommonResult<>(601, "用户密码不能为空");
}
String errorMsg = userService.addUser(user);
if(StringUtils.isNotEmpty(errorMsg)){
return new CommonResult<>(603, errorMsg);
}
return new CommonResult<>(true);
}
@GetMapping("/allUser")
public List<User> getAllUser(){
return userService.getAllUser();
}
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
@PostMapping("/deleteUser/{id}")
public CommonResult<Boolean> deleteUser(@PathVariable Integer id) {
userService.deleteUser(id);
return new CommonResult<>(true);
};
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.User
* @date 2023/8/8 16:52
*/
@PostMapping("/getUser/{id}")
public User getUser(@PathVariable Integer id) {
return userService.getUser(id);
};
/**
*
* @param row
* @return int
* @date 2023/8/8 16:53
*/
@PostMapping("/updateUser")
public CommonResult<Boolean> updateUser(@RequestBody User row) {
userService.updateUser(row);
return new CommonResult<>(true);
};
@PostMapping("/getUserAllMenu/{id}")
public List<Menu> getUserAllMenu(@PathVariable Integer id) {
return userService.getUserAllMenu(id);
};
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationApply;
import java.util.List;
public interface ExaminationApplyMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationApply row);
ExaminationApply selectByPrimaryKey(Integer id);
List<ExaminationApply> selectAll();
int updateByPrimaryKey(ExaminationApply row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationMajor;
import java.util.List;
public interface ExaminationMajorMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationMajor row);
ExaminationMajor selectByPrimaryKey(Integer id);
List<ExaminationMajor> selectAll();
int updateByPrimaryKey(ExaminationMajor row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationPaperAnswer;
import java.util.List;
public interface ExaminationPaperAnswerMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationPaperAnswer row);
ExaminationPaperAnswer selectByPrimaryKey(Integer id);
List<ExaminationPaperAnswer> selectAll();
int updateByPrimaryKey(ExaminationPaperAnswer row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationPaper;
import java.util.List;
public interface ExaminationPaperMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationPaper row);
ExaminationPaper selectByPrimaryKey(Integer id);
List<ExaminationPaper> selectAll();
int updateByPrimaryKey(ExaminationPaper row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationPaperQuestion;
import java.util.List;
public interface ExaminationPaperQuestionMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationPaperQuestion row);
ExaminationPaperQuestion selectByPrimaryKey(Integer id);
List<ExaminationPaperQuestion> selectAll();
int updateByPrimaryKey(ExaminationPaperQuestion row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationPaperResult;
import java.util.List;
public interface ExaminationPaperResultMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationPaperResult row);
ExaminationPaperResult selectByPrimaryKey(Integer id);
List<ExaminationPaperResult> selectAll();
int updateByPrimaryKey(ExaminationPaperResult row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationPaperScore;
import java.util.List;
public interface ExaminationPaperScoreMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationPaperScore row);
ExaminationPaperScore selectByPrimaryKey(Integer id);
List<ExaminationPaperScore> selectAll();
int updateByPrimaryKey(ExaminationPaperScore row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationPlan;
import java.util.List;
public interface ExaminationPlanMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationPlan row);
ExaminationPlan selectByPrimaryKey(Integer id);
List<ExaminationPlan> selectAll();
int updateByPrimaryKey(ExaminationPlan row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.ExaminationSubject;
import java.util.List;
public interface ExaminationSubjectMapper {
int deleteByPrimaryKey(Integer id);
int insert(ExaminationSubject row);
ExaminationSubject selectByPrimaryKey(Integer id);
List<ExaminationSubject> selectAll();
int updateByPrimaryKey(ExaminationSubject row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.Menu;
import java.util.List;
public interface MenuMapper {
int deleteByPrimaryKey(Integer id);
int insert(Menu row);
Menu selectByPrimaryKey(Integer id);
List<Menu> selectAll();
int updateByPrimaryKey(Menu row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.QuestionType;
import java.util.List;
public interface QuestionTypeMapper {
int deleteByPrimaryKey(Integer id);
int insert(QuestionType row);
QuestionType selectByPrimaryKey(Integer id);
List<QuestionType> selectAll();
int updateByPrimaryKey(QuestionType row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.Role;
import java.util.List;
public interface RoleMapper {
int deleteByPrimaryKey(Integer id);
int insert(Role row);
Role selectByPrimaryKey(Integer id);
List<Role> selectAll();
int updateByPrimaryKey(Role row);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.RoleMenu;
import java.util.List;
public interface RoleMenuMapper {
int deleteByPrimaryKey(Integer id);
int insert(RoleMenu row);
RoleMenu selectByPrimaryKey(Integer id);
List<RoleMenu> selectAll();
int updateByPrimaryKey(RoleMenu row);
}

View File

@ -0,0 +1,20 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.RoleUser;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface RoleUserMapper {
int deleteByPrimaryKey(Integer id);
int insert(RoleUser row);
RoleUser selectByPrimaryKey(Integer id);
List<RoleUser> selectAll();
int updateByPrimaryKey(RoleUser row);
List<RoleUser> getRoleUserByRoleId(@Param("roleId") Integer roleId);
}

View File

@ -0,0 +1,16 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.SysDic;
import java.util.List;
public interface SysDicMapper {
int deleteByPrimaryKey(Integer id);
int insert(SysDic row);
SysDic selectByPrimaryKey(Integer id);
List<SysDic> selectAll();
int updateByPrimaryKey(SysDic row);
}

View File

@ -0,0 +1,19 @@
package com.bbyb.operating.examination.mapper;
import com.bbyb.operating.examination.model.po.Menu;
import com.bbyb.operating.examination.model.po.User;
import java.util.List;
public interface UserMapper {
int deleteByPrimaryKey(Integer id);
int insert(User row);
User selectByPrimaryKey(Integer id);
List<User> selectAll();
int updateByPrimaryKey(User row);
List<Menu> getUserAllMenu(Integer id);
}

View File

@ -0,0 +1,105 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class ExaminationApply {
private Integer id;
private Integer userId;
private Integer planId;
private String examinationCode;
private Integer applyState;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getPlanId() {
return planId;
}
public void setPlanId(Integer planId) {
this.planId = planId;
}
public String getExaminationCode() {
return examinationCode;
}
public void setExaminationCode(String examinationCode) {
this.examinationCode = examinationCode;
}
public Integer getApplyState() {
return applyState;
}
public void setApplyState(Integer applyState) {
this.applyState = applyState;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,85 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class ExaminationMajor {
private Integer id;
private String majorCode;
private String majorName;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getMajorCode() {
return majorCode;
}
public void setMajorCode(String majorCode) {
this.majorCode = majorCode;
}
public String getMajorName() {
return majorName;
}
public void setMajorName(String majorName) {
this.majorName = majorName;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,125 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class ExaminationPaper {
private Integer id;
private String paperName;
private String paperCode;
private Integer subjectId;
private LocalDateTime examinationStartTime;
private LocalDateTime examinationEndTime;
private Integer planId;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPaperName() {
return paperName;
}
public void setPaperName(String paperName) {
this.paperName = paperName;
}
public String getPaperCode() {
return paperCode;
}
public void setPaperCode(String paperCode) {
this.paperCode = paperCode;
}
public Integer getSubjectId() {
return subjectId;
}
public void setSubjectId(Integer subjectId) {
this.subjectId = subjectId;
}
public LocalDateTime getExaminationStartTime() {
return examinationStartTime;
}
public void setExaminationStartTime(LocalDateTime examinationStartTime) {
this.examinationStartTime = examinationStartTime;
}
public LocalDateTime getExaminationEndTime() {
return examinationEndTime;
}
public void setExaminationEndTime(LocalDateTime examinationEndTime) {
this.examinationEndTime = examinationEndTime;
}
public Integer getPlanId() {
return planId;
}
public void setPlanId(Integer planId) {
this.planId = planId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,65 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class ExaminationPaperAnswer {
private Integer id;
private Integer questionId;
private String answerText;
private String createBy;
private LocalDateTime createTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getQuestionId() {
return questionId;
}
public void setQuestionId(Integer questionId) {
this.questionId = questionId;
}
public String getAnswerText() {
return answerText;
}
public void setAnswerText(String answerText) {
this.answerText = answerText;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,126 @@
package com.bbyb.operating.examination.model.po;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class ExaminationPaperQuestion {
private Integer id;
private Integer paperId;
private String questionTitle;
private String quertionNum;
private String quertionType;
private Integer preQuestionId;
private BigDecimal score;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getPaperId() {
return paperId;
}
public void setPaperId(Integer paperId) {
this.paperId = paperId;
}
public String getQuestionTitle() {
return questionTitle;
}
public void setQuestionTitle(String questionTitle) {
this.questionTitle = questionTitle;
}
public String getQuertionNum() {
return quertionNum;
}
public void setQuertionNum(String quertionNum) {
this.quertionNum = quertionNum;
}
public String getQuertionType() {
return quertionType;
}
public void setQuertionType(String quertionType) {
this.quertionType = quertionType;
}
public Integer getPreQuestionId() {
return preQuestionId;
}
public void setPreQuestionId(Integer preQuestionId) {
this.preQuestionId = preQuestionId;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,86 @@
package com.bbyb.operating.examination.model.po;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class ExaminationPaperResult {
private Integer id;
private Integer questionId;
private Integer userId;
private String answerText;
private BigDecimal score;
private String createBy;
private LocalDateTime createTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getQuestionId() {
return questionId;
}
public void setQuestionId(Integer questionId) {
this.questionId = questionId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getAnswerText() {
return answerText;
}
public void setAnswerText(String answerText) {
this.answerText = answerText;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,96 @@
package com.bbyb.operating.examination.model.po;
import java.math.BigDecimal;
import java.time.LocalDateTime;
public class ExaminationPaperScore {
private Integer id;
private Integer paperId;
private Integer userId;
private BigDecimal score;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getPaperId() {
return paperId;
}
public void setPaperId(Integer paperId) {
this.paperId = paperId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public BigDecimal getScore() {
return score;
}
public void setScore(BigDecimal score) {
this.score = score;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,125 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class ExaminationPlan {
private Integer id;
private String planName;
private String planExplain;
private LocalDateTime planStartTime;
private LocalDateTime planEndTime;
private Integer majorId;
private Integer userInCharge;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPlanName() {
return planName;
}
public void setPlanName(String planName) {
this.planName = planName;
}
public String getPlanExplain() {
return planExplain;
}
public void setPlanExplain(String planExplain) {
this.planExplain = planExplain;
}
public LocalDateTime getPlanStartTime() {
return planStartTime;
}
public void setPlanStartTime(LocalDateTime planStartTime) {
this.planStartTime = planStartTime;
}
public LocalDateTime getPlanEndTime() {
return planEndTime;
}
public void setPlanEndTime(LocalDateTime planEndTime) {
this.planEndTime = planEndTime;
}
public Integer getMajorId() {
return majorId;
}
public void setMajorId(Integer majorId) {
this.majorId = majorId;
}
public Integer getUserInCharge() {
return userInCharge;
}
public void setUserInCharge(Integer userInCharge) {
this.userInCharge = userInCharge;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,95 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class ExaminationSubject {
private Integer id;
private String subjectCode;
private String subjectName;
private Integer majorId;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSubjectCode() {
return subjectCode;
}
public void setSubjectCode(String subjectCode) {
this.subjectCode = subjectCode;
}
public String getSubjectName() {
return subjectName;
}
public void setSubjectName(String subjectName) {
this.subjectName = subjectName;
}
public Integer getMajorId() {
return majorId;
}
public void setMajorId(Integer majorId) {
this.majorId = majorId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,135 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class Menu {
private Integer id;
private String menuCode;
private String menuName;
private String menuAuthorityCode;
private String menuPath;
private Integer parentMenuId;
private Integer level;
private Integer menuType;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getMenuCode() {
return menuCode;
}
public void setMenuCode(String menuCode) {
this.menuCode = menuCode;
}
public String getMenuName() {
return menuName;
}
public void setMenuName(String menuName) {
this.menuName = menuName;
}
public String getMenuAuthorityCode() {
return menuAuthorityCode;
}
public void setMenuAuthorityCode(String menuAuthorityCode) {
this.menuAuthorityCode = menuAuthorityCode;
}
public String getMenuPath() {
return menuPath;
}
public void setMenuPath(String menuPath) {
this.menuPath = menuPath;
}
public Integer getParentMenuId() {
return parentMenuId;
}
public void setParentMenuId(Integer parentMenuId) {
this.parentMenuId = parentMenuId;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getMenuType() {
return menuType;
}
public void setMenuType(Integer menuType) {
this.menuType = menuType;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,95 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class QuestionType {
private Integer id;
private String questionCode;
private String questionName;
private Integer gradingType;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getQuestionCode() {
return questionCode;
}
public void setQuestionCode(String questionCode) {
this.questionCode = questionCode;
}
public String getQuestionName() {
return questionName;
}
public void setQuestionName(String questionName) {
this.questionName = questionName;
}
public Integer getGradingType() {
return gradingType;
}
public void setGradingType(Integer gradingType) {
this.gradingType = gradingType;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,90 @@
package com.bbyb.operating.examination.model.po;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
public class Role {
/** 整合Validation **/
@NotNull(message = "角色id不能为空")
@Min(value = 1,message = "角色ID不能为负数")
private Integer id;
@NotNull(message = "角色编码不能为空")
private String roleCode;
@NotNull(message = "角色名称不能为空")
private String roleName;
@NotNull(message = "创建人不能为空")
private String createBy;
@NotNull(message = "创建时间不能为空")
private LocalDateTime createTime;
@NotNull(message = "更新人不能为空")
private String updateBy;
@NotNull(message = "更新时间不能为空")
private LocalDateTime updateTime;
@NotNull(message = "数据作废标识不能为空")
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getRoleCode() {
return roleCode;
}
public void setRoleCode(String roleCode) {
this.roleCode = roleCode;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,90 @@
package com.bbyb.operating.examination.model.po;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
public class RoleMenu {
/** 整合Validation **/
@NotNull(message = "角色菜单id不能为空")
@Min(value = 1,message = "角色菜单ID不能为负数")
private Integer id;
@NotNull(message = "角色id不能为空")
private Integer roleId;
@NotNull(message = "菜单id不能为空")
private Integer menuId;
@NotNull(message = "创建人不能为空")
private String createBy;
@NotNull(message = "创建时间不能为空")
private LocalDateTime createTime;
@NotNull(message = "更新人不能为空")
private String updateBy;
@NotNull(message = "更新时间不能为空")
private LocalDateTime updateTime;
@NotNull(message = "数据作废标识不能为空")
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public Integer getMenuId() {
return menuId;
}
public void setMenuId(Integer menuId) {
this.menuId = menuId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,90 @@
package com.bbyb.operating.examination.model.po;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
public class RoleUser {
/** 整合Validation **/
@NotNull(message = "角色用户id不能为空")
@Min(value = 1,message = "角色用户ID不能为负数")
private Integer id;
@NotNull(message = "角色用户id不能为空")
private Integer roleId;
@NotNull(message = "用户id不能为空")
private Integer userId;
@NotNull(message = "创建人不能为空")
private String createBy;
@NotNull(message = "创建时间不能为空")
private LocalDateTime createTime;
@NotNull(message = "更新人不能为空")
private String updateBy;
@NotNull(message = "更新时间不能为空")
private LocalDateTime updateTime;
@NotNull(message = "是否作废不能为空")
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,95 @@
package com.bbyb.operating.examination.model.po;
import java.time.LocalDateTime;
public class SysDic {
private Integer id;
private String groupName;
private String itemName;
private String itemCode;
private String createBy;
private LocalDateTime createTime;
private String updateBy;
private LocalDateTime updateTime;
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
this.groupName = groupName;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemCode() {
return itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,161 @@
package com.bbyb.operating.examination.model.po;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
public class User {
/** 整合Validation **/
@NotNull(message = "用户id不能为空")
@Min(value = 1,message = "用户ID不能为负数")
private Integer id;
@NotNull(message = "用户码不能为空")
private String userCode;
@NotNull(message = "用户名不能为空")
private String userName;
@NotNull(message = "电话不能为空")
private String phone;
@NotNull(message = "密码不能为空")
private String password;
@NotNull(message = "邮箱不能为空")
private String email;
@NotNull(message = "身份证号不能为空")
private String idCard;
@NotNull(message = "性别不能为空")
private Integer gender;
@NotNull(message = "是否超级管理员不能为空")
private Integer isAdmin;
@NotNull(message = "是否启用不能为空")
private Integer isEnable;
@NotNull(message = "创建人不能为空")
private String createBy;
@NotNull(message = "创建时间不能为空")
private LocalDateTime createTime;
@NotNull(message = "更新人不能为空")
private String updateBy;
@NotNull(message = "更新时间不能为空")
private LocalDateTime updateTime;
@NotNull(message = "数据是否作废不能为空")
private Integer invalid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserCode() {
return userCode;
}
public void setUserCode(String userCode) {
this.userCode = userCode;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public Integer getGender() {
return gender;
}
public void setGender(Integer gender) {
this.gender = gender;
}
public Integer getIsAdmin() {
return isAdmin;
}
public void setIsAdmin(Integer isAdmin) {
this.isAdmin = isAdmin;
}
public Integer getIsEnable() {
return isEnable;
}
public void setIsEnable(Integer isEnable) {
this.isEnable = isEnable;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public LocalDateTime getUpdateTime() {
return updateTime;
}
public void setUpdateTime(LocalDateTime updateTime) {
this.updateTime = updateTime;
}
public Integer getInvalid() {
return invalid;
}
public void setInvalid(Integer invalid) {
this.invalid = invalid;
}
}

View File

@ -0,0 +1,80 @@
package com.bbyb.operating.examination.model.vo;
/**
*
* className: CommonResult
* datetime: 2023/10/2 9:35
* author: JCC
*/
public class CommonResult<T> {
/** 返回编码0 成功 非0异常 */
private int code;
/** 返回结果信息描述 */
private String msg;
/** 是否成功 boolean表示 */
private boolean success;
/** 返回的数据 */
private T data;
public static <T> CommonResult<T> error(int code, String msg) {
return new CommonResult(code, msg);
}
public CommonResult(){
this.code = 0;
this.msg = "成功";
this.success = true;
}
public CommonResult(T data){
this();
this.data = data;
}
public CommonResult(int code, String msg){
this.code = code;
this.msg = msg;
}
public CommonResult(int code, String msg, boolean success, T data){
this.code = code;
this.msg = msg;
this.success = success;
this.data = data;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
}

View File

@ -0,0 +1,48 @@
package com.bbyb.operating.examination.service;
import com.bbyb.operating.examination.model.po.Role;
import com.bbyb.operating.examination.model.po.RoleMenu;
import com.bbyb.operating.examination.model.po.User;
import java.util.List;
public interface RoleMenuService {
/**
*
* @param roleMenu
* @return java.lang.String
* @date 2023/8/8 16:52
*/
String addRoleMenu(RoleMenu roleMenu);
/**
*
* @return java.util.List<com.bbyb.operating.examination.model.po.User>
* @date 2023/8/8 16:52
*/
List<RoleMenu> getAllRoleMenu();
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
int deleteRoleMenu(Integer id);
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.User
* @date 2023/8/8 16:52
*/
RoleMenu getRoleMenu(Integer id);
/**
*
* @param roleMenu
* @return int
* @date 2023/8/8 16:53
*/
int updateRoleMenu(RoleMenu roleMenu);
}

View File

@ -0,0 +1,46 @@
package com.bbyb.operating.examination.service;
import com.bbyb.operating.examination.model.po.Role;
import java.util.List;
public interface RoleService {
/**
*
* @param role
* @return java.lang.String
* @date 2023/8/8 16:52
*/
String addRole(Role role);
/**
*
* @return java.util.List<com.bbyb.operating.examination.model.po.User>
* @date 2023/8/8 16:52
*/
List<Role> getAllRole();
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
int deleteRole(Integer id);
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.User
* @date 2023/8/8 16:52
*/
Role getRole(Integer id);
/**
*
* @param role
* @return int
* @date 2023/8/8 16:53
*/
int updateRole(Role role);
}

View File

@ -0,0 +1,55 @@
package com.bbyb.operating.examination.service;
import com.bbyb.operating.examination.model.po.RoleUser;
import com.bbyb.operating.examination.model.po.User;
import java.util.List;
public interface RoleUserService {
/**
*
* @param roleUser
* @return java.lang.String
* @date 2023/8/8 16:52
*/
String addRoleUser(RoleUser roleUser);
/**
*
* @return java.util.List<com.bbyb.operating.examination.model.po.RoleUser>
* @date 2023/8/8 16:52
*/
List<RoleUser> getAllRoleUser();
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
int deleteRoleUser(Integer id);
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.RoleUser
* @date 2023/8/8 16:52
*/
RoleUser getRoleUser(Integer id);
/**
*
* @param roleUser
* @return int
* @date 2023/8/8 16:53
*/
int updateRoleUser(RoleUser roleUser);
/**
* roleId
* @param roleUser
* @return int
* @date 2023/10/2 10:40
*/
public List<RoleUser> getRoleUserByRoleId(Integer roleId);
}

View File

@ -0,0 +1,56 @@
package com.bbyb.operating.examination.service;
import com.bbyb.operating.examination.model.po.Menu;
import com.bbyb.operating.examination.model.po.User;
import java.util.List;
public interface UserService {
/**
*
* @param user
* @return java.lang.String
* @date 2023/8/8 16:52
*/
String addUser(User user);
/**
*
* @return java.util.List<com.bbyb.operating.examination.model.po.User>
* @date 2023/8/8 16:52
*/
List<User> getAllUser();
/**
* ID
* @param id
* @return int
* @date 2023/8/8 16:52
*/
int deleteUser(Integer id);
/**
* ID
* @param id
* @return com.bbyb.operating.examination.model.po.User
* @date 2023/8/8 16:52
*/
User getUser(Integer id);
/**
*
* @param row
* @return int
* @date 2023/8/8 16:53
*/
int updateUser(User row);
/**
*
* @author ChenYanTing
* @param id
* @return java.util.List<com.bbyb.operating.examination.model.po.Menu>
* @date 2023/8/8 19:43
*/
List<Menu> getUserAllMenu(Integer id);
}

View File

@ -0,0 +1,56 @@
package com.bbyb.operating.examination.service.impl;
import com.bbyb.operating.examination.mapper.RoleMapper;
import com.bbyb.operating.examination.mapper.RoleMenuMapper;
import com.bbyb.operating.examination.mapper.UserMapper;
import com.bbyb.operating.examination.model.po.Role;
import com.bbyb.operating.examination.model.po.RoleMenu;
import com.bbyb.operating.examination.model.po.User;
import com.bbyb.operating.examination.service.RoleMenuService;
import com.bbyb.operating.examination.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
* className: UserServiceImpl
* datetime: 2023/10/2 9:35
* author: JCC
*/
@Service
public class RoleMenuServiceImpl implements RoleMenuService {
@Autowired
private RoleMenuMapper roleMenuMapper;
@Override
public String addRoleMenu(RoleMenu roleMenu) {
if(roleMenuMapper.insert(roleMenu) == 1){
return null;
}
return "保存用户信息失败";
}
@Override
public List<RoleMenu> getAllRoleMenu() {
return roleMenuMapper.selectAll();
}
@Override
public int deleteRoleMenu(Integer id) {
return roleMenuMapper.deleteByPrimaryKey(id);
}
@Override
public RoleMenu getRoleMenu(Integer id) {
return roleMenuMapper.selectByPrimaryKey(id);
}
@Override
public int updateRoleMenu(RoleMenu roleMenu) {
return roleMenuMapper.updateByPrimaryKey(roleMenu);
}
}

View File

@ -0,0 +1,68 @@
package com.bbyb.operating.examination.service.impl;
import com.bbyb.operating.examination.config.BizException;
import com.bbyb.operating.examination.config.GlobalExceptionHandler;
import com.bbyb.operating.examination.mapper.RoleMapper;
import com.bbyb.operating.examination.mapper.UserMapper;
import com.bbyb.operating.examination.model.po.Role;
import com.bbyb.operating.examination.model.po.RoleUser;
import com.bbyb.operating.examination.model.po.User;
import com.bbyb.operating.examination.service.RoleService;
import com.bbyb.operating.examination.service.RoleUserService;
import com.bbyb.operating.examination.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
*
* className: UserServiceImpl
* datetime: 2023/10/2 9:35
* author: JCC
*/
@Service
public class RoleServiceImpl implements RoleService {
@Autowired
private RoleMapper roleMapper;
@Autowired
private RoleUserService roleUserService;
@Override
public String addRole(Role role) {
if(roleMapper.insert(role) == 1){
return null;
}
return "保存用户信息失败";
}
@Override
public List<Role> getAllRole() {
return roleMapper.selectAll();
}
@Override
public int deleteRole(Integer id) {
List<RoleUser> roleUsers = roleUserService.getRoleUserByRoleId(id);
if (CollectionUtils.isEmpty(roleUsers)){
return roleMapper.deleteByPrimaryKey(id);
}
throw new BizException(500,"不能删除有关联得角色");
}
@Override
public Role getRole(Integer id) {
return roleMapper.selectByPrimaryKey(id);
}
@Override
public int updateRole(Role role) {
return roleMapper.updateByPrimaryKey(role);
}
}

View File

@ -0,0 +1,60 @@
package com.bbyb.operating.examination.service.impl;
import com.bbyb.operating.examination.mapper.RoleUserMapper;
import com.bbyb.operating.examination.mapper.UserMapper;
import com.bbyb.operating.examination.model.po.RoleUser;
import com.bbyb.operating.examination.model.po.User;
import com.bbyb.operating.examination.service.RoleUserService;
import com.bbyb.operating.examination.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
* className: UserServiceImpl
* datetime: 2023/10/2 9:35
* author: JCC
*/
@Service
public class RoleUserServiceImpl implements RoleUserService {
@Autowired
private RoleUserMapper roleUserMapper;
@Override
public String addRoleUser(RoleUser roleUser) {
if(roleUserMapper.insert(roleUser) == 1){
return null;
}
return "保存用户信息失败";
}
@Override
public List<RoleUser> getAllRoleUser() {
return roleUserMapper.selectAll();
}
@Override
public int deleteRoleUser(Integer id) {
return roleUserMapper.deleteByPrimaryKey(id);
}
@Override
public RoleUser getRoleUser(Integer id) {
return roleUserMapper.selectByPrimaryKey(id);
}
@Override
public int updateRoleUser(RoleUser roleUser) {
return roleUserMapper.updateByPrimaryKey(roleUser);
}
@Override
public List<RoleUser> getRoleUserByRoleId(Integer roleId){
return roleUserMapper.getRoleUserByRoleId(roleId);
}
}

View File

@ -0,0 +1,56 @@
package com.bbyb.operating.examination.service.impl;
import com.bbyb.operating.examination.mapper.UserMapper;
import com.bbyb.operating.examination.model.po.Menu;
import com.bbyb.operating.examination.model.po.User;
import com.bbyb.operating.examination.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
*
* className: UserServiceImpl
* datetime: 2023/10/2 9:35
* author: JCC
*/
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserMapper userMapper;
@Override
public String addUser(User user) {
if(userMapper.insert(user) == 1){
return null;
}
return "保存用户信息失败";
}
@Override
public List<User> getAllUser() {
return userMapper.selectAll();
}
@Override
public int deleteUser(Integer id) {
return userMapper.deleteByPrimaryKey(id);
}
@Override
public User getUser(Integer id) {
return userMapper.selectByPrimaryKey(id);
}
@Override
public int updateUser(User row) {
return userMapper.updateByPrimaryKey(row);
}
@Override
public List<Menu> getUserAllMenu(Integer id) {
return userMapper.getUserAllMenu(id);
}
}

View File

@ -0,0 +1,11 @@
server.port=9001
server.tomcat.max-http-form-post-size=156413531
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/day01
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username =root
spring.datasource.password =1234
logging.level.org.springframework.boot.autoconfigure=error
mybatis.mapper-locations=classpath*:/mapper/**/*.xml
mybatis.configuration.map-underscore-to-camel-case=true
logging.level.com.bbyb.operating.examination.mapper=DEBUG
spring.mvc.pathmatch.matching-strategy=ant_path_matcher

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bbyb.operating.examination.mapper.RoleMapper">
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.Role">
select * from role
</select>
<insert id="insert">
INSERT INTO role
(role_code, role_name, create_by, create_time, update_by, update_time, invalid)
VALUES(#{roleCode}, #{roleName}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
</insert>
<update id="updateByPrimaryKey">
UPDATE role
<set>
<if test="roleCode!=null and roleCode!='' ">
role_code = #{roleCode},
</if>
<if test="roleName!=null and roleName!='' ">
role_name = #{roleName},
</if>
<if test="createBy!=null and createBy!='' ">
create_by = #{createBy},
</if>
<if test="createTime!=null ">
create_time = #{createTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="updateTime!=null ">
update_time = #{updateTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="invalid!=null and invalid!='' ">
invalid = #{invalid}
</if>
</set>
WHERE id = #{id};
</update>
<delete id="deleteByPrimaryKey">
delete from role where id = #{id}
</delete>
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.Role">
select * from role where id = #{id}
</select>
</mapper>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bbyb.operating.examination.mapper.RoleMenuMapper">
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.RoleMenu">
select * from role_menu
</select>
<insert id="insert">
INSERT INTO role_menu
(role_id, menu_id, create_by, create_time, update_by, update_time, invalid)
VALUES(#{roleId}, #{menuId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
</insert>
<update id="updateByPrimaryKey">
UPDATE role_menu
<set>
<if test="roleId!=null and roleId!='' ">
role_id = #{roleId},
</if>
<if test="menuId!=null and menuId!='' ">
menu_id = #{menuId},
</if>
<if test="createTime!=null ">
create_time = #{createTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="updateTime!=null ">
update_time = #{updateTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="invalid!=null and invalid!='' ">
invalid = #{invalid}
</if>
</set>
WHERE id = #{id};
</update>
<delete id="deleteByPrimaryKey">
delete from role_menu where id = #{id}
</delete>
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.RoleMenu">
select * from role_menu where id = #{id}
</select>
</mapper>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bbyb.operating.examination.mapper.RoleUserMapper">
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.RoleUser">
select * from role_user
</select>
<insert id="insert">
INSERT INTO role_user
(role_id, user_id, create_by, create_time, update_by, update_time, invalid)
VALUES(#{roleId}, #{userId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
</insert>
<update id="updateByPrimaryKey">
UPDATE role_user
<set>
<if test="roleId!=null and roleId!='' ">
role_id = #{roleId},
</if>
<if test="userId!=null and userId!='' ">
user_id = #{userId},
</if>
<if test="createBy!=null and createBy!='' ">
create_by = #{createBy},
</if>
<if test="createTime!=null ">
create_time = #{createTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="updateTime!=null ">
update_time = #{updateTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="invalid!=null and invalid!='' ">
invalid = #{invalid}
</if>
</set>
WHERE id = #{id};
</update>
<delete id="deleteByPrimaryKey">
delete from role_user where id = #{id}
</delete>
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.RoleUser">
select * from role_user where id = #{id}
</select>
<select id="getRoleUserByRoleId" resultType="com.bbyb.operating.examination.model.po.RoleUser">
select * from role_user where role_id = #{roleId}
</select>
</mapper>

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bbyb.operating.examination.mapper.UserMapper">
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.User">
select * from user
</select>
<insert id="insert">
INSERT INTO user
(user_code, user_name, phone, password, email, id_card, gender, is_admin, is_enable, create_by, create_time, update_by, update_time, invalid)
VALUES(#{userCode}, #{userName}, #{phone}, #{password}, #{email}, #{idCard}, #{gender}, #{isAdmin}, #{isEnable}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
</insert>
<update id="updateByPrimaryKey">
UPDATE user
<set>
<if test="userCode!=null and userCode!='' ">
user_code = #{userCode},
</if>
<if test="userName!=null and userName!='' ">
user_name = #{userName},
</if>
<if test="phone!=null and phone!='' ">
phone = #{phone},
</if>
<if test="password!=null and password!='' ">
password = #{password},
</if>
<if test="email!=null and email!='' ">
email = #{email},
</if>
<if test="idCard!=null and idCard!='' ">
id_card = #{idCard},
</if>
<if test="gender!=null and gender!='' ">
gender = #{gender},
</if>
<if test="isAdmin!=null and isAdmin!='' ">
is_admin = #{isAdmin},
</if>
<if test="idCard!=null and idCard!='' ">
is_enable = #{isEnable},
</if>
<if test="createBy!=null and createBy!='' ">
create_by = #{createBy},
</if>
<if test="createTime!=null ">
create_time = #{createTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="updateTime!=null ">
update_time = #{updateTime},
</if>
<if test="updateBy!=null and updateBy!='' ">
update_by = #{updateBy},
</if>
<if test="invalid!=null and invalid!='' ">
invalid = #{invalid}
</if>
</set>
WHERE id = #{id};
</update>
<delete id="deleteByPrimaryKey">
delete from user where id = #{id}
</delete>
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.User">
select * from user where id = #{id}
</select>
<select id="getUserAllMenu" resultType="com.bbyb.operating.examination.model.po.Menu">
select
distinct
m.id,
m.menu_code,
m.menu_name,
m.menu_authority_code,
m.menu_path,
m.parent_menu_id,
m.level,
m.menu_type,
m.create_by,
m.create_time,
m.update_by,
m.update_time,
m.invalid
from
user u
left join role_user ru on u.id = ru.user_id
left join role_menu mu on ru.role_id = mu.role_id
left join menu m on m.id = mu.menu_id
where u.id = #{id}
</select>
</mapper>

View File

@ -0,0 +1,63 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.Role;
import com.bbyb.operating.examination.service.RoleService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.time.LocalDateTime;
/**
* @ClassName: RoleControllerTest
*
* @Date: 2023/8/8 16:58
* @Version: 1.0
* @Description:
*/
@SpringBootTest
class RoleControllerTest {
@Autowired
private RoleService roleService;
@Test
void addRole() {
Role Role = new Role();
Role.setId(213214);
Role.setRoleCode("213214");
Role.setRoleName("test");
Role.setCreateBy("张三");
Role.setCreateTime(LocalDateTime.now());
Role.setUpdateBy("张三");
Role.setUpdateTime(LocalDateTime.now());
Role.setInvalid(0);
roleService.addRole(Role);
}
@Test
void getAllRole() {
System.out.println(roleService.getAllRole());
}
@Test
void deleteRole() {
roleService.deleteRole(34);
}
@Test
void getRole() {
System.out.println(roleService.getRole(34));
}
@Test
void updateRole() {
Role role = new Role();
role.setId(35);
role.setRoleCode("34");
role.setRoleName("修改");
role.setUpdateBy("张三");
role.setUpdateTime(LocalDateTime.now());
role.setInvalid(0);
roleService.updateRole(role);
}
}

View File

@ -0,0 +1,60 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.RoleMenu;
import com.bbyb.operating.examination.service.RoleMenuService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.time.LocalDateTime;
/**
* @ClassName: RoleMenuControllerTest
*
* @Date: 2023/8/8 16:58
* @Version: 1.0
* @Description:
*/
@SpringBootTest
class RoleMenuControllerTest {
@Autowired
private RoleMenuService RoleMenuService;
@Test
void addRoleMenu() {
RoleMenu RoleMenu = new RoleMenu();
RoleMenu.setId(213214);
RoleMenu.setCreateBy("张三");
RoleMenu.setCreateTime(LocalDateTime.now());
RoleMenu.setUpdateBy("张三");
RoleMenu.setUpdateTime(LocalDateTime.now());
RoleMenu.setInvalid(0);
RoleMenuService.addRoleMenu(RoleMenu);
}
@Test
void getAllRoleMenu() {
System.out.println(RoleMenuService.getAllRoleMenu());
}
@Test
void deleteRoleMenu() {
RoleMenuService.deleteRoleMenu(87);
}
@Test
void getRoleMenu() {
System.out.println(RoleMenuService.getRoleMenu(87));
}
@Test
void updateRoleMenu() {
RoleMenu RoleMenu = new RoleMenu();
RoleMenu.setId(87);
RoleMenu.setUpdateBy("张三修改");
RoleMenu.setUpdateTime(LocalDateTime.now());
RoleMenu.setInvalid(0);
RoleMenuService.updateRoleMenu(RoleMenu);
}
}

View File

@ -0,0 +1,59 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.RoleUser;
import com.bbyb.operating.examination.service.RoleUserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.time.LocalDateTime;
/**
* @ClassName: RoleUserControllerTest
*
* @Date: 2023/8/8 16:58
* @Version: 1.0
* @Description:
*/
@SpringBootTest
class RoleUserControllerTest {
@Autowired
private RoleUserService RoleUserService;
@Test
void addRoleUser() {
RoleUser RoleUser = new RoleUser();
RoleUser.setId(213214);
RoleUser.setCreateBy("张三");
RoleUser.setCreateTime(LocalDateTime.now());
RoleUser.setUpdateBy("张三");
RoleUser.setUpdateTime(LocalDateTime.now());
RoleUser.setInvalid(0);
RoleUserService.addRoleUser(RoleUser);
}
@Test
void getAllRoleUser() {
System.out.println(RoleUserService.getAllRoleUser());
}
@Test
void deleteRoleUser() {
RoleUserService.deleteRoleUser(100041);
}
@Test
void getRoleUser() {
System.out.println(RoleUserService.getRoleUser(100041));
}
@Test
void updateRoleUser() {
RoleUser RoleUser = new RoleUser();
RoleUser.setId(100041);
RoleUser.setUpdateBy("张三修改");
RoleUser.setUpdateTime(LocalDateTime.now());
RoleUser.setInvalid(0);
RoleUserService.updateRoleUser(RoleUser);
}
}

View File

@ -0,0 +1,80 @@
package com.bbyb.operating.examination.controller;
import com.bbyb.operating.examination.model.po.User;
import com.bbyb.operating.examination.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.time.LocalDateTime;
import java.util.Date;
import static org.junit.jupiter.api.Assertions.*;
/**
* @ClassName: UserControllerTest
*
* @Date: 2023/8/8 16:58
* @Version: 1.0
* @Description:
*/
@SpringBootTest
class UserControllerTest {
@Autowired
private UserService userService;
@Test
void addUser() {
User user = new User();
user.setId(213214);
user.setUserCode("213214");
user.setUserName("test");
user.setPhone("213214");
user.setPassword("213214");
user.setEmail("213214@qq.com");
user.setIdCard("213214");
user.setGender(99);
user.setIsAdmin(1);
user.setIsEnable(1);
user.setCreateBy("张三");
user.setCreateTime(LocalDateTime.now());
user.setUpdateBy("张三");
user.setUpdateTime(LocalDateTime.now());
user.setInvalid(0);
userService.addUser(user);
}
@Test
void getAllUser() {
System.out.println(userService.getAllUser());
}
@Test
void deleteUser() {
userService.deleteUser(213214);
}
@Test
void getUser() {
System.out.println(userService.getUser(213214));
}
@Test
void updateUser() {
User user = new User();
user.setId(213214);
user.setUserCode("213214");
user.setUserName("修改");
user.setPhone("213214");
user.setPassword("213214");
user.setEmail("213214@qq.com");
user.setIdCard("213214");
user.setGender(99);
user.setIsAdmin(1);
user.setIsEnable(1);
user.setUpdateBy("张三");
user.setUpdateTime(LocalDateTime.now());
user.setInvalid(0);
userService.updateUser(user);
}
}

Binary file not shown.

View File

@ -0,0 +1,11 @@
server.port=9001
server.tomcat.max-http-form-post-size=156413531
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/day01
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.username =root
spring.datasource.password =1234
logging.level.org.springframework.boot.autoconfigure=error
mybatis.mapper-locations=classpath*:/mapper/**/*.xml
mybatis.configuration.map-underscore-to-camel-case=true
logging.level.com.bbyb.operating.examination.mapper=DEBUG
spring.mvc.pathmatch.matching-strategy=ant_path_matcher

Some files were not shown because too many files have changed in this diff Show More