Commit bcd1715b by tangyi

调整结构

parent 5e3df5c7
Version v3.1.0 (2019-7-18)
--------------------------
改进:
* 调整项目结构
* 调整版本号
* 去掉热部署部分内容,修复读取缓存报ClassCastException问题
* 完善登录日志,增加登录IP、耗时等信息
Version v3.0.0 (2019-7-15)
--------------------------
改进:
......
......@@ -30,9 +30,9 @@ QQ群号:996208878
### 部署文档
- [在线考试系统部署文档](docs/在线考试系统V2.0_部署文档.md)
- [在线考试系统部署文档](docs/在线考试系统V3.0_部署文档.md)
- [基于docker-compose部署](docs/在线考试系统V2.0_部署文档(docker版).md)
- [基于docker-compose部署](docs/在线考试系统V3.0_部署文档(docker版).md)
### 源码地址
......@@ -52,7 +52,7 @@ QQ群号:996208878
- 分布式配置中心:`Spring Cloud Config`
- 分布式调用链监控:`Spring Cloud Sleuth` + `Zipkin`
- 数据库:`MySQL 5.7`
- 部署:`Docker`
- 部署:`Docker` + `docker-compose`
- 构建工具:`Maven`
- 后台 API 文档:`Swagger`
- 消息队列:`RabbitMQ`
......@@ -79,9 +79,9 @@ QQ群号:996208878
后台管理分为:系统管理、系统监控、考务管理、附件管理、个人管理
![image](docs/产品设计/功能概述.png)
![image](docs/产品设计/系统功能.jpg)
- [在线考试系统V2.0功能概述](docs/在线考试系统V2.0_功能概述.md)
- [在线考试系统V3.0功能概述](docs/在线考试系统V3.0_功能概述.md)
## 功能演示
......@@ -128,7 +128,7 @@ QQ群号:996208878
- [ ] 作业、考试、知识点管理、考试成绩排名、图表展示
- [ ] 学生签到、请假
- [ ] 短信验证码,第三方登录
- [x] 短信验证码,第三方登录
- [ ] 简答题,题库完善,智能组卷,在线学习,成绩排名
## 问题反馈
......@@ -139,17 +139,21 @@ QQ群号:996208878
## 参考资料
- [在线考试系统V2.0设计文档-数据库设计](docs/在线考试系统V2.0_数据库设计.md)
- [在线考试系统V3.0系统架构图](https://www.processon.com/view/link/5cf88937e4b0a64c88aaa3e4)
- [在线考试系统V2.0部署文档](docs/在线考试系统V2.0_部署文档.md)
- [在线考试系统V3.0使用文档](docs/在线考试系统V3.0_使用文档.md)
- [在线考试系统V2.0部署文档(docker版)](docs/在线考试系统V2.0_部署文档(docker版).md)
- [在线考试系统V3.0设计文档-数据库设计](docs/在线考试系统V3.0_数据库设计.md)
- [在线考试系统V2.0项目结构说明文档](docs/在线考试系统V2.0_项目结构说明.md)
- [在线考试系统V3.0部署文档](docs/在线考试系统V3.0_部署文档.md)
- [在线考试系统V3.0部署文档(docker版)](docs/在线考试系统V3.0_部署文档(docker版).md)
- [在线考试系统V3.0项目结构说明文档](docs/在线考试系统V3.0_项目结构说明.md)
- [微服务架构下的安全设计方案](http://ehedgehog.net/2019/03/23/%E5%BE%AE%E6%9C%8D%E5%8A%A1%E6%9E%B6%E6%9E%84%E4%B8%8B%E7%9A%84%E5%AE%89%E5%85%A8%E8%AE%BE%E8%AE%A1%E6%96%B9%E6%A1%88/)
- [在线考试系统V2.0镜像构建、推送、部署](http://ehedgehog.net/2019/04/22/%E5%9C%A8%E7%BA%BF%E8%80%83%E8%AF%95%E7%B3%BB%E7%BB%9FV2.0%E9%95%9C%E5%83%8F%E6%9E%84%E5%BB%BA%E3%80%81%E6%8E%A8%E9%80%81%E3%80%81%E9%83%A8%E7%BD%B2/)
- [在线考试系统V3.0镜像构建、推送、部署](http://ehedgehog.net/2019/04/22/%E5%9C%A8%E7%BA%BF%E8%80%83%E8%AF%95%E7%B3%BB%E7%BB%9FV2.0%E9%95%9C%E5%83%8F%E6%9E%84%E5%BB%BA%E3%80%81%E6%8E%A8%E9%80%81%E3%80%81%E9%83%A8%E7%BD%B2/)
***
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>common</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>common-core</artifactId>
<name>${project.artifactId}</name>
......
......@@ -28,5 +28,6 @@ public class AppStartupRunner implements CommandLineRunner {
// 设置系统属性
if (StringUtils.isNotBlank(sysProperties.getCacheExpire()))
System.setProperty(CommonConstant.CACHE_EXPIRE, sysProperties.getCacheExpire());
log.info("end command line...");
}
}
......@@ -16,22 +16,22 @@ public enum LoginType {
/**
* 账号密码登录
*/
PWD("PWD", "账号密码登录"),
PWD("PWD", "账号密码登录", "/oauth/token"),
/**
* 验证码登录
*/
SMS("SMS", "验证码登录"),
SMS("SMS", "验证码登录", "/mobile/token"),
/**
* QQ登录
*/
QQ("QQ", "QQ登录"),
QQ("QQ", "QQ登录", "/mobile/token"),
/**
* 微信登录
*/
WECHAT("WX", "微信登录");
WECHAT("WX", "微信登录", "/wx/token");
/**
* 类型
......@@ -42,4 +42,9 @@ public enum LoginType {
* 描述
*/
private String description;
/**
* 接口uri
*/
private String uri;
}
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>common</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>common-feign</artifactId>
<name>${project.artifactId}</name>
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>common</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>common-log</artifactId>
<name>${project.artifactId}</name>
......@@ -27,7 +28,7 @@
<!-- user-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>user-api</artifactId>
<artifactId>user-service-api</artifactId>
</dependency>
</dependencies>
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>common</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>common-security</artifactId>
<name>${project.artifactId}</name>
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>common</artifactId>
<packaging>pom</packaging>
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>config-service</artifactId>
<name>${project.artifactId}</name>
......
......@@ -60,6 +60,10 @@ sys:
# feign相关配置
feign:
httpclient:
enabled: false
okhttp:
enabled: true
hystrix:
enabled: true
......
......@@ -70,7 +70,7 @@ services:
# 配置中心
# ---------------------------
config-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/config-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/config-service:3.1.0
container_name: config-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......
......@@ -4,7 +4,7 @@ services:
# 前台
# ---------------------------
spring-microservice-exam-web:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/spring-microservice-exam-web:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/spring-microservice-exam-web:3.1.0
volumes:
# 挂载nginx的配置文件
- ./nginx.conf:/etc/nginx/nginx.conf
......@@ -20,7 +20,7 @@ services:
# 后台
# ---------------------------
spring-microservice-exam-ui:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/spring-microservice-exam-ui:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/spring-microservice-exam-ui:3.1.0
volumes:
# 挂载nginx的配置文件
- ./nginx.conf:/etc/nginx/nginx.conf
......
......@@ -4,7 +4,7 @@ services:
# api网关
# ---------------------------
gateway-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/gateway-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/gateway-service:3.1.0
container_name: gateway-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......@@ -17,7 +17,7 @@ services:
# 授权服务
# ---------------------------
auth-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/auth-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/auth-service:3.1.0
container_name: auth-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......@@ -30,7 +30,7 @@ services:
# 用户服务
# ---------------------------
user-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/user-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/user-service:3.1.0
container_name: user-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......@@ -43,7 +43,7 @@ services:
# 考试服务
# ---------------------------
exam-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/exam-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/exam-service:3.1.0
container_name: exam-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......@@ -56,7 +56,7 @@ services:
# 消息服务
# ---------------------------
msc-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/msc-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/msc-service:3.1.0
container_name: msc-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......@@ -69,7 +69,7 @@ services:
# 监控服务
# ---------------------------
monitor-service:
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/monitor-service:3.0.0
image: registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/monitor-service:3.1.0
container_name: monitor-service
env_file: docker-compose.env # 从文件中获取配置
restart: always
......
/*
Navicat Premium Data Transfer
Source Server : mysql_localhost
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 50617
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : microservice-exam
Target Server Type : MySQL
Target Server Version : 50617
Target Server Version : 80016
File Encoding : 65001
Date: 04/07/2019 14:36:12
Date: 19/07/2019 22:56:29
*/
SET NAMES utf8mb4;
......@@ -23,22 +23,22 @@ SET FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS `exam_answer`;
CREATE TABLE `exam_answer` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`exam_record_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试记录id',
`subject_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '题目ID',
`type` int(11) NULL DEFAULT NULL,
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '答案',
`answer_type` int(11) NULL DEFAULT NULL COMMENT '答题类型,0:正确,1:错误',
`score` int(11) NULL DEFAULT NULL COMMENT '实际得分',
`mark_status` int(255) NULL DEFAULT NULL,
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`exam_record_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试记录id',
`subject_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '题目ID',
`type` int(11) DEFAULT NULL,
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '答案',
`answer_type` int(11) DEFAULT NULL COMMENT '答题类型,0:正确,1:错误',
`score` int(11) DEFAULT NULL COMMENT '实际得分',
`mark_status` int(255) DEFAULT NULL,
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '答题表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='答题表';
-- ----------------------------
-- Table structure for exam_course
......@@ -46,26 +46,28 @@ CREATE TABLE `exam_answer` (
DROP TABLE IF EXISTS `exam_course`;
CREATE TABLE `exam_course` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`course_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程名称',
`college` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学院',
`major` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '专业',
`teacher` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '老师',
`course_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程描述',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`course_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '课程名称',
`college` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '学院',
`major` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '专业',
`teacher` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '老师',
`course_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '课程描述',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '课程表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='课程表';
-- ----------------------------
-- Records of exam_course
-- ----------------------------
BEGIN;
INSERT INTO `exam_course` VALUES ('590968789617741824', '计算机基础', '信息学院', '软件工程', '', '计算机基础', 'admin', '2019-06-19 18:18:59', 'admin', '2019-06-23 13:55:51', 0, 'EXAM', 'gitee');
INSERT INTO `exam_course` VALUES ('590968881187786752', '大学语文', '信息学院', '软件工程', '陈老师', '大学语文', 'admin', '2019-06-19 18:19:20', 'admin', '2019-07-04 13:50:45', 0, 'EXAM', 'gitee');
INSERT INTO `exam_course` VALUES ('590968881187786752', '大学语文', '信息学院', '软件工程', '陈老师', '大学语文', 'admin', '2019-06-19 18:19:20', 'admin', '2019-07-19 22:09:42', 0, 'EXAM', 'gitee');
COMMIT;
-- ----------------------------
-- Table structure for exam_examination
......@@ -73,31 +75,33 @@ INSERT INTO `exam_course` VALUES ('590968881187786752', '大学语文', '信息
DROP TABLE IF EXISTS `exam_examination`;
CREATE TABLE `exam_examination` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`examination_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试名称',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试类型',
`attention` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试注意事项',
`start_time` timestamp(0) NULL DEFAULT NULL COMMENT '考试开始时间',
`end_time` timestamp(0) NULL DEFAULT NULL COMMENT '考试结束时间',
`total_score` int(11) NULL DEFAULT NULL COMMENT '总分',
`status` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试状态',
`avatar_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图片ID',
`course_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '课程',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`examination_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试名称',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试类型',
`attention` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试注意事项',
`start_time` timestamp NULL DEFAULT NULL COMMENT '考试开始时间',
`end_time` timestamp NULL DEFAULT NULL COMMENT '考试结束时间',
`total_score` int(11) DEFAULT NULL COMMENT '总分',
`status` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试状态',
`avatar_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片ID',
`course_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '课程',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '考试信息表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='考试信息表';
-- ----------------------------
-- Records of exam_examination
-- ----------------------------
BEGIN;
INSERT INTO `exam_examination` VALUES ('590969316204220416', '全国计算机统考练习题10道', '2', '练习', '2019-06-19 18:20:00', '2019-06-19 20:20:00', 50, '0', NULL, '590968789617741824', '全国计算机统考练习题10道', 'admin', '2019-06-19 18:21:04', 'admin', '2019-06-19 18:45:33', 0, 'EXAM', 'gitee');
INSERT INTO `exam_examination` VALUES ('590969514372501504', '四川省2016年普通高考文科综合能力测试-语文部分', '0', '注意事项:\n1.本试卷分第工卷(选择题)和第II卷(非选择题)两部分。答卷前,考生务必将白己的姓名、准考证号填写在答题卡上。\n2.回答第Ⅰ卷时,选出每小题答案后,用铅笔把答题卡上对应题目的答案标号涂黑。如需改动,用橡皮擦干净后,再选涂其它答案标号。写在本试卷上无效。\n3.回答第Ⅱ卷时,将答案写在答题卡上。写在本试卷上无效。\n4.考试结束后,将本试卷和答题卡一并交回。', '2019-07-02 19:21:00', '2019-07-04 16:02:00', 60, '0', NULL, '590968881187786752', '四川省2016年普通高考-文科综合能力测试', 'admin', '2019-06-19 18:21:51', 'admin', '2019-07-04 14:20:36', 0, 'EXAM', 'gitee');
COMMIT;
-- ----------------------------
-- Table structure for exam_examination_record
......@@ -105,23 +109,23 @@ INSERT INTO `exam_examination` VALUES ('590969514372501504', '四川省2016年
DROP TABLE IF EXISTS `exam_examination_record`;
CREATE TABLE `exam_examination_record` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户id',
`examination_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试ID',
`start_time` timestamp(0) NULL DEFAULT NULL COMMENT '开始时间',
`end_time` timestamp(0) NULL DEFAULT NULL COMMENT '结束时间',
`score` int(11) NULL DEFAULT NULL COMMENT '成绩',
`correct_number` int(11) NULL DEFAULT NULL COMMENT '正确题目数量',
`incorrect_number` int(11) NULL DEFAULT NULL COMMENT '错误题目数量',
`submit_status` int(11) NULL DEFAULT NULL,
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户id',
`examination_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试ID',
`start_time` timestamp NULL DEFAULT NULL COMMENT '开始时间',
`end_time` timestamp NULL DEFAULT NULL COMMENT '结束时间',
`score` int(11) DEFAULT NULL COMMENT '成绩',
`correct_number` int(11) DEFAULT NULL COMMENT '正确题目数量',
`incorrect_number` int(11) DEFAULT NULL COMMENT '错误题目数量',
`submit_status` int(11) DEFAULT NULL,
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '考试记录表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='考试记录表';
-- ----------------------------
-- Table structure for exam_examination_subject
......@@ -129,18 +133,19 @@ CREATE TABLE `exam_examination_record` (
DROP TABLE IF EXISTS `exam_examination_subject`;
CREATE TABLE `exam_examination_subject` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`examination_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '考试ID',
`subject_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '题目ID',
`type` int(11) NULL DEFAULT NULL COMMENT '类型 0-选择题,1-简答题',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`serial_number` int(11) NULL DEFAULT NULL,
`examination_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '考试ID',
`subject_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '题目ID',
`type` int(11) DEFAULT NULL COMMENT '类型 0-选择题,1-简答题',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`serial_number` int(11) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '考试题目表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='考试题目表';
-- ----------------------------
-- Records of exam_examination_subject
-- ----------------------------
BEGIN;
INSERT INTO `exam_examination_subject` VALUES ('590970743886581760', '590969316204220416', '590970743878193152', 0, 'EXAM', 'gitee', 1);
INSERT INTO `exam_examination_subject` VALUES ('590970887440830464', '590969316204220416', '590970887432441856', 0, 'EXAM', 'gitee', 2);
INSERT INTO `exam_examination_subject` VALUES ('590971026888855552', '590969316204220416', '590971026880466944', 0, 'EXAM', 'gitee', 3);
......@@ -163,6 +168,7 @@ INSERT INTO `exam_examination_subject` VALUES ('590973027999682560', '5909695143
INSERT INTO `exam_examination_subject` VALUES ('590973115165708288', '590969514372501504', '590973115157319680', 0, 'EXAM', 'gitee', 10);
INSERT INTO `exam_examination_subject` VALUES ('590973253548380160', '590969514372501504', '590973253544185856', 0, 'EXAM', 'gitee', 11);
INSERT INTO `exam_examination_subject` VALUES ('590973360670904320', '590969514372501504', '590973360662515712', 0, 'EXAM', 'gitee', 12);
COMMIT;
-- ----------------------------
-- Table structure for exam_knowledge
......@@ -170,24 +176,26 @@ INSERT INTO `exam_examination_subject` VALUES ('590973360670904320', '5909695143
DROP TABLE IF EXISTS `exam_knowledge`;
CREATE TABLE `exam_knowledge` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`knowledge_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '知识名称',
`knowledge_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '知识描述',
`attachment_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件ID',
`status` int(11) NULL DEFAULT NULL COMMENT '状态',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`knowledge_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '知识名称',
`knowledge_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '知识描述',
`attachment_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '附件ID',
`status` int(11) DEFAULT NULL COMMENT '状态',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '知识表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='知识表';
-- ----------------------------
-- Records of exam_knowledge
-- ----------------------------
BEGIN;
INSERT INTO `exam_knowledge` VALUES ('590978901526843392', '四川省2016年普通高考适应性测试', '四川省2016年普通高考适应性测试', '590978944174526464', 0, 'admin', '2019-06-19 18:59:09', 'admin', '2019-07-04 13:51:27', 0, 'EXAM', 'gitee');
COMMIT;
-- ----------------------------
-- Table structure for exam_pictures
......@@ -195,17 +203,17 @@ INSERT INTO `exam_knowledge` VALUES ('590978901526843392', '四川省2016年普
DROP TABLE IF EXISTS `exam_pictures`;
CREATE TABLE `exam_pictures` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`picture_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '知识名称',
`attachment_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '附件ID',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`picture_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '知识名称',
`attachment_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '附件ID',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '图片表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='图片表';
-- ----------------------------
-- Table structure for exam_subject_category
......@@ -213,30 +221,32 @@ CREATE TABLE `exam_pictures` (
DROP TABLE IF EXISTS `exam_subject_category`;
CREATE TABLE `exam_subject_category` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`category_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类名称',
`category_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类描述',
`parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父分类ID',
`sort` int(11) NULL DEFAULT NULL COMMENT '排序号',
`type` int(11) NULL DEFAULT NULL COMMENT '类型: 0-私共,1-公有',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`category_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '分类名称',
`category_desc` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '分类描述',
`parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '父分类ID',
`sort` int(11) DEFAULT NULL COMMENT '排序号',
`type` int(11) DEFAULT NULL COMMENT '类型: 0-私共,1-公有',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '题目分类表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='题目分类表';
-- ----------------------------
-- Records of exam_subject_category
-- ----------------------------
BEGIN;
INSERT INTO `exam_subject_category` VALUES ('590975991732637696', '计算机', NULL, '-1', 30, NULL, 'admin', '2019-06-19 18:47:36', 'admin', '2019-06-19 18:47:36', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_category` VALUES ('590976037467328512', '数据库基础', NULL, '590975991732637696', 30, NULL, 'admin', '2019-06-19 18:47:47', 'admin', '2019-07-04 13:51:03', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_category` VALUES ('590976094983819264', 'Java程序设计', NULL, '590975991732637696', 31, NULL, 'admin', '2019-06-19 18:48:00', 'admin', '2019-06-19 18:48:00', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_category` VALUES ('590976142211682304', '数据结构', NULL, '590975991732637696', 33, NULL, 'admin', '2019-06-19 18:48:12', 'admin', '2019-06-19 18:48:12', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_category` VALUES ('590976191398285312', '地理', NULL, '-1', 31, NULL, 'admin', '2019-06-19 18:48:23', 'admin', '2019-06-19 18:48:23', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_category` VALUES ('590976335996915712', '计算机基础', NULL, '590975991732637696', 34, NULL, 'admin', '2019-06-19 18:48:58', 'admin', '2019-06-19 18:48:58', 0, 'EXAM', 'gitee');
COMMIT;
-- ----------------------------
-- Table structure for exam_subject_choices
......@@ -244,27 +254,28 @@ INSERT INTO `exam_subject_category` VALUES ('590976335996915712', '计算机基
DROP TABLE IF EXISTS `exam_subject_choices`;
CREATE TABLE `exam_subject_choices` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`category_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`serial_number` int(11) NULL DEFAULT NULL COMMENT '题目序号',
`subject_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '题目名称',
`choices_type` int(11) NULL DEFAULT NULL COMMENT '题目类型',
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参考答案',
`score` int(11) NULL DEFAULT NULL COMMENT '题目分值',
`analysis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解析',
`level` int(11) NULL DEFAULT NULL COMMENT '难度等级',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`category_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`serial_number` int(11) DEFAULT NULL COMMENT '题目序号',
`subject_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '题目名称',
`choices_type` int(11) DEFAULT NULL COMMENT '题目类型',
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '参考答案',
`score` int(11) DEFAULT NULL COMMENT '题目分值',
`analysis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '解析',
`level` int(11) DEFAULT NULL COMMENT '难度等级',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '选择题表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='选择题表';
-- ----------------------------
-- Records of exam_subject_choices
-- ----------------------------
BEGIN;
INSERT INTO `exam_subject_choices` VALUES ('590970743878193152', '0', 1, '自计算机问世至今已经经历了四个时代,划分时代的主要依据是计算机的_', 0, 'D', 5, '<p>无</p>', 2, 'admin', '2019-06-19 18:26:45', 'admin', '2019-06-19 18:31:29', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_choices` VALUES ('590970887432441856', '0', 2, '第一台计算机是在1946年在美国诞生,该机的英文缩写是_', 0, 'A', 5, '<p>无</p>', 2, 'admin', '2019-06-19 18:27:19', 'admin', '2019-06-19 18:27:19', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_choices` VALUES ('590971026880466944', '0', 3, '当前的计算机一般被认为是第四代计算机,它所采用的逻辑元件是_', 0, 'C', 5, '无', 2, 'admin', '2019-06-19 18:27:52', 'admin', '2019-06-19 18:27:52', 0, 'EXAM', 'gitee');
......@@ -288,6 +299,30 @@ INSERT INTO `exam_subject_choices` VALUES ('590973115157319680', '0', 10, '19
INSERT INTO `exam_subject_choices` VALUES ('590973253544185856', '0', 11, '1920–1921 年,苏俄许多工人流往农村,还有一些则自谋生路成了小手工业者。据此推知当时苏俄', 0, 'A', 5, '', 2, 'admin', '2019-06-19 18:36:43', 'admin', '2019-06-19 18:36:43', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_choices` VALUES ('590973360662515712', '0', 12, '1964 年 6 月,美国《时代》杂志发表社论指出:“从北约到联合国,从拉丁美洲到红色中国,几乎在世界政治中的每一个问题或地区上,法国都采取和美国政策不一致的态度。”这一社论', 0, 'B', 5, '', 2, 'admin', '2019-06-19 18:37:08', 'admin', '2019-06-19 18:37:08', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_choices` VALUES ('590976455786237952', '590976335996915712', 1, '自计算机问世至今已经经历了四个时代,划分时代的主要依据是计算机的_', 0, 'D', 5, '', 2, 'admin', '2019-06-19 18:49:26', 'admin', '2019-07-04 13:51:17', 0, 'EXAM', 'gitee');
COMMIT;
-- ----------------------------
-- Table structure for exam_subject_judgement
-- ----------------------------
DROP TABLE IF EXISTS `exam_subject_judgement`;
CREATE TABLE `exam_subject_judgement` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`category_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '分类ID',
`serial_number` int(11) DEFAULT NULL COMMENT '序号',
`subject_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '题目名称',
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '参考答案',
`score` int(11) DEFAULT NULL COMMENT '分值',
`analysis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '解析',
`level` int(11) DEFAULT NULL COMMENT '难度等级',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='简答题表';
-- ----------------------------
-- Table structure for exam_subject_option
......@@ -295,22 +330,23 @@ INSERT INTO `exam_subject_choices` VALUES ('590976455786237952', '59097633599691
DROP TABLE IF EXISTS `exam_subject_option`;
CREATE TABLE `exam_subject_option` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`subject_choices_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选择题ID',
`option_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项名称',
`option_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '选项内容',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`subject_choices_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '选择题ID',
`option_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '选项名称',
`option_content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '选项内容',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '选择题选项表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='选择题选项表';
-- ----------------------------
-- Records of exam_subject_option
-- ----------------------------
BEGIN;
INSERT INTO `exam_subject_option` VALUES ('590970743911747584', '590970743878193152', 'A', '<p>规模</p>', 'admin', '2019-06-19 18:26:45', 'admin', '2019-06-19 18:31:29', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_option` VALUES ('590970743911747585', '590970743878193152', 'B', '<p>功能</p>', 'admin', '2019-06-19 18:26:45', 'admin', '2019-06-19 18:31:29', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_option` VALUES ('590970743911747586', '590970743878193152', 'C', '<p>性能</p>', 'admin', '2019-06-19 18:26:45', 'admin', '2019-06-19 18:31:29', 0, 'EXAM', 'gitee');
......@@ -407,6 +443,7 @@ INSERT INTO `exam_subject_option` VALUES ('590976456683819008', '590976456675430
INSERT INTO `exam_subject_option` VALUES ('590976456683819009', '590976456675430400', 'B', '<p>功能</p>', 'admin', '2019-06-19 18:49:27', 'admin', '2019-06-19 18:49:27', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_option` VALUES ('590976456683819010', '590976456675430400', 'C', '<p>性能</p>', 'admin', '2019-06-19 18:49:27', 'admin', '2019-06-19 18:49:27', 0, 'EXAM', 'gitee');
INSERT INTO `exam_subject_option` VALUES ('590976456683819011', '590976456675430400', 'D', '构成元件', 'admin', '2019-06-19 18:49:27', 'admin', '2019-06-19 18:49:27', 0, 'EXAM', 'gitee');
COMMIT;
-- ----------------------------
-- Table structure for exam_subject_short_answer
......@@ -414,21 +451,21 @@ INSERT INTO `exam_subject_option` VALUES ('590976456683819011', '590976456675430
DROP TABLE IF EXISTS `exam_subject_short_answer`;
CREATE TABLE `exam_subject_short_answer` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`category_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类ID',
`serial_number` int(11) NULL DEFAULT NULL COMMENT '序号',
`subject_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '题目名称',
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参考答案',
`score` int(11) NULL DEFAULT NULL COMMENT '分值',
`analysis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '解析',
`level` int(11) NULL DEFAULT NULL COMMENT '难度等级',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_date` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) NULL DEFAULT 0 COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '租户编号',
`category_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '分类ID',
`serial_number` int(11) DEFAULT NULL COMMENT '序号',
`subject_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '题目名称',
`answer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '参考答案',
`score` int(11) DEFAULT NULL COMMENT '分值',
`analysis` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '解析',
`level` int(11) DEFAULT NULL COMMENT '难度等级',
`creator` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建人',
`create_date` timestamp NULL DEFAULT NULL COMMENT '创建时间',
`modifier` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '修改人',
`modify_date` timestamp NULL DEFAULT NULL COMMENT '修改时间',
`del_flag` int(11) DEFAULT '0' COMMENT '删除标记 0:正常;1:删除',
`application_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统编号',
`tenant_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '简答题表' ROW_FORMAT = Compact;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='简答题表';
SET FOREIGN_KEY_CHECKS = 1;
......@@ -11,7 +11,7 @@
Target Server Version : 50617
File Encoding : 65001
Date: 15/07/2019 21:39:26
Date: 18/07/2019 23:06:58
*/
SET NAMES utf8mb4;
......
......@@ -11,7 +11,7 @@
Target Server Version : 50617
File Encoding : 65001
Date: 15/07/2019 22:56:05
Date: 18/07/2019 23:06:48
*/
SET NAMES utf8mb4;
......@@ -120,11 +120,6 @@ CREATE TABLE `sys_log` (
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Records of sys_log
-- ----------------------------
INSERT INTO `sys_log` VALUES ('600442842367791104', NULL, '用户登录', NULL, NULL, NULL, NULL, NULL, NULL, 'auth-service', NULL, 'admin', '2019-07-15 21:45:29', 'admin', '2019-07-15 21:45:29', '0', 'EXAM', 'gitee');
-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
......@@ -648,7 +643,7 @@ CREATE TABLE `sys_user` (
INSERT INTO `sys_user` VALUES ('596078038307966976', '管理员', '15521089185', '596094244884713472', '1633736729@qq.com', '2019-07-01', 0, 0, '571347099191480320', '管理员', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2019-07-04 13:51:34', 'admin', '2019-07-04 13:51:35', 0, 'EXAM', 'gitee');
INSERT INTO `sys_user` VALUES ('596307222997372928', '梁同学', '15521089185', NULL, '1633736729@qq.com', '2019-07-01', 0, 1, NULL, '梁同学', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2019-07-05 21:53:16', 'admin', '2019-07-05 21:53:17', 0, 'EXAM', 'gitee');
INSERT INTO `sys_user` VALUES ('596332387600830464', '林老师', '15521089185', NULL, '1633736729@qq.com', '2019-07-03', 0, 1, NULL, '林老师', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2019-07-04 13:34:28', 'admin', '2019-07-04 13:38:06', 0, 'EXAM', 'gitee');
INSERT INTO `sys_user` VALUES ('597110984758398976', '白炽灯', NULL, '597110984758398977', NULL, NULL, 0, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2019-07-06 17:05:52', NULL, NULL, 'ovLl45InRn4Hz_jrpEk-gF-kEFf8', '2019-07-06 17:05:53', 'ovLl45InRn4Hz_jrpEk-gF-kEFf8', '2019-07-06 17:05:53', 0, 'EXAM', 'gitee');
INSERT INTO `sys_user` VALUES ('597110984758398976', '测试', '15521089182', '597110984758398977', NULL, NULL, 0, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2019-07-06 17:05:52', NULL, NULL, 'ovLl45InRn4Hz_jrpEk-gF-kEFf8', '2019-07-18 23:06:24', 'admin', '2019-07-18 23:06:25', 0, 'EXAM', 'gitee');
-- ----------------------------
-- Table structure for sys_user_auths
......@@ -696,7 +691,7 @@ CREATE TABLE `sys_user_role` (
INSERT INTO `sys_user_role` VALUES ('596307898116739072', '596078038307966976', '596117256346406912');
INSERT INTO `sys_user_role` VALUES ('596333922548322304', '596332387600830464', '596330074307956736');
INSERT INTO `sys_user_role` VALUES ('596820924016234496', '596307222997372928', '596116511031169024');
INSERT INTO `sys_user_role` VALUES ('597110985244938240', '597110984758398976', '596116511031169024');
INSERT INTO `sys_user_role` VALUES ('601550371109867520', '597110984758398976', '596116511031169024');
-- ----------------------------
-- Table structure for sys_user_student
......
......@@ -5,7 +5,7 @@ DOCKERHOME=/spring-microservice-exam
# 镜像名称前缀、标签
BASE_IMAGE_NAME=registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam
BSEE_IMAGE_TAG=3.0.0
BSEE_IMAGE_TAG=3.1.0
# 各服务的镜像名称
CONFIG_SERVICE=$BASE_IMAGE_NAME/config-service:$BSEE_IMAGE_TAG
......
docs/images/deploy/config.png

88 KB | W: | H:

docs/images/deploy/config.png

248 KB | W: | H:

docs/images/deploy/config.png
docs/images/deploy/config.png
docs/images/deploy/config.png
docs/images/deploy/config.png
  • 2-up
  • Swipe
  • Onion skin
docs/images/deploy/config_fdfs.png

127 KB | W: | H:

docs/images/deploy/config_fdfs.png

223 KB | W: | H:

docs/images/deploy/config_fdfs.png
docs/images/deploy/config_fdfs.png
docs/images/deploy/config_fdfs.png
docs/images/deploy/config_fdfs.png
  • 2-up
  • Swipe
  • Onion skin
docs/images/deploy/config_redis.png

88.2 KB | W: | H:

docs/images/deploy/config_redis.png

303 KB | W: | H:

docs/images/deploy/config_redis.png
docs/images/deploy/config_redis.png
docs/images/deploy/config_redis.png
docs/images/deploy/config_redis.png
  • 2-up
  • Swipe
  • Onion skin
docs/images/deploy/config_xms.png

89.9 KB | W: | H:

docs/images/deploy/config_xms.png

162 KB | W: | H:

docs/images/deploy/config_xms.png
docs/images/deploy/config_xms.png
docs/images/deploy/config_xms.png
docs/images/deploy/config_xms.png
  • 2-up
  • Swipe
  • Onion skin
### 在线考试系统V3.0使用文档
完整项目地址:
- 前台ui:[spring-microservice-exam-web](https://gitee.com/wells2333/spring-microservice-exam-web.git)
- 后台ui:[spring-microservice-exam-ui](https://gitee.com/wells2333/spring-microservice-exam-ui.git)
- 后端:[spring-microservice-exam](https://gitee.com/wells2333/spring-microservice-exam.git)
### 系列文章
- [登录]()
- [系统管理]()
- [考务管理]()
- [系统监控]()
- [附件管理]()
- [个人资料]()
主要介绍如何基于docker、docker-compose部署后端项目、前端项目,主要的步骤是本地构建镜像,推送的远程仓库,远程服务器从远程仓库拉去镜像运行
主要介绍如何基于docker、docker-compose部署后端项目、前端项目,主要的步骤是本地构建镜像,推送的远程仓库,远程服务器从远程仓库拉去镜像运行
......@@ -10,11 +10,13 @@
MySQL需要单独安装,创建数据库和执行初始化脚本:
`/docs/deploy/mysql/microservice-user.sql`
`/docs/deploy/mysql/init/microservice-user.sql`
`/docs/deploy/mysql/microservice-exam.sql`
`/docs/deploy/mysql/init/microservice-exam.sql`
`/docs/deploy/mysql/microservice-auth.sql`
`/docs/deploy/mysql/init/microservice-auth.sql`
`/docs/deploy/mysql/init/microservice-gateway.sql`
## 安装docker、docker-compose
......@@ -77,4 +79,4 @@ $ docker login --username=你的阿里云账号 registry.cn-hangzhou.aliyuncs.co
- [安装docker-compose](https://www.jianshu.com/p/94760f35c98c)
- [在线考试系统V2.0镜像构建、推送、部署](http://ehedgehog.net/2019/04/22/%E5%9C%A8%E7%BA%BF%E8%80%83%E8%AF%95%E7%B3%BB%E7%BB%9FV2.0%E9%95%9C%E5%83%8F%E6%9E%84%E5%BB%BA%E3%80%81%E6%8E%A8%E9%80%81%E3%80%81%E9%83%A8%E7%BD%B2/)
\ No newline at end of file
- [在线考试系统V3.0镜像构建、推送、部署](http://ehedgehog.net/2019/04/22/%E5%9C%A8%E7%BA%BF%E8%80%83%E8%AF%95%E7%B3%BB%E7%BB%9FV2.0%E9%95%9C%E5%83%8F%E6%9E%84%E5%BB%BA%E3%80%81%E6%8E%A8%E9%80%81%E3%80%81%E9%83%A8%E7%BD%B2/)
\ No newline at end of file
......@@ -47,6 +47,8 @@ fastDfs的IP和端口号:
`/docs/deploy/mysql/microservice-auth.sql`
`/docs/deploy/mysql/microservice-gateway.sql`
#### 启动后端项目
启动项目前要**先确认consul、MySQL、redis、rabbitMq是否已经启动**
......@@ -62,6 +64,7 @@ fastDfs的IP和端口号:
需要监控功能再启动:
6. monitor-service
7. msc-service
内存不足的可以限制每个服务的内存:`config-service`可以分配64M(-Xmx64m -Xms64m)、其它服务分配128M(-Xmx128m -Xms128m)
......
......@@ -9,13 +9,20 @@ common -- 系统公共模块
├── common-feign -- 系统公共feign模块
├── common-log -- 系统公共日志模块
└── common-security -- 系统公共安全模块,包括资源服务器配置
service-api -- 服务api公共模块
├── user-api -- 用户服务api
└── exam-api -- 考试服务api
service-api-impl -- 服务api模块实现
├── auth-service -- 授权服务(OAuth2.0)
├── user-service -- 用户服务
└── exam-service -- 考试服务
modules -- 业务模块
|-- auth-service-parent -- 认证授权服务
|-- auth-service-api -- 认证授权服务api
|-- auth-service -- 认证授权服务具体实现
|-- user-service-parent -- 用户服务
|-- user-service-api -- 用户服务api
|-- user-service -- 用户服务具体实现
|── exam-service-parent -- 考试服务
|-- exam-service-api -- 考试服务api
|-- exam-service -- 考试服务具体实现
└── msc-service-parent -- 消息中心
|-- msc-service-api -- 消息中心api
|-- msc-service -- 消息中心具体实现
config-service -- 配置中心(本地仓库)
gateway-service -- 网关(动态路由)
monitor-service -- spring boot amdin 监控服务
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>gateway-service</artifactId>
<name>${project.artifactId}</name>
......
package com.github.tangyi.gateway.config;
import com.github.tangyi.common.core.constant.CommonConstant;
import com.github.tangyi.gateway.module.Route;
import com.github.tangyi.common.core.utils.JsonMapper;
import com.github.tangyi.gateway.module.Route;
import com.github.tangyi.gateway.service.RouteService;
import com.github.tangyi.gateway.vo.RoutePredicateVo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
......@@ -40,6 +41,8 @@ public class RegistrySwaggerResourcesProvider implements SwaggerResourcesProvide
private final RedisTemplate redisTemplate;
private final RouteService routeService;
@Override
public List<SwaggerResource> get() {
List<SwaggerResource> resources = new ArrayList<>();
......@@ -50,11 +53,8 @@ public class RegistrySwaggerResourcesProvider implements SwaggerResourcesProvide
if (swaggerProviderConfig.getProviders().contains(route.getId()))
routes.add(route.getId());
});
// 结合配置的route-路径(Path),和route过滤,只获取有效的route节点
Object object = redisTemplate.opsForValue().get(CommonConstant.ROUTE_KEY);
if (object != null) {
List<Route> routeList = JsonMapper.getInstance().fromJson(object.toString(), JsonMapper.getInstance().createCollectionType(ArrayList.class, Route.class));
List<Route> routeList = this.routeList();
if (CollectionUtils.isNotEmpty(routeList)) {
for (Route route : routeList) {
if (routes.contains(route.getRouteId())) {
......@@ -74,11 +74,30 @@ public class RegistrySwaggerResourcesProvider implements SwaggerResourcesProvide
}
}
}
}
return resources;
}
/**
* 获取路由列表
*
* @return List<Route>
*/
private List<Route> routeList() {
List<Route> routeList;
// 结合配置的route-路径(Path),和route过滤,只获取有效的route节点
Object object = redisTemplate.opsForValue().get(CommonConstant.ROUTE_KEY);
if (object == null) {
// 放入缓存
routeList = routeService.findList(new Route());
if (CollectionUtils.isNotEmpty(routeList))
redisTemplate.opsForValue().set(CommonConstant.ROUTE_KEY, JsonMapper.getInstance().toJson(routeList));
} else {
routeList = JsonMapper.getInstance().fromJson(object.toString(), JsonMapper.getInstance().createCollectionType(ArrayList.class, Route.class));
}
return routeList;
}
/**
* 服务信息
*
* @param name name
......
......@@ -17,6 +17,7 @@ import javax.validation.Valid;
/**
* 路由controller
* TODO:增加security认证
*
* @author tangyi
* @date 2019/4/2 15:03
......
......@@ -2,6 +2,7 @@ package com.github.tangyi.gateway.service;
import com.fasterxml.jackson.databind.JavaType;
import com.github.tangyi.common.core.constant.CommonConstant;
import com.github.tangyi.common.core.exceptions.CommonException;
import com.github.tangyi.common.core.service.CrudService;
import com.github.tangyi.common.core.utils.JsonMapper;
import com.github.tangyi.gateway.constants.GatewayConstant;
......@@ -9,7 +10,6 @@ import com.github.tangyi.gateway.mapper.RouteMapper;
import com.github.tangyi.gateway.module.Route;
import com.github.tangyi.gateway.vo.RouteFilterVo;
import com.github.tangyi.gateway.vo.RoutePredicateVo;
import com.github.tangyi.gateway.vo.RouteVo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
......@@ -18,10 +18,8 @@ import org.springframework.cloud.gateway.filter.FilterDefinition;
import org.springframework.cloud.gateway.handler.predicate.PredicateDefinition;
import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import reactor.core.publisher.Mono;
import java.net.URI;
import java.util.ArrayList;
......@@ -51,6 +49,14 @@ public class RouteService extends CrudService<RouteMapper, Route> {
@Override
public int insert(Route route) {
int update;
if (StringUtils.isBlank(route.getRouteId()))
throw new CommonException("服务ID不能为空!");
// 校验服务路由是否存在
Route condition = new Route();
condition.setRouteId(route.getRouteId());
List<Route> routes = this.findList(condition);
if (CollectionUtils.isNotEmpty(routes))
throw new CommonException("该服务的路由已存在!");
route.setCommonValue("", GatewayConstant.SYS_CODE, GatewayConstant.DEFAULT_TENANT_CODE);
if ((update = this.dao.insert(route)) > 0) {
dynamicRouteService.add(routeDefinition(route));
......@@ -67,6 +73,8 @@ public class RouteService extends CrudService<RouteMapper, Route> {
@Override
public int update(Route route) {
int update;
if (StringUtils.isBlank(route.getRouteId()))
throw new CommonException("服务ID不能为空!");
route.setNewRecord(false);
route.setCommonValue("", GatewayConstant.SYS_CODE, GatewayConstant.DEFAULT_TENANT_CODE);
if ((update = this.dao.update(route)) > 0) {
......
......@@ -2,12 +2,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api</artifactId>
<version>3.0.0</version>
<artifactId>auth-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>auth-api</artifactId>
<artifactId>auth-service-api</artifactId>
<name>${project.artifactId}</name>
<description>授权服务api</description>
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api-impl</artifactId>
<version>3.0.0</version>
<artifactId>auth-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>auth-service</artifactId>
<name>${project.artifactId}</name>
......@@ -30,22 +31,22 @@
<artifactId>common-log</artifactId>
</dependency>
<!-- user-api -->
<!-- user-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>user-api</artifactId>
<artifactId>user-service-api</artifactId>
</dependency>
<!-- auth-api -->
<!-- auth-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>auth-api</artifactId>
<artifactId>auth-service-api</artifactId>
</dependency>
<!-- exam-api -->
<!-- exam-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>exam-api</artifactId>
<artifactId>exam-service-api</artifactId>
</dependency>
<!-- web 服务 -->
......
package com.github.tangyi.auth.model;
import com.github.tangyi.common.core.enums.LoginType;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
......@@ -17,9 +18,22 @@ public class CustomUserDetails extends User {
private static final long serialVersionUID = 1L;
/**
* 租户标识
*/
private String tenantCode;
/**
* 开始授权时间
*/
private long start;
/**
* 登录类型
*/
private LoginType loginType;
/**
* 构造方法
*
* @param username username
......@@ -27,9 +41,13 @@ public class CustomUserDetails extends User {
* @param enabled enabled
* @param authorities authorities
* @param tenantCode tenantCode
* @param start start
* @param loginType loginType
*/
public CustomUserDetails(String username, String password, boolean enabled, Collection<? extends GrantedAuthority> authorities, String tenantCode) {
public CustomUserDetails(String username, String password, boolean enabled, Collection<? extends GrantedAuthority> authorities, String tenantCode, long start, LoginType loginType) {
super(username, password, enabled, true, true, true, authorities);
this.tenantCode = tenantCode;
this.start = start;
this.loginType = loginType;
}
}
......@@ -5,10 +5,12 @@ import com.github.tangyi.common.core.constant.CommonConstant;
import com.github.tangyi.common.core.constant.ServiceConstant;
import com.github.tangyi.common.core.model.Log;
import com.github.tangyi.common.core.utils.SysUtil;
import com.github.tangyi.common.security.utils.SecurityUtil;
import com.github.tangyi.user.api.feign.UserServiceClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.http.HttpMethod;
import org.springframework.scheduling.annotation.Async;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.authentication.event.AbstractAuthenticationEvent;
......@@ -39,6 +41,8 @@ public class CustomAuthenticationSuccessHandler {
@EventListener({AuthenticationSuccessEvent.class, InteractiveAuthenticationSuccessEvent.class})
public void processAuthenticationSuccessEvent(AbstractAuthenticationEvent event) {
// 注意:登录包括oauth2客户端、用户名密码登录都会触发AuthenticationSuccessEvent,这里只记录用户名密码登录的日志
if (event.getSource() instanceof OAuth2Authentication)
return;
if (event.getAuthentication().getPrincipal() instanceof CustomUserDetails) {
CustomUserDetails userDetails = (CustomUserDetails) event.getAuthentication().getPrincipal();
String tenantCode = userDetails.getTenantCode();
......@@ -48,7 +52,10 @@ public class CustomAuthenticationSuccessHandler {
Log logInfo = new Log();
logInfo.setCommonValue(username, SysUtil.getSysCode(), tenantCode);
logInfo.setTitle("用户登录");
//logInfo.setType(CommonConstant.STATUS_NORMAL);
logInfo.setType(CommonConstant.STATUS_NORMAL);
logInfo.setMethod(HttpMethod.POST.name());
logInfo.setTime(String.valueOf(System.currentTimeMillis() - userDetails.getStart()));
logInfo.setRequestUri(userDetails.getLoginType().getUri());
// 获取ip、浏览器信息
this.initLogInfo(logInfo, event.getSource());
logInfo.setServiceId(ServiceConstant.AUTH_SERVICE);
......@@ -65,22 +72,17 @@ public class CustomAuthenticationSuccessHandler {
* @param source source
*/
private void initLogInfo(Log logInfo, Object source) {
if (source instanceof OAuth2Authentication) {
OAuth2Authentication auth2Authentication = (OAuth2Authentication) source;
Object details = auth2Authentication.getDetails();
if (details instanceof OAuth2AuthenticationDetails) {
OAuth2AuthenticationDetails oAuth2AuthenticationDetails = (OAuth2AuthenticationDetails) details;
logInfo.setIp(oAuth2AuthenticationDetails.getRemoteAddress());
}
} else if (source instanceof UsernamePasswordAuthenticationToken) {
UsernamePasswordAuthenticationToken token = (UsernamePasswordAuthenticationToken) source;
Object details = token.getDetails();
if (details instanceof WebAuthenticationDetails) {
WebAuthenticationDetails webAuthenticationDetails = (WebAuthenticationDetails) details;
if (source instanceof UsernamePasswordAuthenticationToken) {
Object currentAuthentication = SecurityUtil.getCurrentAuthentication();
if (currentAuthentication instanceof UsernamePasswordAuthenticationToken) {
Object currentDetails = ((UsernamePasswordAuthenticationToken) currentAuthentication).getDetails();
if (currentDetails instanceof WebAuthenticationDetails) {
WebAuthenticationDetails webAuthenticationDetails = (WebAuthenticationDetails) currentDetails;
logInfo.setIp(webAuthenticationDetails.getRemoteAddress());
}
}
}
}
/**
* 获取用户名
......
......@@ -4,6 +4,7 @@ import com.github.tangyi.auth.api.module.WxSession;
import com.github.tangyi.auth.model.CustomUserDetails;
import com.github.tangyi.auth.service.WxSessionService;
import com.github.tangyi.common.core.constant.CommonConstant;
import com.github.tangyi.common.core.enums.LoginType;
import com.github.tangyi.common.core.exceptions.CommonException;
import com.github.tangyi.common.core.exceptions.TenantNotFoundException;
import com.github.tangyi.common.core.model.ResponseBean;
......@@ -61,11 +62,12 @@ public class CustomUserDetailsServiceImpl implements CustomUserDetailsService {
*/
@Override
public UserDetails loadUserByIdentifierAndTenantCode(String username, String tenantCode) throws UsernameNotFoundException, TenantNotFoundException {
long start = System.currentTimeMillis();
Tenant tenant = this.validateTenantCode(tenantCode);
UserVo userVo = userServiceClient.findUserByIdentifier(username, tenantCode);
if (userVo == null)
throw new UsernameNotFoundException("用户名不存在.");
return new CustomUserDetails(username, userVo.getCredential(), CommonConstant.STATUS_NORMAL.equals(userVo.getStatus()), getAuthority(userVo), userVo.getTenantCode());
return new CustomUserDetails(username, userVo.getCredential(), CommonConstant.STATUS_NORMAL.equals(userVo.getStatus()), getAuthority(userVo), userVo.getTenantCode(), start, LoginType.PWD);
}
/**
......@@ -79,11 +81,12 @@ public class CustomUserDetailsServiceImpl implements CustomUserDetailsService {
*/
@Override
public UserDetails loadUserBySocialAndTenantCode(String social, String tenantCode) throws UsernameNotFoundException {
long start = System.currentTimeMillis();
Tenant tenant = this.validateTenantCode(tenantCode);
UserVo userVo = userServiceClient.findUserBySocial(social, tenantCode);
if (userVo == null)
throw new UsernameNotFoundException("用户手机号未注册.");
return new CustomUserDetails(userVo.getIdentifier(), userVo.getCredential(), CommonConstant.STATUS_NORMAL.equals(userVo.getStatus()), getAuthority(userVo), userVo.getTenantCode());
return new CustomUserDetails(userVo.getIdentifier(), userVo.getCredential(), CommonConstant.STATUS_NORMAL.equals(userVo.getStatus()), getAuthority(userVo), userVo.getTenantCode(), start, LoginType.SMS);
}
/**
......@@ -99,6 +102,7 @@ public class CustomUserDetailsServiceImpl implements CustomUserDetailsService {
*/
@Override
public UserDetails loadUserByWxCodeAndTenantCode(String code, String tenantCode, WxUser wxUser) throws UsernameNotFoundException {
long start = System.currentTimeMillis();
Tenant tenant = this.validateTenantCode(tenantCode);
// 根据code获取openId和sessionKey
WxSession wxSession = wxService.code2Session(code);
......@@ -130,7 +134,7 @@ public class CustomUserDetailsServiceImpl implements CustomUserDetailsService {
userDto.setLoginTime(DateUtils.asDate(LocalDateTime.now()));
//userServiceClient.updateUser(userDto);
}
return new CustomUserDetails(userVo.getIdentifier(), userVo.getCredential(), CommonConstant.STATUS_NORMAL.equals(userVo.getStatus()), getAuthority(userVo), userVo.getTenantCode());
return new CustomUserDetails(userVo.getIdentifier(), userVo.getCredential(), CommonConstant.STATUS_NORMAL.equals(userVo.getStatus()), getAuthority(userVo), userVo.getTenantCode(), start, LoginType.WECHAT);
}
/**
......
......@@ -2,20 +2,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
</parent>
<artifactId>service-api-impl</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>api实现</description>
<modules>
<module>auth-service-api</module>
<module>auth-service</module>
<module>user-service</module>
<module>exam-service</module>
<module>msc-service</module>
</modules>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>modules</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>auth-service-parent</artifactId>
<name>${project.artifactId}</name>
<description>认证授权服务</description>
</project>
......@@ -2,12 +2,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api</artifactId>
<version>3.0.0</version>
<artifactId>exam-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>exam-api</artifactId>
<artifactId>exam-service-api</artifactId>
<name>${project.artifactId}</name>
<description>考试服务api</description>
......
package com.github.tangyi.exam.api.module;
import com.github.tangyi.common.core.persistence.BaseEntity;
import lombok.Data;
/**
* 考试权限
*
* @author tangyi
* @date 2019-07-16 14:01
*/
@Data
public class ExaminationAuth extends BaseEntity<ExaminationAuth> {
/**
* 学生ID
*/
private String userId;
/**
* 考试ID
*/
private String examinationId;
}
......@@ -28,7 +28,7 @@ public class ExaminationSubject extends BaseEntity<ExaminationSubject> {
private Integer serialNumber;
/**
* 题目类型,0:选择题,1:简答题
* 题目类型,0:选择题,1:简答题,2:判断题,3:多选题
*/
private Integer type;
}
package com.github.tangyi.exam.api.module;
import com.github.tangyi.common.core.persistence.BaseEntity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 判断题
*
* @author tangyi
* @date 2019-07-16 12:57
*/
@Data
public class SubjectJudgement extends BaseEntity<SubjectJudgement> {
/**
* 题目分类ID
*/
private String categoryId;
/**
* 题目序号
*/
@NotBlank(message = "题目序号不能为空")
private Integer serialNumber;
/**
* 题目名称
*/
@NotBlank(message = "题目名称不能为空")
private String subjectName;
/**
* 参考答案
*/
private String answer;
/**
* 分值
*/
@NotBlank(message = "题目分值不能为空")
private Integer score;
/**
* 解析
*/
private String analysis;
/**
* 难度等级
*/
private Integer level;
}
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api-impl</artifactId>
<version>3.0.0</version>
<artifactId>exam-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>exam-service</artifactId>
<name>${project.artifactId}</name>
......@@ -36,16 +37,16 @@
<artifactId>common-feign</artifactId>
</dependency>
<!-- user-api -->
<!-- user-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>user-api</artifactId>
<artifactId>user-service-api</artifactId>
</dependency>
<!-- exam-api -->
<!-- exam-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>exam-api</artifactId>
<artifactId>exam-service-api</artifactId>
</dependency>
<!-- web 服务 -->
......
......@@ -33,10 +33,10 @@ public class ExaminationInitConfig {
log.info("开始加载考试信息.");
// 查询已发布的考试
Examination examination = new Examination();
//examination.setStatus(CommonConstant.STATUS_NORMAL);
examination.setStatus(CommonConstant.STATUS_NORMAL.toString());
Stream<Examination> examinationStream = examinationService.findList(examination).stream();
if (Optional.ofNullable(examinationStream).isPresent())
examinationStream.forEach(tempExamination -> redisTemplate.opsForValue().set("examination::" + tempExamination.getId(), tempExamination));
examinationStream.forEach(tempExamination -> redisTemplate.opsForValue().set(tempExamination.getTenantCode() + ":examination:" + tempExamination.getId(), tempExamination));
log.info("考试信息加载完成.");
}
}
......@@ -95,9 +95,8 @@ public class SubjectController extends BaseController {
@RequestParam(value = CommonConstant.ORDER, required = false, defaultValue = CommonConstant.PAGE_ORDER_DEFAULT) String order,
SubjectDto subject) {
subject.setTenantCode(SysUtil.getTenantCode());
if (subject.getCategoryId().equals("-1")) {
if (subject.getCategoryId().equals("-1"))
subject.setCategoryId(null);
}
return subjectService.findPage(PageUtil.pageInfo(pageNum, pageSize, sort, order), subject);
}
......
......@@ -16,7 +16,17 @@ public enum SubjectTypeEnum {
/**
* 简答题
*/
SHORT_ANSWER(1);
SHORT_ANSWER(1),
/**
* 判断题
*/
JUDGEMENT(2),
/**
* 多选题
*/
MULTIPLE_CHOICES(3);
SubjectTypeEnum(Integer value) {
this.value = value;
......
package com.github.tangyi.exam.mapper;
import com.github.tangyi.common.core.persistence.CrudMapper;
import com.github.tangyi.exam.api.module.ExaminationAuth;
import org.apache.ibatis.annotations.Mapper;
/**
* 考试权限Mapper
*
* @author tangyi
* @date 2019-07-16 14:03
*/
@Mapper
public interface ExaminationAuthMapper extends CrudMapper<ExaminationAuth> {
}
package com.github.tangyi.exam.mapper;
import com.github.tangyi.common.core.persistence.CrudMapper;
import com.github.tangyi.exam.api.module.SubjectJudgement;
import org.apache.ibatis.annotations.Mapper;
/**
* 判断题Mapper
*
* @author tangyi
* @date 2019-07-16 13:00
*/
@Mapper
public interface SubjectJudgementMapper extends CrudMapper<SubjectJudgement> {
}
package com.github.tangyi.exam.service;
import com.github.tangyi.common.core.service.CrudService;
import com.github.tangyi.exam.api.module.ExaminationAuth;
import com.github.tangyi.exam.mapper.ExaminationAuthMapper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 考试权限Service
*
* @author tangyi
* @date 2019-07-16 14:04
*/
@Slf4j
@AllArgsConstructor
@Service
public class ExaminationAuthService extends CrudService<ExaminationAuthMapper, ExaminationAuth> {
/**
* 根据考生ID查询
*
* @param examinationAuth examinationAuth
* @return List<ExaminationAuth>
* @author tangyi
* @date 2019-07-16 14:06
*/
public List<ExaminationAuth> finListByUserId(ExaminationAuth examinationAuth) {
return null;
}
/**
* 根据考试ID查询
*
* @param examinationAuth examinationAuth
* @return List<ExaminationAuth>ß
* @author tangyi
* @date 2019-07-16 14:07
*/
public List<ExaminationAuth> finListByExaminationId(ExaminationAuth examinationAuth) {
return null;
}
/**
* 根据考试ID删除
*
* @param examinationAuth examinationAuth
* @return int
* @author tangyi
* @date 2019-07-16 14:08
*/
@Transactional
public int deleteByExaminationId(ExaminationAuth examinationAuth) {
return -1;
}
/**
* 根据考生ID删除
*
* @param examinationAuth examinationAuth
* @return int
* @author tangyi
* @date 2019-07-16 14:09
*/
@Transactional
public int deleteByUserId(ExaminationAuth examinationAuth) {
return -1;
}
}
......@@ -368,11 +368,13 @@ public class SubjectChoicesService extends CrudService<SubjectChoicesMapper, Sub
public PageInfo<SubjectDto> findSubjectPage(PageInfo pageInfo, SubjectDto subjectDto) {
SubjectChoices subjectChoices = new SubjectChoices();
BeanUtils.copyProperties(subjectDto, subjectChoices);
// 选择题类型:单选或多选
if (subjectDto.getType() != null)
subjectChoices.setChoicesType(subjectDto.getType());
PageInfo subjectChoicesPageInfo = this.findPage(pageInfo, subjectChoices);
List subjectDtos = SubjectUtil.subjectChoicesToDto(subjectChoicesPageInfo.getList());
PageInfo<SubjectDto> subjectDtoPageInfo = new PageInfo<>();
subjectDtoPageInfo.setList(subjectDtos);
subjectDtoPageInfo.setTotal(subjectChoicesPageInfo.getTotal());
subjectDtoPageInfo.setPageSize(subjectChoicesPageInfo.getPageSize());
subjectDtoPageInfo.setPageNum(subjectChoicesPageInfo.getPageNum());
......
package com.github.tangyi.exam.service;
import com.github.pagehelper.PageInfo;
import com.github.tangyi.common.core.service.CrudService;
import com.github.tangyi.exam.api.dto.SubjectDto;
import com.github.tangyi.exam.api.module.SubjectJudgement;
import com.github.tangyi.exam.mapper.SubjectJudgementMapper;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 判断题Service
*
* @author tangyi
* @date 2019-07-16 13:02
*/
@AllArgsConstructor
@Slf4j
@Service
public class SubjectJudgementService extends CrudService<SubjectJudgementMapper, SubjectJudgement> implements BaseSubjectService {
/**
* 根据ID查询
*
* @param id id
* @return SubjectDto
* @author tangyi
* @date 2019-07-16 13:06
*/
@Override
public SubjectDto getSubject(String id) {
return null;
}
/**
* 根据题目序号查询
*
* @param serialNumber serialNumber
* @return SubjectDto
* @author tangyi
* @date 2019-07-16 13:07
*/
@Override
public SubjectDto getSubjectBySerialNumber(Integer serialNumber) {
return null;
}
/**
* 查询列表
*
* @param subjectDto subjectDto
* @return List<SubjectDto>
* @author tangyi
* @date 2019-07-16 13:08
*/
@Override
public List<SubjectDto> findSubjectList(SubjectDto subjectDto) {
return null;
}
/**
* 查询分页
*
* @param pageInfo pageInfo
* @param subjectDto subjectDto
* @return PageInfo<SubjectDto>
* @author tangyi
* @date 2019-07-16 13:08
*/
@Override
public PageInfo<SubjectDto> findSubjectPage(PageInfo pageInfo, SubjectDto subjectDto) {
return null;
}
/**
* 根据ID批量查询
*
* @param subjectDto subjectDto
* @return List<SubjectDto>
* @author tangyi
* @date 2019-07-16 13:09
*/
@Override
public List<SubjectDto> findSubjectListById(SubjectDto subjectDto) {
return null;
}
/**
* 保存
*
* @param subjectDto subjectDto
* @return int
* @author tangyi
* @date 2019-07-16 13:10
*/
@Override
public int insertSubject(SubjectDto subjectDto) {
return 0;
}
/**
* 更新
*
* @param subjectDto subjectDto
* @return int
* @author tangyi
* @date 2019-07-16 13:10
*/
@Override
public int updateSubject(SubjectDto subjectDto) {
return 0;
}
/**
* 删除
*
* @param subjectDto subjectDto
* @return int
* @author tangyi
* @date 2019-07-16 13:10
*/
@Override
public int deleteSubject(SubjectDto subjectDto) {
return 0;
}
/**
* 批量删除
*
* @param subjectDto subjectDto
* @return int
* @author tangyi
* @date 2019-07-16 13:10
*/
@Override
public int deleteAllSubject(SubjectDto subjectDto) {
return 0;
}
/**
* 物理删除
*
* @param subjectDto subjectDto
* @return int
* @author tangyi
* @date 2019-07-16 13:10
*/
@Override
public int physicalDeleteSubject(SubjectDto subjectDto) {
return 0;
}
/**
* 批量物理删除
*
* @param subjectDto subjectDto
* @return int
* @author tangyi
* @date 2019-07-16 13:11
*/
@Override
public int physicalDeleteAllSubject(SubjectDto subjectDto) {
return 0;
}
}
......@@ -41,6 +41,8 @@ public class SubjectService {
private final SubjectOptionService subjectOptionService;
private final SubjectJudgementService subjectJudgementService;
/**
* 根据题目ID,题目类型查询题目信息
*
......@@ -265,11 +267,15 @@ public class SubjectService {
if (subjectType != null) {
switch (subjectType) {
case CHOICES:
case MULTIPLE_CHOICES:
baseSubjectService = this.subjectChoicesService;
break;
case SHORT_ANSWER:
baseSubjectService = this.subjectShortAnswerService;
break;
case JUDGEMENT:
baseSubjectService = this.subjectJudgementService;
break;
}
}
return baseSubjectService;
......
......@@ -64,7 +64,10 @@ public class SubjectUtil {
subjectDto.setScore(subjectChoice.getScore());
subjectDto.setAnalysis(subjectChoice.getAnalysis());
subjectDto.setLevel(subjectChoice.getLevel());
subjectDto.setType(SubjectTypeEnum.CHOICES.getValue());
// 选择题类型匹配
SubjectTypeEnum subjectTypeEnum = SubjectTypeEnum.match(subjectChoice.getChoicesType());
if (subjectTypeEnum != null)
subjectDto.setType(subjectTypeEnum.getValue());
subjectDto.setChoicesType(subjectChoice.getChoicesType());
subjectDto.setOptions(subjectChoice.getOptions());
subjectDto.setCreator(subjectChoice.getCreator());
......
......@@ -55,6 +55,9 @@
<if test="subjectName != null and subjectName != ''">
and a.subject_name like CONCAT('%',#{subjectName},'%')
</if>
<if test="choicesType != null and choicesType != ''">
and a.choices_type = #{choicesType}
</if>
<if test="tenantCode != null and tenantCode != ''">
and a.tenant_code = #{tenantCode}
</if>
......
<?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.github.tangyi.exam.mapper.SubjectJudgementMapper">
<resultMap id="subjectJudgementResultMap" type="com.github.tangyi.exam.api.module.SubjectJudgement">
<id column="id" property="id"/>
<result column="category_id" property="categoryId"/>
<result column="serial_number" property="serialNumber"/>
<result column="subject_name" property="subjectName"/>
<result column="answer" property="answer"/>
<result column="score" property="score"/>
<result column="analysis" property="analysis"/>
<result column="level" property="level"/>
<result column="creator" property="creator"/>
<result column="create_date" property="createDate" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="modifier" property="modifier"/>
<result column="modify_date" property="modifyDate" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="del_flag" property="delFlag"/>
<result column="application_code" property="applicationCode"/>
<result column="tenant_code" property="tenantCode"/>
</resultMap>
<sql id="subjectJudgementColumns">
a.id,
a.category_id,
a.serial_number,
a.subject_name,
a.answer,
a.score,
a.analysis,
a.level,
a.creator,
a.create_date,
a.modifier,
a.modify_date,
a.del_flag,
a.application_code,
a.tenant_code
</sql>
<!-- where 条件 -->
<sql id="whereColumnList">
<if test="categoryId != null and categoryId != ''">
and a.category_id = #{categoryId}
</if>
<if test="serialNumber != null and serialNumber != ''">
and a.serial_number = #{serialNumber}
</if>
<if test="subjectName != null and subjectName != ''">
and a.subject_name like CONCAT('%',#{subjectName},'%')
</if>
<if test="tenantCode != null and tenantCode != ''">
and a.tenant_code = #{tenantCode}
</if>
</sql>
<select id="get" resultMap="subjectJudgementResultMap">
SELECT
<include refid="subjectJudgementColumns"/>
FROM exam_subject_judgement a
WHERE a.id = #{id} and a.del_flag = 0
</select>
<!-- 根据题目序号查询 -->
<select id="getBySerialNumber" resultMap="subjectJudgementResultMap">
SELECT
<include refid="subjectJudgementColumns"/>
FROM exam_subject_judgement a WHERE a.serial_number = #{serialNumber} and a.del_flag = 0
</select>
<select id="findList" resultMap="subjectJudgementResultMap">
SELECT
<include refid="subjectJudgementColumns"/>
FROM exam_subject_judgement a WHERE a.del_flag = 0
<include refid="whereColumnList"/>
</select>
<select id="findListById" resultMap="subjectJudgementResultMap">
SELECT
<include refid="subjectJudgementColumns"/>
FROM exam_subject_judgement a WHERE a.id IN
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY serial_number ASC
</select>
<insert id="insert">
insert into exam_subject_judgement (
id,
category_id,
serial_number,
subject_name,
answer,
score,
analysis,
level,
creator,
create_date,
modifier,
modify_date,
del_flag,
application_code,
tenant_code
) values (
#{id},
#{categoryId},
#{serialNumber},
#{subjectName},
#{answer},
#{score},
#{analysis},
#{level},
#{creator},
#{createDate, jdbcType=TIMESTAMP, javaType=java.util.Date},
#{modifier},
#{modifyDate, jdbcType=TIMESTAMP, javaType=java.util.Date},
#{delFlag},
#{applicationCode},
#{tenantCode}
);
</insert>
<update id="update">
UPDATE exam_subject_judgement SET
<if test="categoryId != null">
category_id = #{categoryId},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber},
</if>
<if test="subjectName != null">
subject_name = #{subjectName},
</if>
<if test="answer != null">
answer = #{answer},
</if>
<if test="score != null">
score = #{score},
</if>
<if test="analysis != null">
analysis = #{analysis},
</if>
<if test="level != null">
level = #{level},
</if>
<if test="delFlag != null">
del_flag = #{delFlag},
</if>
modifier = #{modifier},
modify_date = #{modifyDate, jdbcType=TIMESTAMP, javaType=java.util.Date}
WHERE id = #{id}
</update>
<delete id="delete">
UPDATE exam_subject_judgement SET del_flag = 1 WHERE id = #{id}
</delete>
<delete id="deleteAll">
UPDATE exam_subject_judgement SET del_flag = 1 WHERE id in
<foreach item="item" index="index" collection="array" open="("
separator="," close=")">#{item}
</foreach>
</delete>
<!-- 物理删除 -->
<delete id="physicalDelete">
DELETE FROM exam_subject_judgement WHERE id = #{id}
</delete>
<!-- 物理删除 -->
<delete id="physicalDeleteAll">
DELETE FROM exam_subject_judgement WHERE id in
<foreach item="item" index="index" collection="array" open="("
separator="," close=")">#{item}
</foreach>
</delete>
</mapper>
......@@ -2,20 +2,17 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<modules>
<module>exam-service-api</module>
<module>exam-service</module>
</modules>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<artifactId>modules</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>service-api</artifactId>
<packaging>pom</packaging>
<artifactId>exam-service-parent</artifactId>
<name>${project.artifactId}</name>
<description>服务api</description>
<modules>
<module>user-api</module>
<module>exam-api</module>
<module>auth-api</module>
<module>msc-api</module>
</modules>
<description>考试服务</description>
</project>
......@@ -3,12 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api</artifactId>
<version>3.0.0</version>
<artifactId>msc-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>msc-api</artifactId>
<artifactId>msc-service-api</artifactId>
<name>${project.artifactId}</name>
<description>消息中心服务api</description>
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api-impl</artifactId>
<version>3.0.0</version>
<artifactId>msc-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>msc-service</artifactId>
<name>${project.artifactId}</name>
......@@ -52,7 +53,7 @@
<!-- msc-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>msc-api</artifactId>
<artifactId>msc-service-api</artifactId>
</dependency>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<modules>
<module>msc-service-api</module>
<module>msc-service</module>
</modules>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>modules</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>msc-service-parent</artifactId>
<name>${project.artifactId}</name>
<description>消息中心服务</description>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>modules</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<description>业务服务</description>
<modules>
<module>auth-service-parent</module>
<module>user-service-parent</module>
<module>exam-service-parent</module>
<module>msc-service-parent</module>
</modules>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<modules>
<module>user-service-api</module>
<module>user-service</module>
</modules>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>modules</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>user-service-parent</artifactId>
<name>${project.artifactId}</name>
<description>用户服务</description>
</project>
......@@ -2,12 +2,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api</artifactId>
<version>3.0.0</version>
<artifactId>user-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>user-api</artifactId>
<artifactId>user-service-api</artifactId>
<name>${project.artifactId}</name>
<description>用户服务api</description>
......
......@@ -25,7 +25,6 @@ public class UserDto implements Serializable {
/**
* id
*/
@ApiModelProperty(value = "id", hidden = true)
private String id;
/**
......
package com.github.tangyi.user.api.module;
import com.github.tangyi.common.core.persistence.BaseEntity;
import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;
/**
* 用户基本信息
*
* @author tangyi
* @date 2018-08-25 15:30
*/
@Data
public class User extends BaseEntity<User> {
/**
* 姓名
*/
private String name;
/**
* 电话
*/
@Pattern(regexp = "^\\d{11}$", message = "请输入11位手机号")
private String phone;
/**
* 头像id
*/
private String avatarId;
/**
* 邮箱
*/
@Email(message = "邮箱格式不正确")
private String email;
/**
* 性别
*/
private Integer sex;
/**
* 出生日期
*/
private Date born;
/**
* 描述
*/
private String userDesc;
/**
* 状态
*/
private Integer status;
/**
* 部门id
*/
private String deptId;
/**
* 角色列表
*/
private List<Role> roleList;
/**
* 角色
*/
private List<String> role;
/**
* 引导注册人
*/
private String parentUid;
/**
* 乡/镇
*/
private String streetId;
/**
* 县
*/
private String countyId;
/**
* 城市
*/
private String cityId;
/**
* 省份
*/
private String provinceId;
/**
* 最近登录时间
*/
private Date loginTime;
/**
* 用户归档时间
*/
private Date lockTime;
/**
* 微信
*/
private String wechat;
}
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>service-api-impl</artifactId>
<version>3.0.0</version>
<artifactId>user-service-parent</artifactId>
<version>3.1.0</version>
</parent>
<artifactId>user-service</artifactId>
<name>${project.artifactId}</name>
......@@ -24,22 +25,22 @@
<artifactId>common-log</artifactId>
</dependency>
<!-- user-api -->
<!-- user-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>user-api</artifactId>
<artifactId>user-service-api</artifactId>
</dependency>
<!-- exam-api -->
<!-- exam-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>exam-api</artifactId>
<artifactId>exam-service-api</artifactId>
</dependency>
<!-- msc-api -->
<!-- msc-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>msc-api</artifactId>
<artifactId>msc-service-api</artifactId>
</dependency>
<!-- web 服务 -->
......
......@@ -47,8 +47,8 @@ public class StudentService extends CrudService<StudentMapper, Student> {
userId = userVo.getId();
}
Student student = new Student();
student.setCommonValue(currentUser, SysUtil.getSysCode(), tenantCode);
BeanUtils.copyProperties(studentDto, student);
student.setCommonValue(currentUser, SysUtil.getSysCode(), tenantCode);
// 新增用户学生关系
UserStudent userStudent = new UserStudent();
userStudent.setCommonValue(currentUser, SysUtil.getSysCode(), tenantCode);
......
......@@ -2,10 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>monitor-service</artifactId>
<name>${project.artifactId}</name>
......
......@@ -6,7 +6,7 @@
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
<packaging>pom</packaging>
<name>spring-microservice-exam</name>
......@@ -25,8 +25,7 @@
<module>gateway-service</module>
<module>common</module>
<module>monitor-service</module>
<module>service-api</module>
<module>service-api-impl</module>
<module>modules</module>
<module>zipkin-service</module>
</modules>
......@@ -49,10 +48,8 @@
<spring-boot.version>2.1.3.RELEASE</spring-boot.version>
<spring-cloud.version>Greenwich.SR1</spring-cloud.version>
<security.auth.version>2.3.5.RELEASE</security.auth.version>
<spring-boot-devtools.version>2.0.4.RELEASE</spring-boot-devtools.version>
<spring-boot-admin.version>2.1.3</spring-boot-admin.version>
<spring-cloud-sleuth.version>2.1.0.RELEASE</spring-cloud-sleuth.version>
<!--<spring-boot-devtools.version>2.0.4.RELEASE</spring-boot-devtools.version>-->
<zipkin.version>2.11.3</zipkin.version>
<swagger.version>2.9.2</swagger.version>
<fastdfs-client.version>1.26.5</fastdfs-client.version>
......@@ -128,12 +125,6 @@
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<!-- spring boot hot dev,WTF:在spring boot 2.1.3中依赖的是2.1.3的devtools,但是会导致启动失败,试了只要是2.1.x都会失败,只有换到devtools2.0.x才好-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
......@@ -198,31 +189,31 @@
<version>${project.version}</version>
</dependency>
<!-- user-api -->
<!-- user-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>user-api</artifactId>
<artifactId>user-service-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- auth-api -->
<!-- auth-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>auth-api</artifactId>
<artifactId>auth-service-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- exam-api -->
<!-- exam-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>exam-api</artifactId>
<artifactId>exam-service-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- msc-api -->
<!-- msc-service-api -->
<dependency>
<groupId>com.github.tangyi</groupId>
<artifactId>msc-api</artifactId>
<artifactId>msc-service-api</artifactId>
<version>${project.version}</version>
</dependency>
......
package com.github.tangyi.user.api.module;
import com.github.tangyi.common.core.persistence.BaseEntity;
import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;
import java.util.Date;
import java.util.List;
/**
* 用户基本信息
*
* @author tangyi
* @date 2018-08-25 15:30
*/
@Data
public class User extends BaseEntity<User> {
/**
* 姓名
*/
private String name;
/**
* 电话
*/
@Pattern(regexp = "^\\d{11}$", message = "请输入11位手机号")
private String phone;
/**
* 头像id
*/
private String avatarId;
/**
* 邮箱
*/
@Email(message = "邮箱格式不正确")
private String email;
/**
* 性别
*/
private Integer sex;
/**
* 出生日期
*/
private Date born;
/**
* 描述
*/
private String userDesc;
/**
* 状态
*/
private Integer status;
/**
* 部门id
*/
private String deptId;
/**
* 角色列表
*/
private List<Role> roleList;
/**
* 角色
*/
private List<String> role;
/**
* 引导注册人
*/
private String parentUid;
/**
* 乡/镇
*/
private String streetId;
/**
* 县
*/
private String countyId;
/**
* 城市
*/
private String cityId;
/**
* 省份
*/
private String provinceId;
/**
* 最近登录时间
*/
private Date loginTime;
/**
* 用户归档时间
*/
private Date lockTime;
/**
* 微信
*/
private String wechat;
}
sonar.projectKey=spring-microservice-exam
sonar.projectName=spring-microservice-exam
sonar.projectVersion=3.0.0
sonar.projectVersion=3.1.0
sonar.sources=
sonar.binaries=bin
sonar.language=java
......
......@@ -5,7 +5,7 @@
<parent>
<groupId>com.github.tangyi</groupId>
<artifactId>spring-microservice-exam</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>
<artifactId>zipkin-service</artifactId>
<packaging>pom</packaging>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment