Compare commits
279 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13ddda300e | ||
|
|
ece6e571f3 | ||
|
|
9403199719 | ||
|
|
583beb6448 | ||
|
|
10d177d61d | ||
|
|
2853357b8f | ||
|
|
5ef8bb1d9a | ||
|
|
01899d7e14 | ||
|
|
9ebef8ec92 | ||
|
|
5217896e3d | ||
|
|
ec50d66c65 | ||
|
|
ddf742e4d9 | ||
|
|
2d1860f052 | ||
|
|
0c4fd32a77 | ||
|
|
038c6e4637 | ||
|
|
70ecf0aed8 | ||
|
|
7b549f3079 | ||
|
|
45ef20468b | ||
|
|
bb85feb549 | ||
|
|
81adf94725 | ||
|
|
24d82e4772 | ||
|
|
64a49ad0ee | ||
|
|
4ee3c69a4a | ||
|
|
af0c1b82b1 | ||
|
|
6fbf2cc6c0 | ||
|
|
861d5d849b | ||
|
|
b650bae481 | ||
|
|
ca12f4a83e | ||
|
|
b8bfbbe71d | ||
|
|
33372e5c1e | ||
|
|
03192bf0fd | ||
|
|
193ccc9712 | ||
|
|
85860fb80a | ||
|
|
1c2ee04d8c | ||
|
|
7c4ee0a1e8 | ||
|
|
13f2f54e2a | ||
|
|
ba63ef6d15 | ||
|
|
79fe372f80 | ||
|
|
5e0b942d3f | ||
|
|
80cba65fc3 | ||
|
|
fc066ade71 | ||
|
|
c29e36ca1f | ||
|
|
71359d813c | ||
|
|
4153660620 | ||
|
|
e484e2142a | ||
|
|
3b38399d32 | ||
|
|
10b01a2e23 | ||
|
|
01eafa8efc | ||
|
|
eddbccaf23 | ||
|
|
4290a53654 | ||
|
|
eb00e2b31e | ||
|
|
4830dad754 | ||
|
|
ecbe67e666 | ||
|
|
4916845156 | ||
|
|
826351981c | ||
|
|
e2382b3cec | ||
|
|
8b608641b0 | ||
|
|
fa1810ebd7 | ||
|
|
9d46e6eb2b | ||
|
|
761eb1853f | ||
|
|
61adcc0b32 | ||
|
|
cf0b0dc077 | ||
|
|
d856c7c821 | ||
|
|
85b275c143 | ||
|
|
a0eec79b25 | ||
|
|
0d038bd0fe | ||
|
|
7010aa5658 | ||
|
|
4b9ea7a1de | ||
|
|
568367d2e7 | ||
|
|
34f7f2bd62 | ||
|
|
9e337a6692 | ||
|
|
2170658930 | ||
|
|
da2451257f | ||
|
|
7ca9c45855 | ||
|
|
a1cac655ce | ||
|
|
e4af04df97 | ||
|
|
7ff9a9fe50 | ||
|
|
01f9ff0f80 | ||
|
|
576c47a90d | ||
|
|
a5ba2d2ad9 | ||
|
|
bb2f60d22b | ||
|
|
7e62b47795 | ||
|
|
9821987e2d | ||
|
|
c6f6ed0cd6 | ||
|
|
6252f2154c | ||
|
|
487e184a9c | ||
|
|
636963cfd1 | ||
|
|
ea53348511 | ||
|
|
3399a4ff11 | ||
|
|
9241c4cae5 | ||
|
|
4de5327e87 | ||
|
|
1a3ecaf9e0 | ||
|
|
9dd5329ef0 | ||
|
|
e3b5a4463f | ||
|
|
75ffa05d65 | ||
|
|
47488d6bf5 | ||
|
|
44ac257c3b | ||
|
|
2543014ae2 | ||
|
|
cd8f97aab3 | ||
|
|
ac7702ad20 | ||
|
|
a5a6b40b5e | ||
|
|
24e59e302a | ||
|
|
1220f02793 | ||
|
|
d635029b00 | ||
|
|
a4633b809c | ||
|
|
f9f2d5b956 | ||
|
|
0195b0259c | ||
|
|
09bd9583c2 | ||
|
|
7f96ccca8b | ||
|
|
cf41c0e75f | ||
|
|
4200a7c5de | ||
|
|
307523b3be | ||
|
|
e3fd87ce21 | ||
|
|
6ab33b7c64 | ||
|
|
25371bad43 | ||
|
|
8be8ca7cb4 | ||
|
|
20f6db1dc6 | ||
|
|
fa0eb26d9a | ||
|
|
299cdd1770 | ||
|
|
9326ca716b | ||
|
|
6d2ab99fa3 | ||
|
|
898159ab3a | ||
|
|
2ecbee9561 | ||
|
|
8ad34b997e | ||
|
|
004a3f5668 | ||
|
|
095ba9f694 | ||
|
|
8f227774ea | ||
|
|
b9efae5595 | ||
|
|
951f44a105 | ||
|
|
ce22c048de | ||
|
|
4b87315419 | ||
|
|
f78f7bf5f4 | ||
|
|
21ee444e3f | ||
|
|
57c275e242 | ||
|
|
e4b01330ae | ||
|
|
65d0169aa7 | ||
|
|
60882a1d47 | ||
|
|
78435af514 | ||
|
|
9b30d479fd | ||
|
|
5b1e48e301 | ||
|
|
27fe05a636 | ||
|
|
689da6d2ac | ||
|
|
d3e39b3d6c | ||
|
|
8d5c1a616f | ||
|
|
6b4fc9ed42 | ||
|
|
1f03b484d1 | ||
|
|
5b54371cfc | ||
|
|
aae5223ad2 | ||
|
|
233061fae4 | ||
|
|
121b0b4dac | ||
|
|
aad4a4ac13 | ||
|
|
fc3fc344a4 | ||
|
|
5195975a37 | ||
|
|
87824ad22f | ||
|
|
250974ca58 | ||
|
|
6b22ad9eee | ||
|
|
a4977f80b3 | ||
|
|
868ec844d1 | ||
|
|
cc72c55751 | ||
|
|
f0c861c796 | ||
|
|
0108fdb36b | ||
|
|
d9c8047cf8 | ||
|
|
7e7f313aed | ||
|
|
4ead559ae2 | ||
|
|
97fec2b58b | ||
|
|
da10e9d1a8 | ||
|
|
6577201387 | ||
|
|
4f4ee30cff | ||
|
|
513bf28f67 | ||
|
|
a28e6dcd25 | ||
|
|
fc58997116 | ||
|
|
eb470320fa | ||
|
|
4b4350b1b9 | ||
|
|
2cfa14bc51 | ||
|
|
4f4cb35490 | ||
|
|
6db2b55225 | ||
|
|
c0e918ab0e | ||
|
|
e9903beecc | ||
|
|
52c1832f99 | ||
|
|
f8723cc8ff | ||
|
|
6cdf1403e8 | ||
|
|
2a6c057ec1 | ||
|
|
335ab745ca | ||
|
|
cebd237b98 | ||
|
|
dcbdfdbbce | ||
|
|
714e59b605 | ||
|
|
d096dc656f | ||
|
|
1a17d36cce | ||
|
|
c739f2fbed | ||
|
|
9bb4a3dae7 | ||
|
|
96dac789eb | ||
|
|
6a0c620f6e | ||
|
|
947c15f404 | ||
|
|
071919defd | ||
|
|
cd575ebc3f | ||
|
|
beafc51393 | ||
|
|
6da3ef4c5b | ||
|
|
95f40b903f | ||
|
|
3e706b361a | ||
|
|
c8c47607f4 | ||
|
|
cbe91187e6 | ||
|
|
8e79a71b1f | ||
|
|
75eea70d6f | ||
|
|
9cb23a94a7 | ||
|
|
ed8ada2ecc | ||
|
|
6794b1135c | ||
|
|
05922d6484 | ||
|
|
09f6a81797 | ||
|
|
30cf0c06fc | ||
|
|
c68fc57e55 | ||
|
|
b6bcff27c0 | ||
|
|
01d27afdde | ||
|
|
072a27c5b3 | ||
|
|
c885a0e60b | ||
|
|
a29aaed59c | ||
|
|
dd9590ea84 | ||
|
|
efccda92ea | ||
|
|
3d25cba611 | ||
|
|
ffd4f03f04 | ||
|
|
b27f525152 | ||
|
|
d8c583b5a6 | ||
|
|
895f6c81c8 | ||
|
|
4661a5aa5c | ||
|
|
53512232be | ||
|
|
04a5cba4f1 | ||
|
|
16f476e84f | ||
|
|
7de7784428 | ||
|
|
05fb737bf4 | ||
|
|
d812d2a928 | ||
|
|
edeeeb06c1 | ||
|
|
89e408ce90 | ||
|
|
1d9d9d057d | ||
|
|
489faeda9a | ||
|
|
039a824302 | ||
|
|
fed4d3aa84 | ||
|
|
c1a915d8c5 | ||
|
|
475c822992 | ||
|
|
4d1d45f85f | ||
|
|
129b5bea16 | ||
|
|
9f32af9dfe | ||
|
|
799f12bbf1 | ||
|
|
b587430e3b | ||
|
|
e81dc80a57 | ||
|
|
945af9de76 | ||
|
|
c15c981254 | ||
|
|
879f0ab05e | ||
|
|
ec2b7d1a0a | ||
|
|
40ecab5a08 | ||
|
|
5f726d9dc6 | ||
|
|
945fe04b15 | ||
|
|
db79588ca5 | ||
|
|
c181e74ae5 | ||
|
|
50a41fb154 | ||
|
|
30a85560ab | ||
|
|
18b5b2ccf7 | ||
|
|
5b79ff5cd3 | ||
|
|
e714443e8d | ||
|
|
0cb5f1c107 | ||
|
|
36e885ffde | ||
|
|
e9ceca7f2d | ||
|
|
6fb0f49cb0 | ||
|
|
96dd9d77f9 | ||
|
|
ddf41b5307 | ||
|
|
9fb56f7b08 | ||
|
|
6cc0613668 | ||
|
|
6fab2ea2cd | ||
|
|
dd1a47344a | ||
|
|
5a99fe23d8 | ||
|
|
2a6b3bd909 | ||
|
|
e8272a723e | ||
|
|
2fc25ad943 | ||
|
|
25bf2959f0 | ||
|
|
f1dc6e77af | ||
|
|
e53c08839f | ||
|
|
adb674d5ed | ||
|
|
1bcd1e25d0 | ||
|
|
4ee37785c2 | ||
|
|
15ce5c73cd | ||
|
|
423ca88806 |
6
.gitattributes
vendored
@@ -1,2 +1,4 @@
|
|||||||
*.js linguist-language=java
|
*.js linguist-language=javascript
|
||||||
*.css linguist-language=java
|
*.css linguist-language=css
|
||||||
|
*.java linguist-language=java
|
||||||
|
*.vue linguist-language=vue
|
||||||
4
.gitignore
vendored
@@ -11,7 +11,7 @@ target/
|
|||||||
.project
|
.project
|
||||||
.classpath
|
.classpath
|
||||||
|
|
||||||
# idea ignore
|
# idea ignore
|
||||||
.idea/
|
.idea/
|
||||||
*.ipr
|
*.ipr
|
||||||
*.iml
|
*.iml
|
||||||
@@ -26,7 +26,7 @@ logs/
|
|||||||
*.patch
|
*.patch
|
||||||
*.tmp
|
*.tmp
|
||||||
|
|
||||||
# system ignore
|
# system ignore
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
@@ -1,5 +1,5 @@
|
|||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
Version 3, 19 November 2007
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
|||||||
47
README.md
@@ -1,4 +1,23 @@
|
|||||||
# 学之思在线考试系统
|
<p></p>
|
||||||
|
<p></p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.mindskip.net" target="_blank">
|
||||||
|
<img src="doc/image/logo/1.png" height="80"/>
|
||||||
|
<a/>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
|
||||||
|
[](https://gitee.com/mindskip/xzs-mysql)
|
||||||
|
[](https://gitee.com/mindskip/xzs-mysql)
|
||||||
|
[](https://github.com/mindskip/xzs-mysql)
|
||||||
|
[](https://github.com/mindskip/xzs-mysql)
|
||||||
|
[](https://gitee.com/mindskip/xzs-mysql/blob/master/LICENSE)
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
# 学之思在线考试系统 - Mysql版
|
||||||
|
|
||||||
## 项目介绍
|
## 项目介绍
|
||||||
|
|
||||||
@@ -12,11 +31,11 @@
|
|||||||
|
|
||||||
### 演示地址
|
### 演示地址
|
||||||
|
|
||||||
* 官网:[http://www.mindskip.net](http://www.mindskip.net)
|
* 官网:[https://www.mindskip.net](https://www.mindskip.net)
|
||||||
* 学之思考试系统:[http://www.mindskip.net/xzs.html](http://www.mindskip.net/xzs.html)
|
* 学之思考试系统:[https://www.mindskip.net/xzs.html](https://www.mindskip.net/xzs.html)
|
||||||
* 学多多考试系统:[http://www.mindskip.net/xdd.html](http://www.mindskip.net/xdd.html)
|
* 思多多智能考试平台:[https://www.mindskip.net/sdd.html](https://www.mindskip.net/sdd.html)
|
||||||
* 思多多智能考试平台:[http://www.mindskip.net/sdd.html](http://www.mindskip.net/sdd.html)
|
* 维多多培训考试系统:[https://www.mindskip.net/wdd.html](https://www.mindskip.net/wdd.html)
|
||||||
* 维多多培训考试系统:[http://www.mindskip.net/wdd.html](http://www.mindskip.net/wdd.html)
|
* 学多多考试系统:[https://www.mindskip.net/xdd.html](https://www.mindskip.net/xdd.html)
|
||||||
|
|
||||||
### 学之思仓库版本地址
|
### 学之思仓库版本地址
|
||||||
|
|
||||||
@@ -27,13 +46,13 @@
|
|||||||
|
|
||||||
### 学之思交流群(加群获取数据库脚本)
|
### 学之思交流群(加群获取数据库脚本)
|
||||||
|
|
||||||
* 交流五群:`1074095891`
|
* QQ交流群八:`902855996`
|
||||||
* QQ:`2693073475`
|
* QQ:`2693073475`
|
||||||
* 微信:`alvis-u`
|
* 微信:`alvis-u`
|
||||||
|
|
||||||
### 开发部署教程
|
### 开发部署教程
|
||||||
|
|
||||||
* [http://mindskip.gitee.io/uexam/](http://mindskip.gitee.io/uexam/)
|
* [https://www.mindskip.net:999](https://www.mindskip.net:999)
|
||||||
|
|
||||||
### 学生系统功能
|
### 学生系统功能
|
||||||
|
|
||||||
@@ -50,7 +69,7 @@
|
|||||||
|
|
||||||
* 登录: 账号为: admin/123456
|
* 登录: 账号为: admin/123456
|
||||||
* 主页: 包含了试卷、题目、做卷数、做题数、用户活跃度的统计功能,活跃度和做题数是按月统计
|
* 主页: 包含了试卷、题目、做卷数、做题数、用户活跃度的统计功能,活跃度和做题数是按月统计
|
||||||
* 用户管理: 对不同角色 学生、教师、管理员 的增删改查管理功能
|
* 用户管理: 对不同角色 学生、管理员 的增删改查管理功能
|
||||||
* 卷题管理:
|
* 卷题管理:
|
||||||
1. 试卷列表:试卷的增删改查,新增包含选择学科、试卷类型、试卷名称、考试时间,试卷内容包含添加大标题,然后添加题目到此试卷中,组成一套完整的试卷
|
1. 试卷列表:试卷的增删改查,新增包含选择学科、试卷类型、试卷名称、考试时间,试卷内容包含添加大标题,然后添加题目到此试卷中,组成一套完整的试卷
|
||||||
2. 题目列表:题目的增删改查,目前题型包含单选题、多选题、判断题、填空题、简单题,支持图片、公式等。
|
2. 题目列表:题目的增删改查,目前题型包含单选题、多选题、判断题、填空题、简单题,支持图片、公式等。
|
||||||
@@ -63,13 +82,9 @@
|
|||||||
|
|
||||||
* 用户登录登出功能,登录会自动绑定微信账号,登出会解绑
|
* 用户登录登出功能,登录会自动绑定微信账号,登出会解绑
|
||||||
* 首页包含任务中心、固定试卷、时段试卷,和web端保持一致
|
* 首页包含任务中心、固定试卷、时段试卷,和web端保持一致
|
||||||
* 试卷模块,固定试卷和时段试卷的分页查询,下拉加载更多,上拉刷新当前数据
|
* 试卷模块:固定试卷和时段试卷的分页查询,下拉加载更多、上拉刷新当前数据
|
||||||
* 记录模块,考试结果的分页,包含了试卷基本信息
|
* 记录模块:考试结果的分页,包含了试卷基本信息
|
||||||
* 我的模块,包含个人资料的修改,个人动态,消息中心模块
|
* 我的模块:包含个人资料的修改、个人动态、消息中心模块
|
||||||
|
|
||||||
### 软件架构图
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 系统展示
|
### 系统展示
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 551 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 105 KiB |
BIN
doc/image/logo/1.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
docs/1.png
Normal file
|
After Width: | Height: | Size: 103 KiB |
251
docs/README.md
@@ -10,26 +10,10 @@
|
|||||||
|
|
||||||
禁止将本项目的代码和资源进行任何形式的出售,产生的一切任何后果责任由侵权者自负
|
禁止将本项目的代码和资源进行任何形式的出售,产生的一切任何后果责任由侵权者自负
|
||||||
|
|
||||||
## 演示地址
|
## 学之思仓库地址
|
||||||
|
|
||||||
官网:<http://www.mindskip.net>
|
|
||||||
|
|
||||||
学之思考试系统:<http://www.mindskip.net/xzs.html>
|
|
||||||
|
|
||||||
学多多考试系统:<http://www.mindskip.net/xdd.html>
|
|
||||||
|
|
||||||
思多多智能考试平台:<http://www.mindskip.net/sdd.html>
|
|
||||||
|
|
||||||
维多多培训考试系统:<http://www.mindskip.net/wdd.html>
|
|
||||||
|
|
||||||
## 学之思仓库版本地址
|
|
||||||
|
|
||||||
gitee - postgresql :[https://gitee.com/mindskip/uexam](https://gitee.com/mindskip/uexam)
|
|
||||||
|
|
||||||
gitee - mysql :[https://gitee.com/mindskip/xzs-mysql](https://gitee.com/mindskip/xzs-mysql)
|
gitee - mysql :[https://gitee.com/mindskip/xzs-mysql](https://gitee.com/mindskip/xzs-mysql)
|
||||||
|
|
||||||
github - postgresql :[https://github.com/mindskip/xzs](https://github.com/mindskip/xzs)
|
|
||||||
|
|
||||||
github - mysql :[https://github.com/mindskip/xzs-mysql](https://github.com/mindskip/xzs-mysql)
|
github - mysql :[https://github.com/mindskip/xzs-mysql](https://github.com/mindskip/xzs-mysql)
|
||||||
|
|
||||||
## 运行环境
|
## 运行环境
|
||||||
@@ -37,9 +21,9 @@ github - mysql :[https://github.com/mindskip/xzs-mysql](https://github.com/min
|
|||||||
| 环境 | 版本 |
|
| 环境 | 版本 |
|
||||||
| ---- | ---- |
|
| ---- | ---- |
|
||||||
| 操作系统 | Windows / Linux |
|
| 操作系统 | Windows / Linux |
|
||||||
| Jdk | 8 |
|
| Jdk | 1.8 |
|
||||||
| Redis | 6.0 |
|
| Redis | 6.0 |
|
||||||
| PostgreSql / Mysql | 12.0 / 8.0 |
|
| Mysql | 8.0 |
|
||||||
|
|
||||||
## 技术栈列表
|
## 技术栈列表
|
||||||
|
|
||||||
@@ -48,40 +32,241 @@ github - mysql :[https://github.com/mindskip/xzs-mysql](https://github.com/min
|
|||||||
* spring-boot 2.1.6.RELEASE
|
* spring-boot 2.1.6.RELEASE
|
||||||
* spring-boot-security 用户登录验证
|
* spring-boot-security 用户登录验证
|
||||||
* undertow web容器
|
* undertow web容器
|
||||||
* postgresql/mysql 优秀的开源数据库
|
* mysql 最流行的开源数据库
|
||||||
* redis 缓存,提升系统性能
|
* redis 缓存,提升系统性能
|
||||||
* mybatis 数据库中间件
|
* mybatis 数据库中间件
|
||||||
* hikari 速度最快的数据库连接池
|
* hikari 速度最快的数据库连接池
|
||||||
* 七牛云存储 目前10G内免费
|
* 七牛云存储 分布式文件存储中心
|
||||||
|
|
||||||
### 前台系统
|
### 前台系统
|
||||||
|
|
||||||
* Vue.js 采用新版,使用了vue-cli3搭建的系统,减少大量配置文件
|
* vue 采用新版,使用了vue-cli4搭建的系统,减少大量配置文件
|
||||||
* element-ui 最流行的vue组件,采用的最新版
|
* element-ui 最流行的vue UI框架
|
||||||
* vue-element-admin 最新版,对该系统做了大量精简,只保留了部分样式和控件
|
* vue-element-admin 深度定制版
|
||||||
* echarts 图表统计
|
* echarts 图表统计
|
||||||
* ueditor 填空题扩展插件
|
* ueditor 深度定制版
|
||||||
|
|
||||||
### 微信小程序
|
### 微信小程序
|
||||||
|
|
||||||
* iView 主题样式
|
* iView 主题样式
|
||||||
|
|
||||||
|
## 架构图
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 数据库设计
|
||||||
|
|
||||||
|
### 试卷表 t_exam_paper
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| name | varchar | 试卷名称 |
|
||||||
|
| subject_id | int | 学科 |
|
||||||
|
| paper_type | int | 试卷类型( 1固定试卷 4.时段试卷 6.任务试卷) |
|
||||||
|
| grade_level | int | 年级 |
|
||||||
|
| score | int | 试卷总分(千分制) |
|
||||||
|
| question_count | int | 题目数量 |
|
||||||
|
| suggest_time | int | 建议时长(分钟) |
|
||||||
|
| limit_start_time | datetime | 时段试卷 开始时间 |
|
||||||
|
| limit_end_time | datetime | 时段试卷 结束时间 |
|
||||||
|
| frame_text_content_id | int | 试卷框架 内容为JSON |
|
||||||
|
| create_user | int | |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| deleted | bit | |
|
||||||
|
| task_exam_id | int | |
|
||||||
|
|
||||||
|
### 试卷答案表 t_exam_paper_answer
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| exam_paper_id | int | |
|
||||||
|
| paper_name | varchar | 试卷名称 |
|
||||||
|
| paper_type | int | 试卷类型( 1固定试卷 2临时试卷 3班级试卷 4.时段试卷 ) |
|
||||||
|
| subject_id | int | 学科 |
|
||||||
|
| system_score | int | 系统判定得分 |
|
||||||
|
| user_score | int | 最终得分(千分制) |
|
||||||
|
| paper_score | int | 试卷总分 |
|
||||||
|
| question_correct | int | 做对题目数量 |
|
||||||
|
| question_count | int | 题目总数量 |
|
||||||
|
| do_time | int | 做题时间(秒) |
|
||||||
|
| status | int | 试卷状态(1待判分 2完成) |
|
||||||
|
| create_user | int | 学生 |
|
||||||
|
| create_time | datetime | 提交时间 |
|
||||||
|
| task_exam_id | int | |
|
||||||
|
|
||||||
|
### 试卷题目答案表 t_exam_paper_question_customer_answer
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| question_id | int | 题目Id |
|
||||||
|
| exam_paper_id | int | 答案Id |
|
||||||
|
| exam_paper_answer_id | int | |
|
||||||
|
| question_type | int | 题型 |
|
||||||
|
| subject_id | int | 学科 |
|
||||||
|
| customer_score | int | 得分 |
|
||||||
|
| question_score | int | 题目原始分数 |
|
||||||
|
| question_text_content_id | int | 问题内容 |
|
||||||
|
| answer | varchar | 做题答案 |
|
||||||
|
| text_content_id | int | 做题内容 |
|
||||||
|
| do_right | bit | 是否正确 |
|
||||||
|
| create_user | int | 做题人 |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| item_order | int | |
|
||||||
|
|
||||||
|
### 消息表 t_message
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| title | varchar | 标题 |
|
||||||
|
| content | varchar | 内容 |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| send_user_id | int | 发送者用户ID |
|
||||||
|
| send_user_name | varchar | 发送者用户名 |
|
||||||
|
| send_real_name | varchar | 发送者真实姓名 |
|
||||||
|
| receive_user_count | int | 接收人数 |
|
||||||
|
| read_count | int | 已读人数 |
|
||||||
|
|
||||||
|
### 用户消息表 t_message_user
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| message_id | int | 消息内容ID |
|
||||||
|
| receive_user_id | int | 接收人ID |
|
||||||
|
| receive_user_name | varchar | 接收人用户名 |
|
||||||
|
| receive_real_name | varchar | 接收人真实姓名 |
|
||||||
|
| readed | bit | 是否已读 |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| read_time | datetime | 阅读时间 |
|
||||||
|
|
||||||
|
### 题目表 t_question
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| question_type | int | 1.单选题 2.多选题 3.判断题 4.填空题 5.简答题 |
|
||||||
|
| subject_id | int | 学科 |
|
||||||
|
| score | int | 题目总分(千分制) |
|
||||||
|
| grade_level | int | 级别 |
|
||||||
|
| difficult | int | 题目难度 |
|
||||||
|
| correct | text | 正确答案 |
|
||||||
|
| info_text_content_id | int | 题目 填空、 题干、解析、答案等信息 |
|
||||||
|
| create_user | int | 创建人 |
|
||||||
|
| status | int | 1.正常 |
|
||||||
|
| create_time | datetime | 创建时间 |
|
||||||
|
| deleted | bit | |
|
||||||
|
|
||||||
|
### 学科表 t_subject
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| name | varchar | 语文 数学 英语 等 |
|
||||||
|
| level | int | 年级 (1-12) 小学 初中 高中 大学 |
|
||||||
|
| level_name | varchar | 一年级、二年级等 |
|
||||||
|
| item_order | int | 排序 |
|
||||||
|
| deleted | bit | |
|
||||||
|
|
||||||
|
### 任务表 t_task_exam
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| title | varchar | |
|
||||||
|
| grade_level | int | 级别 |
|
||||||
|
| frame_text_content_id | int | 任务框架 内容为JSON |
|
||||||
|
| create_user | int | |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| deleted | bit | |
|
||||||
|
| create_user_name | varchar | |
|
||||||
|
|
||||||
|
### 用户任务表 t_task_exam_customer_answer
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| task_exam_id | int | |
|
||||||
|
| create_user | int | |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| text_content_id | int | 任务完成情况(Json) |
|
||||||
|
|
||||||
|
### 文本表 t_text_content
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| content | text | |
|
||||||
|
| create_time | datetime | |
|
||||||
|
|
||||||
|
### 用户表 t_user
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| user_uuid | varchar | |
|
||||||
|
| user_name | varchar | 用户名 |
|
||||||
|
| password | varchar | |
|
||||||
|
| real_name | varchar | 真实姓名 |
|
||||||
|
| age | int | |
|
||||||
|
| sex | int | 1.男 2女 |
|
||||||
|
| birth_day | datetime | |
|
||||||
|
| user_level | int | 学生年级(1-12) |
|
||||||
|
| phone | varchar | |
|
||||||
|
| role | int | 1.学生 2.老师 3.管理员 |
|
||||||
|
| status | int | 1.启用 2禁用 |
|
||||||
|
| image_path | varchar | 头像地址 |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| modify_time | datetime | |
|
||||||
|
| last_active_time | datetime | |
|
||||||
|
| deleted | bit | 是否删除 |
|
||||||
|
| wx_open_id | varchar | 微信openId |
|
||||||
|
|
||||||
|
### 用户日志表 t_user_event_log
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| user_id | int | 用户id |
|
||||||
|
| user_name | varchar | 用户名 |
|
||||||
|
| real_name | varchar | 真实姓名 |
|
||||||
|
| content | text | 内容 |
|
||||||
|
| create_time | datetime | 时间 |
|
||||||
|
|
||||||
|
### 用户Token表 t_user_token
|
||||||
|
|
||||||
|
| 字段名 | 类型 | 注释 |
|
||||||
|
| ---- | ---- | ---- |
|
||||||
|
| id | int | |
|
||||||
|
| token | varchar | |
|
||||||
|
| user_id | int | 用户Id |
|
||||||
|
| wx_open_id | varchar | 微信openId |
|
||||||
|
| create_time | datetime | |
|
||||||
|
| end_time | datetime | |
|
||||||
|
| user_name | varchar | 用户名 |
|
||||||
|
|
||||||
## 项目开发
|
## 项目开发
|
||||||
|
|
||||||
### 开发说明
|
### 开发说明
|
||||||
|
|
||||||
* redis 安装
|
* redis 安装
|
||||||
* 进群获取到数据库脚本,创建表初始化数据,数据库名称为xzs
|
* 进群获取到数据库脚本,创建表初始化数据,数据库名称为xzs
|
||||||
* 代码分为 mysql / postgresql 2个版本,配合响应的数据库使用
|
* 代码分为 mysql版本,配合相应的数据库使用
|
||||||
* 安装mysql / postgresql ,数据库二选一即可 ,导入sql脚本。mysql导入xzs-mysql.sql脚本。postgresql导入xzx-postgresql.sql脚本。
|
* 安装mysql ,导入xzs-mysql.sql脚本。
|
||||||
|
* 学生端默认账号:student / 123456
|
||||||
|
* 管理端默认账号:admin / 123456
|
||||||
|
|
||||||
### 后端开发
|
### 后端开发
|
||||||
|
|
||||||
* /uexam/source/xzs为后台代码,建议使用IntelliJ IDEA打开
|
* /uexam/source/xzs为后台代码,建议使用IntelliJ IDEA打开
|
||||||
* 打开application-dev.yml文件中,配置好postgesql/mysql、redis的服务地址
|
* 打开application-dev.yml文件中,配置好postgesql/mysql、redis的服务地址
|
||||||
|
* 去七牛云官网申请好云存储账号,修改application.yml中的qn相关的配置
|
||||||
* 启动后台程序,默认端口为8000。
|
* 启动后台程序,默认端口为8000。
|
||||||
* 学生系统地址:<http://localhost:8000/student>
|
* 学生系统地址:<http://ip:8000/student>
|
||||||
* 管理端地址:<http://localhost:8000/admin>
|
* 管理端地址:<http://ip:8000/admin>
|
||||||
|
|
||||||
### 前端开发
|
### 前端开发
|
||||||
|
|
||||||
@@ -131,7 +316,7 @@ npm run build
|
|||||||
* 执行下列命令,运行程序
|
* 执行下列命令,运行程序
|
||||||
|
|
||||||
```java
|
```java
|
||||||
nohup java -Duser.timezone=Asia/Shanghai -jar -Dspring.profiles.active=prod xzs-3.0.7.jar > start1.log 2>&1 &
|
nohup java -Duser.timezone=Asia/Shanghai -jar -Dspring.profiles.active=prod xzs-3.2.0.jar > start1.log 2>&1 &
|
||||||
```
|
```
|
||||||
|
|
||||||
### 前后端分离部署
|
### 前后端分离部署
|
||||||
@@ -152,7 +337,7 @@ server {
|
|||||||
index index.html;
|
index index.html;
|
||||||
}
|
}
|
||||||
location /api/ {
|
location /api/ {
|
||||||
proxy_pass https://localhost:8000;
|
proxy_pass http://localhost:8000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -166,6 +351,6 @@ server {
|
|||||||
* 管理员端访问地址为:<http://ip:8001/admin>
|
* 管理员端访问地址为:<http://ip:8001/admin>
|
||||||
|
|
||||||
```docker
|
```docker
|
||||||
docker pull registry.cn-hangzhou.aliyuncs.com/mindskip/xzs:v3.0.6
|
docker pull registry.cn-hangzhou.aliyuncs.com/mindskip/xzs:v3.2.0
|
||||||
docker run -d --name xzs --privileged -it -d -p 8001:8001 registry.cn-hangzhou.aliyuncs.com/mindskip/xzs:v3.0.6 /usr/sbin/init
|
docker run -d --name xzs --privileged -it -d -p 8001:8001 -v /etc/localtime:/etc/localtime:ro registry.cn-hangzhou.aliyuncs.com/mindskip/xzs:v3.2.0 /usr/sbin/init
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# 学之思考试系统
|
# 学之思考试系统
|
||||||
|
|
||||||
> 学之思在线考试系统,支持多种题型:选择题、多选题、判断题、填空题、解答题以及数学公式,包含PC端、小程序端,扩展性强,部署方便、界面设计友好、代码结构清晰。
|
> 学之思在线考试系统是一款 java + vue 的前后端分离的考试系统。主要优点是开发、部署简单快捷、界面设计友好、代码结构清晰。支持web端和微信小程序,能覆盖到pc机和手机等设备。 支持多种部署方式:集成部署、前后端分离部署、docker部署。
|
||||||
|
|
||||||
[Gitee](https://gitee.com/mindskip/uexam)
|
[Gitee](https://gitee.com/mindskip/uexam)
|
||||||
[Get Started](#quick-start)
|
[Get Started](#目录)
|
||||||
|
|||||||
1
docs/docsify@4.js
Normal file
BIN
docs/favicon.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
@@ -1,23 +1,42 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>学之思考试系统</title>
|
<title>学之思开发部署教程</title>
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
<meta name="description" content="Description">
|
<meta name="description" content="Description">
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
<link rel="stylesheet" href="vue.css">
|
||||||
<link rel="stylesheet" href="xzs.css">
|
<link rel="stylesheet" href="xzs.css">
|
||||||
|
<link rel="shortcut icon" href="favicon.png">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
<body style="min-width: 1024px;">
|
||||||
<script>
|
<nav class="head">
|
||||||
window.$docsify = {
|
<div class="head-logo">
|
||||||
name: '学之思考试系统',
|
<a href="https://www.mindskip.net" target="_blank">
|
||||||
repo: 'http://www.mindskip.net/xzs.html',
|
<img src="logo.png" />
|
||||||
coverpage: false
|
</a>
|
||||||
}
|
</div>
|
||||||
</script>
|
<div class="head-link">
|
||||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
<a href="https://www.mindskip.net/" target="_blank">官网</a>
|
||||||
|
<a href="https://www.mindskip.net/sdd.html" target="_blank">思多多</a>
|
||||||
|
<a href="https://www.mindskip.net/wdd.html" target="_blank">维多多</a>
|
||||||
|
<a href="https://www.mindskip.net/xdd.html" target="_blank">学多多</a>
|
||||||
|
<a href="https://www.mindskip.net/xzs.html" target="_blank">学之思</a>
|
||||||
|
<a href="https://www.mindskip.net/buy.html" target="_blank">商业购买</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script>
|
||||||
|
window.$docsify = {
|
||||||
|
name: '学之思开发部署教程',
|
||||||
|
coverpage: false
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!-- Docsify v4 -->
|
||||||
|
<script src="docsify@4.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
BIN
docs/logo.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
1005
docs/vue.css
Normal file
36
docs/xzs.css
@@ -1,7 +1,39 @@
|
|||||||
table th {
|
table th {
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table td {
|
table td {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0px !important;
|
||||||
|
line-height: 58px;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-logo {
|
||||||
|
height: 58px;
|
||||||
|
width: 182px;
|
||||||
|
line-height: 78px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-link {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head-link a {
|
||||||
|
margin-left: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding-top: 80px !important;
|
||||||
}
|
}
|
||||||
2214
source/vue/xzs-admin/package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xzs-admin",
|
"name": "xzs-admin",
|
||||||
"version": "3.0.7",
|
"version": "3.2.0",
|
||||||
"author": "武汉思维跳跃科技有限公司",
|
"author": "武汉思维跳跃科技有限公司",
|
||||||
"description": "学之思管理系统",
|
"description": "学之思管理系统",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
@@ -16,22 +16,22 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"core-js": "^3.7.0",
|
"core-js": "^3.8.3",
|
||||||
"element-ui": "^2.14.1",
|
"element-ui": "^2.15.0",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-count-to": "^1.0.13",
|
"vue-count-to": "^1.0.13",
|
||||||
"vue-router": "^3.4.9",
|
"vue-router": "^3.4.9",
|
||||||
"vuex": "^3.5.1"
|
"vuex": "^3.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.5.8",
|
"@vue/cli-plugin-babel": "^4.5.10",
|
||||||
"@vue/cli-plugin-eslint": "^4.5.8",
|
"@vue/cli-plugin-eslint": "^4.5.10",
|
||||||
"@vue/cli-plugin-router": "^4.5.8",
|
"@vue/cli-plugin-router": "^4.5.10",
|
||||||
"@vue/cli-plugin-vuex": "^4.5.8",
|
"@vue/cli-plugin-vuex": "^4.5.10",
|
||||||
"@vue/cli-service": "^4.5.8",
|
"@vue/cli-service": "^4.5.10",
|
||||||
"@vue/eslint-config-standard": "^4.0.0",
|
"@vue/eslint-config-standard": "^4.0.0",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^5.16.0",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<app-main />
|
<app-main />
|
||||||
<div class="foot-copyright">
|
<div class="foot-copyright">
|
||||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
<span>Copyright © 2021 武汉思维跳跃科技有限公司 版权所有</span>
|
||||||
</div>
|
</div>
|
||||||
<back-to-top :visibility-height="100" :back-position="0" transition-name="fade" ref="backTop"/>
|
<back-to-top :visibility-height="100" :back-position="0" transition-name="fade" ref="backTop"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
/* theme color */
|
/* theme color */
|
||||||
$--color-primary: #1890ff;
|
$--color-primary: #13C2C2;
|
||||||
$--color-success: #13ce66;
|
$--color-success: #13ce66;
|
||||||
$--color-warning: #FFBA00;
|
$--color-warning: #FFBA00;
|
||||||
$--color-danger: #ff4949;
|
$--color-danger: #ff4949;
|
||||||
|
|||||||
@@ -66,6 +66,12 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
name: '',
|
||||||
|
level: 1,
|
||||||
|
levelName: ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -239,6 +239,16 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
level: null,
|
||||||
|
subjectId: null,
|
||||||
|
paperType: 1,
|
||||||
|
limitDateTime: [],
|
||||||
|
name: '',
|
||||||
|
suggestTime: null,
|
||||||
|
titleItems: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
...mapActions('exam', { initSubject: 'initSubject' }),
|
...mapActions('exam', { initSubject: 'initSubject' }),
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
|
|||||||
@@ -208,7 +208,22 @@ export default {
|
|||||||
this.questionShow.question = this.form
|
this.questionShow.question = this.form
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
questionType: 4,
|
||||||
|
gradeLevel: null,
|
||||||
|
subjectId: null,
|
||||||
|
title: '',
|
||||||
|
items: [
|
||||||
|
],
|
||||||
|
analyze: '',
|
||||||
|
correct: '',
|
||||||
|
score: '',
|
||||||
|
difficult: 0
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
...mapActions('exam', { initSubject: 'initSubject' }),
|
...mapActions('exam', { initSubject: 'initSubject' }),
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
|
|||||||
@@ -195,7 +195,27 @@ export default {
|
|||||||
this.questionShow.question = this.form
|
this.questionShow.question = this.form
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
questionType: 2,
|
||||||
|
gradeLevel: null,
|
||||||
|
subjectId: null,
|
||||||
|
title: '',
|
||||||
|
items: [
|
||||||
|
{ id: null, prefix: 'A', content: '' },
|
||||||
|
{ id: null, prefix: 'B', content: '' },
|
||||||
|
{ id: null, prefix: 'C', content: '' },
|
||||||
|
{ id: null, prefix: 'D', content: '' }
|
||||||
|
],
|
||||||
|
analyze: '',
|
||||||
|
correct: '',
|
||||||
|
correctArray: [],
|
||||||
|
score: '',
|
||||||
|
difficult: 0
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
...mapActions('exam', { initSubject: 'initSubject' }),
|
...mapActions('exam', { initSubject: 'initSubject' }),
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
|
|||||||
@@ -161,7 +161,21 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
questionType: 5,
|
||||||
|
gradeLevel: null,
|
||||||
|
subjectId: null,
|
||||||
|
title: '',
|
||||||
|
items: [],
|
||||||
|
analyze: '',
|
||||||
|
correct: '',
|
||||||
|
score: '',
|
||||||
|
difficult: 0
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
levelChange () {
|
levelChange () {
|
||||||
this.form.subjectId = null
|
this.form.subjectId = null
|
||||||
|
|||||||
@@ -185,7 +185,26 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
questionType: 1,
|
||||||
|
gradeLevel: null,
|
||||||
|
subjectId: null,
|
||||||
|
title: '',
|
||||||
|
items: [
|
||||||
|
{ prefix: 'A', content: '' },
|
||||||
|
{ prefix: 'B', content: '' },
|
||||||
|
{ prefix: 'C', content: '' },
|
||||||
|
{ prefix: 'D', content: '' }
|
||||||
|
],
|
||||||
|
analyze: '',
|
||||||
|
correct: '',
|
||||||
|
score: '',
|
||||||
|
difficult: 0
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
levelChange () {
|
levelChange () {
|
||||||
this.form.subjectId = null
|
this.form.subjectId = null
|
||||||
|
|||||||
@@ -173,6 +173,21 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
questionType: 3,
|
||||||
|
gradeLevel: null,
|
||||||
|
subjectId: null,
|
||||||
|
title: '',
|
||||||
|
items: [
|
||||||
|
{ id: null, prefix: 'A', content: '是' },
|
||||||
|
{ id: null, prefix: 'B', content: '否' }
|
||||||
|
],
|
||||||
|
analyze: '',
|
||||||
|
correct: '',
|
||||||
|
score: '',
|
||||||
|
difficult: 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
levelChange () {
|
levelChange () {
|
||||||
this.form.subjectId = null
|
this.form.subjectId = null
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<div class="account-foot-copyright">
|
<div class="account-foot-copyright">
|
||||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
<span>Copyright © 2021 武汉思维跳跃科技有限公司 版权所有</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -90,8 +90,11 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
this.options = []
|
this.form = {
|
||||||
this.form.receiveUserIds = []
|
title: '',
|
||||||
|
content: '',
|
||||||
|
receiveUserIds: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
gradeLevel: null,
|
||||||
|
title: '',
|
||||||
|
paperItems: []
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
subjectFormatter (row, column, cellValue, index) {
|
subjectFormatter (row, column, cellValue, index) {
|
||||||
return this.subjectEnumFormat(cellValue)
|
return this.subjectEnumFormat(cellValue)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出生日期:">
|
<el-form-item label="出生日期:">
|
||||||
<el-date-picker v-model="form.birthDay" type="date" placeholder="选择日期"/>
|
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机:">
|
<el-form-item label="手机:">
|
||||||
<el-input v-model="form.phone"></el-input>
|
<el-input v-model="form.phone"></el-input>
|
||||||
@@ -104,7 +104,21 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: '',
|
||||||
|
password: '',
|
||||||
|
realName: '',
|
||||||
|
role: 3,
|
||||||
|
status: 1,
|
||||||
|
age: '',
|
||||||
|
sex: '',
|
||||||
|
birthDay: null,
|
||||||
|
phone: null
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出生日期:">
|
<el-form-item label="出生日期:">
|
||||||
<el-date-picker v-model="form.birthDay" type="date" placeholder="选择日期" />
|
<el-date-picker v-model="form.birthDay" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机:">
|
<el-form-item label="手机:">
|
||||||
<el-input v-model="form.phone"></el-input>
|
<el-input v-model="form.phone"></el-input>
|
||||||
@@ -113,7 +113,22 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
|
let lastId = this.form.id
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: '',
|
||||||
|
password: '',
|
||||||
|
realName: '',
|
||||||
|
role: 1,
|
||||||
|
status: 1,
|
||||||
|
age: '',
|
||||||
|
sex: '',
|
||||||
|
birthDay: null,
|
||||||
|
phone: null,
|
||||||
|
userLevel: null
|
||||||
|
}
|
||||||
|
this.form.id = lastId
|
||||||
},
|
},
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出生日期:">
|
<el-form-item label="出生日期:">
|
||||||
<el-date-picker v-model="form.birthDay" type="date" placeholder="选择日期" />
|
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="选择日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机:">
|
<el-form-item label="手机:">
|
||||||
<el-input v-model="form.phone"></el-input>
|
<el-input v-model="form.phone"></el-input>
|
||||||
@@ -105,6 +105,18 @@ export default {
|
|||||||
},
|
},
|
||||||
resetForm () {
|
resetForm () {
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
userName: '',
|
||||||
|
password: '',
|
||||||
|
realName: '',
|
||||||
|
role: 2,
|
||||||
|
status: 1,
|
||||||
|
age: '',
|
||||||
|
sex: '',
|
||||||
|
birthDay: null,
|
||||||
|
phone: null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||||
},
|
},
|
||||||
|
|||||||
2222
source/vue/xzs-student/package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xzs-student",
|
"name": "xzs-student",
|
||||||
"version": "3.0.7",
|
"version": "3.2.0",
|
||||||
"author": "武汉思维跳跃科技有限公司",
|
"author": "武汉思维跳跃科技有限公司",
|
||||||
"description": "学之思考试系统",
|
"description": "学之思考试系统",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
@@ -16,21 +16,21 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
"core-js": "^3.7.0",
|
"core-js": "^3.8.3",
|
||||||
"element-ui": "^2.14.1",
|
"element-ui": "^2.15.0",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"normalize.css": "8.0.1",
|
"normalize.css": "8.0.1",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-router": "^3.4.9",
|
"vue-router": "^3.4.9",
|
||||||
"vuex": "^3.5.1"
|
"vuex": "^3.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "^4.5.8",
|
"@vue/cli-plugin-babel": "^4.5.10",
|
||||||
"@vue/cli-plugin-eslint": "^4.5.8",
|
"@vue/cli-plugin-eslint": "^4.5.10",
|
||||||
"@vue/cli-plugin-router": "^4.5.8",
|
"@vue/cli-plugin-router": "^4.5.10",
|
||||||
"@vue/cli-plugin-vuex": "^4.5.8",
|
"@vue/cli-plugin-vuex": "^4.5.10",
|
||||||
"@vue/cli-service": "^4.5.8",
|
"@vue/cli-service": "^4.5.10",
|
||||||
"@vue/eslint-config-standard": "^4.0.0",
|
"@vue/eslint-config-standard": "^4.0.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^5.16.0",
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-footer>
|
</el-footer>
|
||||||
<div class="foot-copyright">
|
<div class="foot-copyright">
|
||||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
<span>Copyright © 2021 武汉思维跳跃科技有限公司 版权所有</span>
|
||||||
</div>
|
</div>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ html {
|
|||||||
.footer-main {
|
.footer-main {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-right: 110px;
|
margin-right: 70px;
|
||||||
|
|
||||||
.footer-main-link {
|
.footer-main-link {
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-foot-copyright">
|
<div class="account-foot-copyright">
|
||||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
<span>Copyright © 2021 武汉思维跳跃科技有限公司 版权所有</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-foot-copyright">
|
<div class="account-foot-copyright">
|
||||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
<span>Copyright © 2021 武汉思维跳跃科技有限公司 版权所有</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="出生日期:">
|
<el-form-item label="出生日期:">
|
||||||
<el-date-picker v-model="form.birthDay" type="date" placeholder="选择日期"/>
|
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="手机:">
|
<el-form-item label="手机:">
|
||||||
<el-input v-model="form.phone"></el-input>
|
<el-input v-model="form.phone"></el-input>
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
<groupId>com.mindskip</groupId>
|
<groupId>com.mindskip</groupId>
|
||||||
<artifactId>xzs</artifactId>
|
<artifactId>xzs</artifactId>
|
||||||
<version>3.0.7</version>
|
<version>3.2.0</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>xzs</name>
|
<name>xzs</name>
|
||||||
<description>学之思考试系统 - 武汉思维跳跃科技有限公司</description>
|
<description>学之思考试系统 - 武汉思维跳跃科技有限公司</description>
|
||||||
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@@ -118,13 +118,6 @@
|
|||||||
<version>2.3.3</version>
|
<version>2.3.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
<version>1.18.8</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-lang3</artifactId>
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
|||||||
@@ -1,15 +1,29 @@
|
|||||||
package com.mindskip.xzs.base;
|
package com.mindskip.xzs.base;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BasePage {
|
public class BasePage {
|
||||||
|
|
||||||
private Integer pageIndex;
|
private Integer pageIndex;
|
||||||
|
|
||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
|
public Integer getPageIndex() {
|
||||||
|
return pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageIndex(Integer pageIndex) {
|
||||||
|
this.pageIndex = pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getPageSize() {
|
||||||
|
return pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPageSize(Integer pageSize) {
|
||||||
|
this.pageSize = pageSize;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.mindskip.xzs.configuration.property;
|
|||||||
public class CookieConfig {
|
public class CookieConfig {
|
||||||
|
|
||||||
public static String getName() {
|
public static String getName() {
|
||||||
return "exam";
|
return "xzs";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Integer getInterval() {
|
public static Integer getInterval() {
|
||||||
|
|||||||
@@ -1,9 +1,25 @@
|
|||||||
package com.mindskip.xzs.configuration.property;
|
package com.mindskip.xzs.configuration.property;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PasswordKeyConfig {
|
public class PasswordKeyConfig {
|
||||||
private String publicKey;
|
private String publicKey;
|
||||||
|
|
||||||
private String privateKey;
|
private String privateKey;
|
||||||
|
|
||||||
|
public String getPublicKey() {
|
||||||
|
return publicKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublicKey(String publicKey) {
|
||||||
|
this.publicKey = publicKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrivateKey() {
|
||||||
|
return privateKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrivateKey(String privateKey) {
|
||||||
|
this.privateKey = privateKey;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,46 @@
|
|||||||
package com.mindskip.xzs.configuration.property;
|
package com.mindskip.xzs.configuration.property;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QnConfig {
|
public class QnConfig {
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
private String bucket;
|
private String bucket;
|
||||||
private String accessKey;
|
private String accessKey;
|
||||||
private String secretKey;
|
private String secretKey;
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBucket() {
|
||||||
|
return bucket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBucket(String bucket) {
|
||||||
|
this.bucket = bucket;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccessKey() {
|
||||||
|
return accessKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccessKey(String accessKey) {
|
||||||
|
this.accessKey = accessKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSecretKey() {
|
||||||
|
return secretKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecretKey(String secretKey) {
|
||||||
|
this.secretKey = secretKey;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.mindskip.xzs.configuration.property;
|
package com.mindskip.xzs.configuration.property;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -10,10 +9,43 @@ import java.util.List;
|
|||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
@ConfigurationProperties(prefix = "system")
|
@ConfigurationProperties(prefix = "system")
|
||||||
@Data
|
|
||||||
public class SystemConfig {
|
public class SystemConfig {
|
||||||
|
|
||||||
private PasswordKeyConfig pwdKey;
|
private PasswordKeyConfig pwdKey;
|
||||||
private List<String> securityIgnoreUrls;
|
private List<String> securityIgnoreUrls;
|
||||||
private WxConfig wx;
|
private WxConfig wx;
|
||||||
private QnConfig qn;
|
private QnConfig qn;
|
||||||
|
|
||||||
|
public PasswordKeyConfig getPwdKey() {
|
||||||
|
return pwdKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPwdKey(PasswordKeyConfig pwdKey) {
|
||||||
|
this.pwdKey = pwdKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getSecurityIgnoreUrls() {
|
||||||
|
return securityIgnoreUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityIgnoreUrls(List<String> securityIgnoreUrls) {
|
||||||
|
this.securityIgnoreUrls = securityIgnoreUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public WxConfig getWx() {
|
||||||
|
return wx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWx(WxConfig wx) {
|
||||||
|
this.wx = wx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public QnConfig getQn() {
|
||||||
|
return qn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQn(QnConfig qn) {
|
||||||
|
this.qn = qn;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,47 @@
|
|||||||
package com.mindskip.xzs.configuration.property;
|
package com.mindskip.xzs.configuration.property;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class WxConfig {
|
public class WxConfig {
|
||||||
|
|
||||||
|
|
||||||
private String appid;
|
private String appid;
|
||||||
private String secret;
|
private String secret;
|
||||||
private Duration tokenToLive;
|
private Duration tokenToLive;
|
||||||
private List<String> securityIgnoreUrls;
|
private List<String> securityIgnoreUrls;
|
||||||
|
|
||||||
|
public String getAppid() {
|
||||||
|
return appid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppid(String appid) {
|
||||||
|
this.appid = appid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSecret() {
|
||||||
|
return secret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecret(String secret) {
|
||||||
|
this.secret = secret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Duration getTokenToLive() {
|
||||||
|
return tokenToLive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTokenToLive(Duration tokenToLive) {
|
||||||
|
this.tokenToLive = tokenToLive;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getSecurityIgnoreUrls() {
|
||||||
|
return securityIgnoreUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecurityIgnoreUrls(List<String> securityIgnoreUrls) {
|
||||||
|
this.securityIgnoreUrls = securityIgnoreUrls;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,26 +29,6 @@ import java.time.Duration;
|
|||||||
@EnableCaching
|
@EnableCaching
|
||||||
public class CacheConfig extends CachingConfigurerSupport {
|
public class CacheConfig extends CachingConfigurerSupport {
|
||||||
|
|
||||||
/* @Autowired
|
|
||||||
private CacheProperties cacheProperties;*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* redis序列化修改为ObjectMapper
|
|
||||||
*
|
|
||||||
* @return RedisCacheConfiguration
|
|
||||||
*/
|
|
||||||
/* @Bean
|
|
||||||
public RedisCacheConfiguration redisCacheConfiguration() {
|
|
||||||
Jackson2JsonRedisSerializer<Object> serializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
|
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
|
||||||
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
|
||||||
objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
|
|
||||||
serializer.setObjectMapper(objectMapper);
|
|
||||||
return RedisCacheConfiguration.defaultCacheConfig().entryTtl(cacheProperties.getRedis().getTimeToLive())
|
|
||||||
.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(serializer));
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spring boot redis默认序列化方式
|
* spring boot redis默认序列化方式
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package com.mindskip.xzs.configuration.spring.mvc;
|
|||||||
|
|
||||||
import com.mindskip.xzs.configuration.property.SystemConfig;
|
import com.mindskip.xzs.configuration.property.SystemConfig;
|
||||||
import com.mindskip.xzs.configuration.spring.wx.TokenHandlerInterceptor;
|
import com.mindskip.xzs.configuration.spring.wx.TokenHandlerInterceptor;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.servlet.config.annotation.*;
|
import org.springframework.web.servlet.config.annotation.*;
|
||||||
|
|
||||||
@@ -14,12 +14,17 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
|
||||||
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
|
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
|
||||||
|
|
||||||
private final TokenHandlerInterceptor tokenHandlerInterceptor;
|
private final TokenHandlerInterceptor tokenHandlerInterceptor;
|
||||||
private final SystemConfig systemConfig;
|
private final SystemConfig systemConfig;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public WebMvcConfiguration(TokenHandlerInterceptor tokenHandlerInterceptor, SystemConfig systemConfig) {
|
||||||
|
this.tokenHandlerInterceptor = tokenHandlerInterceptor;
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addViewControllers(ViewControllerRegistry registry) {
|
public void addViewControllers(ViewControllerRegistry registry) {
|
||||||
registry.addRedirectViewController("/", "/student/index.html");
|
registry.addRedirectViewController("/", "/student/index.html");
|
||||||
|
|||||||
@@ -1,14 +1,37 @@
|
|||||||
package com.mindskip.xzs.configuration.spring.security;
|
package com.mindskip.xzs.configuration.spring.security;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
|
||||||
public class AuthenticationBean {
|
public class AuthenticationBean {
|
||||||
private String userName;
|
private String userName;
|
||||||
private String password;
|
private String password;
|
||||||
private boolean remember;
|
private boolean remember;
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isRemember() {
|
||||||
|
return remember;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemember(boolean remember) {
|
||||||
|
this.remember = remember;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import com.mindskip.xzs.base.SystemCode;
|
|||||||
import com.mindskip.xzs.domain.UserEventLog;
|
import com.mindskip.xzs.domain.UserEventLog;
|
||||||
import com.mindskip.xzs.event.UserEvent;
|
import com.mindskip.xzs.event.UserEvent;
|
||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.core.userdetails.User;
|
import org.springframework.security.core.userdetails.User;
|
||||||
@@ -23,12 +23,17 @@ import java.util.Date;
|
|||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
|
||||||
public class RestAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
|
public class RestAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
|
||||||
|
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public RestAuthenticationSuccessHandler(ApplicationEventPublisher eventPublisher, UserService userService) {
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
|
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
|
||||||
User springUser = (User) authentication.getPrincipal();
|
User springUser = (User) authentication.getPrincipal();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import com.mindskip.xzs.domain.User;
|
|||||||
import com.mindskip.xzs.domain.UserEventLog;
|
import com.mindskip.xzs.domain.UserEventLog;
|
||||||
import com.mindskip.xzs.event.UserEvent;
|
import com.mindskip.xzs.event.UserEvent;
|
||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.security.core.Authentication;
|
import org.springframework.security.core.Authentication;
|
||||||
import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
|
import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
|
||||||
@@ -21,12 +21,17 @@ import java.util.Date;
|
|||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
|
||||||
public class RestLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
|
public class RestLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
|
||||||
|
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public RestLogoutSuccessHandler(ApplicationEventPublisher eventPublisher, UserService userService) {
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
|
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
|
||||||
org.springframework.security.core.userdetails.User springUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal();
|
org.springframework.security.core.userdetails.User springUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.mindskip.xzs.configuration.spring.security;
|
|||||||
import com.mindskip.xzs.configuration.property.CookieConfig;
|
import com.mindskip.xzs.configuration.property.CookieConfig;
|
||||||
import com.mindskip.xzs.configuration.property.SystemConfig;
|
import com.mindskip.xzs.configuration.property.SystemConfig;
|
||||||
import com.mindskip.xzs.domain.enums.RoleEnum;
|
import com.mindskip.xzs.domain.enums.RoleEnum;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
@@ -27,7 +27,6 @@ import java.util.List;
|
|||||||
public class SecurityConfigurer {
|
public class SecurityConfigurer {
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@AllArgsConstructor
|
|
||||||
public static class FormLoginWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
|
public static class FormLoginWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
|
||||||
|
|
||||||
private final SystemConfig systemConfig;
|
private final SystemConfig systemConfig;
|
||||||
@@ -39,6 +38,18 @@ public class SecurityConfigurer {
|
|||||||
private final RestLogoutSuccessHandler restLogoutSuccessHandler;
|
private final RestLogoutSuccessHandler restLogoutSuccessHandler;
|
||||||
private final RestAccessDeniedHandler restAccessDeniedHandler;
|
private final RestAccessDeniedHandler restAccessDeniedHandler;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public FormLoginWebSecurityConfigurerAdapter(SystemConfig systemConfig, LoginAuthenticationEntryPoint restAuthenticationEntryPoint, RestAuthenticationProvider restAuthenticationProvider, RestDetailsServiceImpl formDetailsService, RestAuthenticationSuccessHandler restAuthenticationSuccessHandler, RestAuthenticationFailureHandler restAuthenticationFailureHandler, RestLogoutSuccessHandler restLogoutSuccessHandler, RestAccessDeniedHandler restAccessDeniedHandler) {
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
this.restAuthenticationEntryPoint = restAuthenticationEntryPoint;
|
||||||
|
this.restAuthenticationProvider = restAuthenticationProvider;
|
||||||
|
this.formDetailsService = formDetailsService;
|
||||||
|
this.restAuthenticationSuccessHandler = restAuthenticationSuccessHandler;
|
||||||
|
this.restAuthenticationFailureHandler = restAuthenticationFailureHandler;
|
||||||
|
this.restLogoutSuccessHandler = restLogoutSuccessHandler;
|
||||||
|
this.restAccessDeniedHandler = restAccessDeniedHandler;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param http http
|
* @param http http
|
||||||
* @throws Exception exception
|
* @throws Exception exception
|
||||||
|
|||||||
@@ -2,18 +2,22 @@ package com.mindskip.xzs.context;
|
|||||||
|
|
||||||
import com.mindskip.xzs.domain.User;
|
import com.mindskip.xzs.domain.User;
|
||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
|
||||||
public class WebContext {
|
public class WebContext {
|
||||||
private static final String USER_ATTRIBUTES = "USER_ATTRIBUTES";
|
private static final String USER_ATTRIBUTES = "USER_ATTRIBUTES";
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public WebContext(UserService userService) {
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setCurrentUser(User user) {
|
public void setCurrentUser(User user) {
|
||||||
RequestContextHolder.currentRequestAttributes().setAttribute(USER_ATTRIBUTES, user, RequestAttributes.SCOPE_REQUEST);
|
RequestContextHolder.currentRequestAttributes().setAttribute(USER_ATTRIBUTES, user, RequestAttributes.SCOPE_REQUEST);
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import com.mindskip.xzs.base.RestResponse;
|
|||||||
import com.mindskip.xzs.service.*;
|
import com.mindskip.xzs.service.*;
|
||||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||||
import com.mindskip.xzs.viewmodel.admin.dashboard.IndexVM;
|
import com.mindskip.xzs.viewmodel.admin.dashboard.IndexVM;
|
||||||
import com.mindskip.xzs.service.*;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -15,16 +14,23 @@ import java.util.List;
|
|||||||
|
|
||||||
@RestController("AdminDashboardController")
|
@RestController("AdminDashboardController")
|
||||||
@RequestMapping(value = "/api/admin/dashboard")
|
@RequestMapping(value = "/api/admin/dashboard")
|
||||||
@AllArgsConstructor
|
|
||||||
public class DashboardController extends BaseApiController {
|
public class DashboardController extends BaseApiController {
|
||||||
|
|
||||||
|
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
private final QuestionService questionService;
|
private final QuestionService questionService;
|
||||||
private final ExamPaperAnswerService examPaperAnswerService;
|
private final ExamPaperAnswerService examPaperAnswerService;
|
||||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||||
private final UserEventLogService userEventLogService;
|
private final UserEventLogService userEventLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public DashboardController(ExamPaperService examPaperService, QuestionService questionService, ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, UserEventLogService userEventLogService) {
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
this.questionService = questionService;
|
||||||
|
this.examPaperAnswerService = examPaperAnswerService;
|
||||||
|
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
|
||||||
|
this.userEventLogService = userEventLogService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||||
public RestResponse<IndexVM> Index() {
|
public RestResponse<IndexVM> Index() {
|
||||||
IndexVM vm = new IndexVM();
|
IndexVM vm = new IndexVM();
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import com.mindskip.xzs.viewmodel.admin.education.SubjectEditRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.education.SubjectPageRequestVM;
|
import com.mindskip.xzs.viewmodel.admin.education.SubjectPageRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.education.SubjectResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.education.SubjectResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@@ -18,11 +18,15 @@ import java.util.List;
|
|||||||
|
|
||||||
@RestController("AdminEducationController")
|
@RestController("AdminEducationController")
|
||||||
@RequestMapping(value = "/api/admin/education")
|
@RequestMapping(value = "/api/admin/education")
|
||||||
@AllArgsConstructor
|
|
||||||
public class EducationController extends BaseApiController {
|
public class EducationController extends BaseApiController {
|
||||||
|
|
||||||
private final SubjectService subjectService;
|
private final SubjectService subjectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public EducationController(SubjectService subjectService) {
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
||||||
public RestResponse<List<Subject>> list() {
|
public RestResponse<List<Subject>> list() {
|
||||||
List<Subject> subjects = subjectService.allSubject();
|
List<Subject> subjects = subjectService.allSubject();
|
||||||
|
|||||||
@@ -10,18 +10,22 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@RestController("AdminExamPaperController")
|
@RestController("AdminExamPaperController")
|
||||||
@RequestMapping(value = "/api/admin/exam/paper")
|
@RequestMapping(value = "/api/admin/exam/paper")
|
||||||
@AllArgsConstructor
|
|
||||||
public class ExamPaperController extends BaseApiController {
|
public class ExamPaperController extends BaseApiController {
|
||||||
|
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ExamPaperController(ExamPaperService examPaperService) {
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
|
public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
|
||||||
PageInfo<ExamPaper> pageInfo = examPaperService.page(model);
|
PageInfo<ExamPaper> pageInfo = examPaperService.page(model);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.mindskip.xzs.viewmodel.admin.message.MessagePageRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.message.MessageResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.message.MessageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.message.MessageSendVM;
|
import com.mindskip.xzs.viewmodel.admin.message.MessageSendVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
@@ -27,12 +27,17 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@RestController("AdminMessageController")
|
@RestController("AdminMessageController")
|
||||||
@RequestMapping(value = "/api/admin/message")
|
@RequestMapping(value = "/api/admin/message")
|
||||||
@AllArgsConstructor
|
|
||||||
public class MessageController extends BaseApiController {
|
public class MessageController extends BaseApiController {
|
||||||
|
|
||||||
private final MessageService messageService;
|
private final MessageService messageService;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public MessageController(MessageService messageService, UserService userService) {
|
||||||
|
this.messageService = messageService;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<MessageResponseVM>> pageList(@RequestBody MessagePageRequestVM model) {
|
public RestResponse<PageInfo<MessageResponseVM>> pageList(@RequestBody MessagePageRequestVM model) {
|
||||||
PageInfo<Message> pageInfo = messageService.page(model);
|
PageInfo<Message> pageInfo = messageService.page(model);
|
||||||
|
|||||||
@@ -14,21 +14,25 @@ import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
|
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.question.QuestionResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.utility.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@RestController("AdminQuestionController")
|
@RestController("AdminQuestionController")
|
||||||
@RequestMapping(value = "/api/admin/question")
|
@RequestMapping(value = "/api/admin/question")
|
||||||
@AllArgsConstructor
|
|
||||||
public class QuestionController extends BaseApiController {
|
public class QuestionController extends BaseApiController {
|
||||||
|
|
||||||
private final QuestionService questionService;
|
private final QuestionService questionService;
|
||||||
private final TextContentService textContentService;
|
private final TextContentService textContentService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public QuestionController(QuestionService questionService, TextContentService textContentService) {
|
||||||
|
this.questionService = questionService;
|
||||||
|
this.textContentService = textContentService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<QuestionResponseVM>> pageList(@RequestBody QuestionPageRequestVM model) {
|
public RestResponse<PageInfo<QuestionResponseVM>> pageList(@RequestBody QuestionPageRequestVM model) {
|
||||||
PageInfo<Question> pageInfo = questionService.page(model);
|
PageInfo<Question> pageInfo = questionService.page(model);
|
||||||
|
|||||||
@@ -11,18 +11,22 @@ import com.mindskip.xzs.viewmodel.admin.task.TaskPageRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.task.TaskPageResponseVM;
|
import com.mindskip.xzs.viewmodel.admin.task.TaskPageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.task.TaskRequestVM;
|
import com.mindskip.xzs.viewmodel.admin.task.TaskRequestVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@RestController("AdminTaskController")
|
@RestController("AdminTaskController")
|
||||||
@RequestMapping(value = "/api/admin/task")
|
@RequestMapping(value = "/api/admin/task")
|
||||||
@AllArgsConstructor
|
|
||||||
public class TaskController extends BaseApiController {
|
public class TaskController extends BaseApiController {
|
||||||
|
|
||||||
private final TaskExamService taskExamService;
|
private final TaskExamService taskExamService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public TaskController(TaskExamService taskExamService) {
|
||||||
|
this.taskExamService = taskExamService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<TaskPageResponseVM>> pageList(@RequestBody TaskPageRequestVM model) {
|
public RestResponse<PageInfo<TaskPageResponseVM>> pageList(@RequestBody TaskPageRequestVM model) {
|
||||||
PageInfo<TaskExam> pageInfo = taskExamService.page(model);
|
PageInfo<TaskExam> pageInfo = taskExamService.page(model);
|
||||||
|
|||||||
@@ -8,10 +8,9 @@ import com.mindskip.xzs.service.FileUpload;
|
|||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import com.mindskip.xzs.viewmodel.admin.file.UeditorConfigVM;
|
import com.mindskip.xzs.viewmodel.admin.file.UeditorConfigVM;
|
||||||
import com.mindskip.xzs.viewmodel.admin.file.UploadResultVM;
|
import com.mindskip.xzs.viewmodel.admin.file.UploadResultVM;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
@@ -23,8 +22,6 @@ import java.io.InputStream;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@AllArgsConstructor
|
|
||||||
@RequestMapping("/api/admin/upload")
|
@RequestMapping("/api/admin/upload")
|
||||||
@RestController("AdminUploadController")
|
@RestController("AdminUploadController")
|
||||||
public class UploadController extends BaseApiController {
|
public class UploadController extends BaseApiController {
|
||||||
@@ -36,6 +33,13 @@ public class UploadController extends BaseApiController {
|
|||||||
private static final String IMAGE_UPLOAD_FILE = "upFile";
|
private static final String IMAGE_UPLOAD_FILE = "upFile";
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UploadController(FileUpload fileUpload, SystemConfig systemConfig, UserService userService) {
|
||||||
|
this.fileUpload = fileUpload;
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
@RequestMapping("/configAndUpload")
|
@RequestMapping("/configAndUpload")
|
||||||
public Object upload(HttpServletRequest request, HttpServletResponse response) {
|
public Object upload(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
|||||||
@@ -13,10 +13,9 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
|||||||
import com.mindskip.xzs.viewmodel.admin.user.*;
|
import com.mindskip.xzs.viewmodel.admin.user.*;
|
||||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.viewmodel.admin.user.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
@@ -30,13 +29,19 @@ import java.util.UUID;
|
|||||||
*/
|
*/
|
||||||
@RestController("AdminUserController")
|
@RestController("AdminUserController")
|
||||||
@RequestMapping(value = "/api/admin/user")
|
@RequestMapping(value = "/api/admin/user")
|
||||||
@AllArgsConstructor
|
|
||||||
public class UserController extends BaseApiController {
|
public class UserController extends BaseApiController {
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final UserEventLogService userEventLogService;
|
private final UserEventLogService userEventLogService;
|
||||||
private final AuthenticationService authenticationService;
|
private final AuthenticationService authenticationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UserController(UserService userService, UserEventLogService userEventLogService, AuthenticationService authenticationService) {
|
||||||
|
this.userService = userService;
|
||||||
|
this.userEventLogService = userEventLogService;
|
||||||
|
this.authenticationService = authenticationService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/page/list", method = RequestMethod.POST)
|
@RequestMapping(value = "/page/list", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<UserResponseVM>> pageList(@RequestBody UserPageRequestVM model) {
|
public RestResponse<PageInfo<UserResponseVM>> pageList(@RequestBody UserPageRequestVM model) {
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import com.mindskip.xzs.service.*;
|
|||||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||||
import com.mindskip.xzs.utility.JsonUtil;
|
import com.mindskip.xzs.utility.JsonUtil;
|
||||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
||||||
import com.mindskip.xzs.service.*;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -27,7 +25,6 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@RestController("StudentDashboardController")
|
@RestController("StudentDashboardController")
|
||||||
@RequestMapping(value = "/api/student/dashboard")
|
@RequestMapping(value = "/api/student/dashboard")
|
||||||
@AllArgsConstructor
|
|
||||||
public class DashboardController extends BaseApiController {
|
public class DashboardController extends BaseApiController {
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
@@ -37,6 +34,16 @@ public class DashboardController extends BaseApiController {
|
|||||||
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
|
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
|
||||||
private final TextContentService textContentService;
|
private final TextContentService textContentService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public DashboardController(UserService userService, ExamPaperService examPaperService, QuestionService questionService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService, TextContentService textContentService) {
|
||||||
|
this.userService = userService;
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
this.questionService = questionService;
|
||||||
|
this.taskExamService = taskExamService;
|
||||||
|
this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
|
||||||
|
this.textContentService = textContentService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||||
public RestResponse<IndexVM> index() {
|
public RestResponse<IndexVM> index() {
|
||||||
IndexVM indexVM = new IndexVM();
|
IndexVM indexVM = new IndexVM();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import com.mindskip.xzs.domain.User;
|
|||||||
import com.mindskip.xzs.service.SubjectService;
|
import com.mindskip.xzs.service.SubjectService;
|
||||||
import com.mindskip.xzs.viewmodel.student.education.SubjectEditRequestVM;
|
import com.mindskip.xzs.viewmodel.student.education.SubjectEditRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.education.SubjectVM;
|
import com.mindskip.xzs.viewmodel.student.education.SubjectVM;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -16,11 +16,15 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@RestController("StudentEducationController")
|
@RestController("StudentEducationController")
|
||||||
@RequestMapping(value = "/api/student/education")
|
@RequestMapping(value = "/api/student/education")
|
||||||
@AllArgsConstructor
|
|
||||||
public class EducationController extends BaseApiController {
|
public class EducationController extends BaseApiController {
|
||||||
|
|
||||||
private final SubjectService subjectService;
|
private final SubjectService subjectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public EducationController(SubjectService subjectService) {
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
||||||
public RestResponse<List<SubjectVM>> list() {
|
public RestResponse<List<SubjectVM>> list() {
|
||||||
User user = getCurrentUser();
|
User user = getCurrentUser();
|
||||||
|
|||||||
@@ -18,8 +18,7 @@ import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
|
|||||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
|
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
|
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.domain.*;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -28,7 +27,6 @@ import java.util.Date;
|
|||||||
|
|
||||||
@RestController("StudentExamPaperAnswerController")
|
@RestController("StudentExamPaperAnswerController")
|
||||||
@RequestMapping(value = "/api/student/exampaper/answer")
|
@RequestMapping(value = "/api/student/exampaper/answer")
|
||||||
@AllArgsConstructor
|
|
||||||
public class ExamPaperAnswerController extends BaseApiController {
|
public class ExamPaperAnswerController extends BaseApiController {
|
||||||
|
|
||||||
private final ExamPaperAnswerService examPaperAnswerService;
|
private final ExamPaperAnswerService examPaperAnswerService;
|
||||||
@@ -36,6 +34,14 @@ public class ExamPaperAnswerController extends BaseApiController {
|
|||||||
private final SubjectService subjectService;
|
private final SubjectService subjectService;
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, ExamPaperService examPaperService, SubjectService subjectService, ApplicationEventPublisher eventPublisher) {
|
||||||
|
this.examPaperAnswerService = examPaperAnswerService;
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
|
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@RequestBody @Valid ExamPaperAnswerPageVM model) {
|
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@RequestBody @Valid ExamPaperAnswerPageVM model) {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -19,13 +19,19 @@ import javax.validation.Valid;
|
|||||||
|
|
||||||
@RestController("StudentExamPaperController")
|
@RestController("StudentExamPaperController")
|
||||||
@RequestMapping(value = "/api/student/exam/paper")
|
@RequestMapping(value = "/api/student/exam/paper")
|
||||||
@AllArgsConstructor
|
|
||||||
public class ExamPaperController extends BaseApiController {
|
public class ExamPaperController extends BaseApiController {
|
||||||
|
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
private final ExamPaperAnswerService examPaperAnswerService;
|
private final ExamPaperAnswerService examPaperAnswerService;
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ExamPaperController(ExamPaperService examPaperService, ExamPaperAnswerService examPaperAnswerService, ApplicationEventPublisher eventPublisher) {
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
this.examPaperAnswerService = examPaperAnswerService;
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
|
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
|
||||||
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
|
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
|
||||||
|
|||||||
@@ -20,12 +20,11 @@ import com.mindskip.xzs.viewmodel.student.question.answer.QuestionAnswerVM;
|
|||||||
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
|
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM;
|
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@RestController("StudentQuestionAnswerController")
|
@RestController("StudentQuestionAnswerController")
|
||||||
@RequestMapping(value = "/api/student/question/answer")
|
@RequestMapping(value = "/api/student/question/answer")
|
||||||
@AllArgsConstructor
|
|
||||||
public class QuestionAnswerController extends BaseApiController {
|
public class QuestionAnswerController extends BaseApiController {
|
||||||
|
|
||||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||||
@@ -33,6 +32,14 @@ public class QuestionAnswerController extends BaseApiController {
|
|||||||
private final TextContentService textContentService;
|
private final TextContentService textContentService;
|
||||||
private final SubjectService subjectService;
|
private final SubjectService subjectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public QuestionAnswerController(ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, QuestionService questionService, TextContentService textContentService, SubjectService subjectService) {
|
||||||
|
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
|
||||||
|
this.questionService = questionService;
|
||||||
|
this.textContentService = textContentService;
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<QuestionPageStudentResponseVM>> pageList(@RequestBody QuestionPageStudentRequestVM model) {
|
public RestResponse<PageInfo<QuestionPageStudentResponseVM>> pageList(@RequestBody QuestionPageStudentRequestVM model) {
|
||||||
model.setCreateUser(getCurrentUser().getId());
|
model.setCreateUser(getCurrentUser().getId());
|
||||||
|
|||||||
@@ -2,15 +2,17 @@ package com.mindskip.xzs.controller.student;
|
|||||||
|
|
||||||
import com.mindskip.xzs.base.BaseApiController;
|
import com.mindskip.xzs.base.BaseApiController;
|
||||||
import com.mindskip.xzs.service.QuestionService;
|
import com.mindskip.xzs.service.QuestionService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@RestController("StudentQuestionController")
|
@RestController("StudentQuestionController")
|
||||||
@RequestMapping(value = "/api/student/question")
|
@RequestMapping(value = "/api/student/question")
|
||||||
@AllArgsConstructor
|
|
||||||
public class QuestionController extends BaseApiController {
|
public class QuestionController extends BaseApiController {
|
||||||
|
|
||||||
private final QuestionService questionService;
|
private final QuestionService questionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public QuestionController(QuestionService questionService) {
|
||||||
|
this.questionService = questionService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,7 @@ import com.mindskip.xzs.base.BaseApiController;
|
|||||||
import com.mindskip.xzs.base.RestResponse;
|
import com.mindskip.xzs.base.RestResponse;
|
||||||
import com.mindskip.xzs.service.FileUpload;
|
import com.mindskip.xzs.service.FileUpload;
|
||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@@ -18,8 +17,6 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@AllArgsConstructor
|
|
||||||
@RequestMapping("/api/student/upload")
|
@RequestMapping("/api/student/upload")
|
||||||
@RestController("StudentUploadController")
|
@RestController("StudentUploadController")
|
||||||
public class UploadController extends BaseApiController {
|
public class UploadController extends BaseApiController {
|
||||||
@@ -27,6 +24,12 @@ public class UploadController extends BaseApiController {
|
|||||||
private final FileUpload fileUpload;
|
private final FileUpload fileUpload;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UploadController(FileUpload fileUpload, UserService userService) {
|
||||||
|
this.fileUpload = fileUpload;
|
||||||
|
this.userService = userService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("/image")
|
@RequestMapping("/image")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
|
|||||||
@@ -17,9 +17,8 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
|||||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
import com.mindskip.xzs.viewmodel.student.user.*;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -35,7 +34,6 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RestController("StudentUserController")
|
@RestController("StudentUserController")
|
||||||
@RequestMapping(value = "/api/student/user")
|
@RequestMapping(value = "/api/student/user")
|
||||||
@AllArgsConstructor
|
|
||||||
public class UserController extends BaseApiController {
|
public class UserController extends BaseApiController {
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
@@ -44,6 +42,15 @@ public class UserController extends BaseApiController {
|
|||||||
private final AuthenticationService authenticationService;
|
private final AuthenticationService authenticationService;
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UserController(UserService userService, UserEventLogService userEventLogService, MessageService messageService, AuthenticationService authenticationService, ApplicationEventPublisher eventPublisher) {
|
||||||
|
this.userService = userService;
|
||||||
|
this.userEventLogService = userEventLogService;
|
||||||
|
this.messageService = messageService;
|
||||||
|
this.authenticationService = authenticationService;
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/current", method = RequestMethod.POST)
|
@RequestMapping(value = "/current", method = RequestMethod.POST)
|
||||||
public RestResponse<UserResponseVM> current() {
|
public RestResponse<UserResponseVM> current() {
|
||||||
User user = getCurrentUser();
|
User user = getCurrentUser();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.mindskip.xzs.service.UserTokenService;
|
|||||||
import com.mindskip.xzs.utility.WxUtil;
|
import com.mindskip.xzs.utility.WxUtil;
|
||||||
import com.mindskip.xzs.viewmodel.wx.student.user.BindInfo;
|
import com.mindskip.xzs.viewmodel.wx.student.user.BindInfo;
|
||||||
import com.mindskip.xzs.domain.User;
|
import com.mindskip.xzs.domain.User;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -21,7 +21,6 @@ import javax.validation.constraints.NotBlank;
|
|||||||
|
|
||||||
@Controller("WXStudentAuthController")
|
@Controller("WXStudentAuthController")
|
||||||
@RequestMapping(value = "/api/wx/student/auth")
|
@RequestMapping(value = "/api/wx/student/auth")
|
||||||
@AllArgsConstructor
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public class AuthController extends BaseWXApiController {
|
public class AuthController extends BaseWXApiController {
|
||||||
|
|
||||||
@@ -30,6 +29,14 @@ public class AuthController extends BaseWXApiController {
|
|||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final UserTokenService userTokenService;
|
private final UserTokenService userTokenService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public AuthController(SystemConfig systemConfig, AuthenticationService authenticationService, UserService userService, UserTokenService userTokenService) {
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
this.authenticationService = authenticationService;
|
||||||
|
this.userService = userService;
|
||||||
|
this.userTokenService = userTokenService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/bind", method = RequestMethod.POST)
|
@RequestMapping(value = "/bind", method = RequestMethod.POST)
|
||||||
public RestResponse bind(@Valid BindInfo model) {
|
public RestResponse bind(@Valid BindInfo model) {
|
||||||
User user = userService.getUserByUserName(model.getUserName());
|
User user = userService.getUserByUserName(model.getUserName());
|
||||||
|
|||||||
@@ -16,8 +16,7 @@ import com.mindskip.xzs.service.TextContentService;
|
|||||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||||
import com.mindskip.xzs.utility.JsonUtil;
|
import com.mindskip.xzs.utility.JsonUtil;
|
||||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
||||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
@@ -31,7 +30,6 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@Controller("WXStudentDashboardController")
|
@Controller("WXStudentDashboardController")
|
||||||
@RequestMapping(value = "/api/wx/student/dashboard")
|
@RequestMapping(value = "/api/wx/student/dashboard")
|
||||||
@AllArgsConstructor
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public class DashboardController extends BaseWXApiController {
|
public class DashboardController extends BaseWXApiController {
|
||||||
|
|
||||||
@@ -40,6 +38,14 @@ public class DashboardController extends BaseWXApiController {
|
|||||||
private final TaskExamService taskExamService;
|
private final TaskExamService taskExamService;
|
||||||
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
|
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public DashboardController(ExamPaperService examPaperService, TextContentService textContentService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService) {
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
this.textContentService = textContentService;
|
||||||
|
this.taskExamService = taskExamService;
|
||||||
|
this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||||
public RestResponse<IndexVM> index() {
|
public RestResponse<IndexVM> index() {
|
||||||
IndexVM indexVM = new IndexVM();
|
IndexVM indexVM = new IndexVM();
|
||||||
|
|||||||
@@ -13,15 +13,13 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
|||||||
import com.mindskip.xzs.utility.ExamUtil;
|
import com.mindskip.xzs.utility.ExamUtil;
|
||||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exam.*;
|
|
||||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
|
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
|
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.domain.*;
|
|
||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperReadVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperReadVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -34,7 +32,6 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
@Controller("WXStudentExamPaperAnswerController")
|
@Controller("WXStudentExamPaperAnswerController")
|
||||||
@RequestMapping(value = "/api/wx/student/exampaper/answer")
|
@RequestMapping(value = "/api/wx/student/exampaper/answer")
|
||||||
@AllArgsConstructor
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public class ExamPaperAnswerController extends BaseWXApiController {
|
public class ExamPaperAnswerController extends BaseWXApiController {
|
||||||
|
|
||||||
@@ -43,6 +40,14 @@ public class ExamPaperAnswerController extends BaseWXApiController {
|
|||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, SubjectService subjectService, ApplicationEventPublisher eventPublisher, ExamPaperService examPaperService) {
|
||||||
|
this.examPaperAnswerService = examPaperAnswerService;
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
|
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
|
||||||
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@Valid ExamPaperAnswerPageVM model) {
|
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@Valid ExamPaperAnswerPageVM model) {
|
||||||
model.setCreateUser(getCurrentUser().getId());
|
model.setCreateUser(getCurrentUser().getId());
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
|
||||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@@ -21,13 +21,18 @@ import javax.validation.Valid;
|
|||||||
|
|
||||||
@Controller("WXStudentExamController")
|
@Controller("WXStudentExamController")
|
||||||
@RequestMapping(value = "/api/wx/student/exampaper")
|
@RequestMapping(value = "/api/wx/student/exampaper")
|
||||||
@AllArgsConstructor
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public class ExamPaperController extends BaseWXApiController {
|
public class ExamPaperController extends BaseWXApiController {
|
||||||
|
|
||||||
private final ExamPaperService examPaperService;
|
private final ExamPaperService examPaperService;
|
||||||
private final SubjectService subjectService;
|
private final SubjectService subjectService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ExamPaperController(ExamPaperService examPaperService, SubjectService subjectService) {
|
||||||
|
this.examPaperService = examPaperService;
|
||||||
|
this.subjectService = subjectService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
|
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
|
||||||
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
|
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
|
||||||
|
|||||||
@@ -17,9 +17,8 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
|||||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
import com.mindskip.xzs.viewmodel.student.user.*;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -36,7 +35,6 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@Controller("WXStudentUserController")
|
@Controller("WXStudentUserController")
|
||||||
@RequestMapping(value = "/api/wx/student/user")
|
@RequestMapping(value = "/api/wx/student/user")
|
||||||
@AllArgsConstructor
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public class UserController extends BaseWXApiController {
|
public class UserController extends BaseWXApiController {
|
||||||
|
|
||||||
@@ -46,6 +44,15 @@ public class UserController extends BaseWXApiController {
|
|||||||
private final AuthenticationService authenticationService;
|
private final AuthenticationService authenticationService;
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UserController(UserService userService, UserEventLogService userEventLogService, MessageService messageService, AuthenticationService authenticationService, ApplicationEventPublisher eventPublisher) {
|
||||||
|
this.userService = userService;
|
||||||
|
this.userEventLogService = userEventLogService;
|
||||||
|
this.messageService = messageService;
|
||||||
|
this.authenticationService = authenticationService;
|
||||||
|
this.eventPublisher = eventPublisher;
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/current", method = RequestMethod.POST)
|
@RequestMapping(value = "/current", method = RequestMethod.POST)
|
||||||
public RestResponse<UserResponseVM> current() {
|
public RestResponse<UserResponseVM> current() {
|
||||||
User user = getCurrentUser();
|
User user = getCurrentUser();
|
||||||
|
|||||||
@@ -1,12 +1,34 @@
|
|||||||
package com.mindskip.xzs.domain;
|
package com.mindskip.xzs.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamPaperAnswerInfo {
|
public class ExamPaperAnswerInfo {
|
||||||
public ExamPaper examPaper;
|
public ExamPaper examPaper;
|
||||||
public ExamPaperAnswer examPaperAnswer;
|
public ExamPaperAnswer examPaperAnswer;
|
||||||
public List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers;
|
public List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers;
|
||||||
|
|
||||||
|
public ExamPaper getExamPaper() {
|
||||||
|
return examPaper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaper(ExamPaper examPaper) {
|
||||||
|
this.examPaper = examPaper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ExamPaperAnswer getExamPaperAnswer() {
|
||||||
|
return examPaperAnswer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperAnswer(ExamPaperAnswer examPaperAnswer) {
|
||||||
|
this.examPaperAnswer = examPaperAnswer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExamPaperQuestionCustomerAnswer> getExamPaperQuestionCustomerAnswers() {
|
||||||
|
return examPaperQuestionCustomerAnswers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperQuestionCustomerAnswers(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers) {
|
||||||
|
this.examPaperQuestionCustomerAnswers = examPaperQuestionCustomerAnswers;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,22 @@
|
|||||||
package com.mindskip.xzs.domain.exam;
|
package com.mindskip.xzs.domain.exam;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamPaperQuestionItemObject {
|
public class ExamPaperQuestionItemObject {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Integer itemOrder;
|
private Integer itemOrder;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getItemOrder() {
|
||||||
|
return itemOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemOrder(Integer itemOrder) {
|
||||||
|
this.itemOrder = itemOrder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,27 @@
|
|||||||
package com.mindskip.xzs.domain.exam;
|
package com.mindskip.xzs.domain.exam;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamPaperTitleItemObject {
|
public class ExamPaperTitleItemObject {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private List<ExamPaperQuestionItemObject> questionItems;
|
private List<ExamPaperQuestionItemObject> questionItems;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExamPaperQuestionItemObject> getQuestionItems() {
|
||||||
|
return questionItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuestionItems(List<ExamPaperQuestionItemObject> questionItems) {
|
||||||
|
this.questionItems = questionItems;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,32 @@
|
|||||||
package com.mindskip.xzs.domain.other;
|
package com.mindskip.xzs.domain.other;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class ExamPaperAnswerUpdate {
|
public class ExamPaperAnswerUpdate {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Integer customerScore;
|
private Integer customerScore;
|
||||||
private Boolean doRight;
|
private Boolean doRight;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCustomerScore() {
|
||||||
|
return customerScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomerScore(Integer customerScore) {
|
||||||
|
this.customerScore = customerScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getDoRight() {
|
||||||
|
return doRight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoRight(Boolean doRight) {
|
||||||
|
this.doRight = doRight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,24 @@
|
|||||||
package com.mindskip.xzs.domain.other;
|
package com.mindskip.xzs.domain.other;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class KeyValue {
|
public class KeyValue {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private Integer value;
|
private Integer value;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(Integer value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package com.mindskip.xzs.domain.question;
|
package com.mindskip.xzs.domain.question;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QuestionItemObject {
|
public class QuestionItemObject {
|
||||||
|
|
||||||
private String prefix;
|
private String prefix;
|
||||||
@@ -10,4 +8,28 @@ public class QuestionItemObject {
|
|||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
private Integer score;
|
private Integer score;
|
||||||
|
|
||||||
|
public String getPrefix() {
|
||||||
|
return prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrefix(String prefix) {
|
||||||
|
this.prefix = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getScore() {
|
||||||
|
return score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setScore(Integer score) {
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
package com.mindskip.xzs.domain.question;
|
package com.mindskip.xzs.domain.question;
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class QuestionObject {
|
public class QuestionObject {
|
||||||
|
|
||||||
private String titleContent;
|
private String titleContent;
|
||||||
@@ -15,4 +13,36 @@ public class QuestionObject {
|
|||||||
private List<QuestionItemObject> questionItemObjects;
|
private List<QuestionItemObject> questionItemObjects;
|
||||||
|
|
||||||
private String correct;
|
private String correct;
|
||||||
|
|
||||||
|
public String getTitleContent() {
|
||||||
|
return titleContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitleContent(String titleContent) {
|
||||||
|
this.titleContent = titleContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAnalyze() {
|
||||||
|
return analyze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnalyze(String analyze) {
|
||||||
|
this.analyze = analyze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<QuestionItemObject> getQuestionItemObjects() {
|
||||||
|
return questionItemObjects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuestionItemObjects(List<QuestionItemObject> questionItemObjects) {
|
||||||
|
this.questionItemObjects = questionItemObjects;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCorrect() {
|
||||||
|
return correct;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCorrect(String correct) {
|
||||||
|
this.correct = correct;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
package com.mindskip.xzs.domain.task;
|
package com.mindskip.xzs.domain.task;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class TaskItemAnswerObject {
|
public class TaskItemAnswerObject {
|
||||||
private Integer examPaperId;
|
private Integer examPaperId;
|
||||||
private Integer examPaperAnswerId;
|
private Integer examPaperAnswerId;
|
||||||
@@ -17,4 +15,28 @@ public class TaskItemAnswerObject {
|
|||||||
this.examPaperAnswerId = examPaperAnswerId;
|
this.examPaperAnswerId = examPaperAnswerId;
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getExamPaperId() {
|
||||||
|
return examPaperId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperId(Integer examPaperId) {
|
||||||
|
this.examPaperId = examPaperId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getExamPaperAnswerId() {
|
||||||
|
return examPaperAnswerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperAnswerId(Integer examPaperAnswerId) {
|
||||||
|
this.examPaperAnswerId = examPaperAnswerId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,32 @@
|
|||||||
package com.mindskip.xzs.domain.task;
|
package com.mindskip.xzs.domain.task;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class TaskItemObject {
|
public class TaskItemObject {
|
||||||
private Integer examPaperId;
|
private Integer examPaperId;
|
||||||
private String examPaperName;
|
private String examPaperName;
|
||||||
private Integer itemOrder;
|
private Integer itemOrder;
|
||||||
|
|
||||||
|
public Integer getExamPaperId() {
|
||||||
|
return examPaperId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperId(Integer examPaperId) {
|
||||||
|
this.examPaperId = examPaperId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExamPaperName() {
|
||||||
|
return examPaperName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperName(String examPaperName) {
|
||||||
|
this.examPaperName = examPaperName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getItemOrder() {
|
||||||
|
return itemOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemOrder(Integer itemOrder) {
|
||||||
|
this.itemOrder = itemOrder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.mindskip.xzs.listener;
|
package com.mindskip.xzs.listener;
|
||||||
|
|
||||||
import com.mindskip.xzs.domain.*;
|
|
||||||
import com.mindskip.xzs.domain.*;
|
import com.mindskip.xzs.domain.*;
|
||||||
import com.mindskip.xzs.domain.enums.ExamPaperTypeEnum;
|
import com.mindskip.xzs.domain.enums.ExamPaperTypeEnum;
|
||||||
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
|
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
|
||||||
@@ -9,7 +8,7 @@ import com.mindskip.xzs.service.ExamPaperAnswerService;
|
|||||||
import com.mindskip.xzs.service.ExamPaperQuestionCustomerAnswerService;
|
import com.mindskip.xzs.service.ExamPaperQuestionCustomerAnswerService;
|
||||||
import com.mindskip.xzs.service.TaskExamCustomerAnswerService;
|
import com.mindskip.xzs.service.TaskExamCustomerAnswerService;
|
||||||
import com.mindskip.xzs.service.TextContentService;
|
import com.mindskip.xzs.service.TextContentService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -22,15 +21,21 @@ import java.util.List;
|
|||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
|
||||||
public class CalculateExamPaperAnswerListener implements ApplicationListener<CalculateExamPaperAnswerCompleteEvent> {
|
public class CalculateExamPaperAnswerListener implements ApplicationListener<CalculateExamPaperAnswerCompleteEvent> {
|
||||||
|
|
||||||
|
|
||||||
private final ExamPaperAnswerService examPaperAnswerService;
|
private final ExamPaperAnswerService examPaperAnswerService;
|
||||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||||
private final TextContentService textContentService;
|
private final TextContentService textContentService;
|
||||||
private final TaskExamCustomerAnswerService examCustomerAnswerService;
|
private final TaskExamCustomerAnswerService examCustomerAnswerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public CalculateExamPaperAnswerListener(ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, TextContentService textContentService, TaskExamCustomerAnswerService examCustomerAnswerService) {
|
||||||
|
this.examPaperAnswerService = examPaperAnswerService;
|
||||||
|
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
|
||||||
|
this.textContentService = textContentService;
|
||||||
|
this.examCustomerAnswerService = examCustomerAnswerService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void onApplicationEvent(CalculateExamPaperAnswerCompleteEvent calculateExamPaperAnswerCompleteEvent) {
|
public void onApplicationEvent(CalculateExamPaperAnswerCompleteEvent calculateExamPaperAnswerCompleteEvent) {
|
||||||
|
|||||||
@@ -2,15 +2,19 @@ package com.mindskip.xzs.listener;
|
|||||||
|
|
||||||
import com.mindskip.xzs.event.UserEvent;
|
import com.mindskip.xzs.event.UserEvent;
|
||||||
import com.mindskip.xzs.service.UserEventLogService;
|
import com.mindskip.xzs.service.UserEventLogService;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
@AllArgsConstructor
|
|
||||||
public class UserLogListener implements ApplicationListener<UserEvent> {
|
public class UserLogListener implements ApplicationListener<UserEvent> {
|
||||||
|
|
||||||
private UserEventLogService userEventLogService;
|
private final UserEventLogService userEventLogService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public UserLogListener(UserEventLogService userEventLogService) {
|
||||||
|
this.userEventLogService = userEventLogService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(UserEvent userEvent) {
|
public void onApplicationEvent(UserEvent userEvent) {
|
||||||
|
|||||||
@@ -5,21 +5,25 @@ import com.mindskip.xzs.domain.User;
|
|||||||
import com.mindskip.xzs.service.AuthenticationService;
|
import com.mindskip.xzs.service.AuthenticationService;
|
||||||
import com.mindskip.xzs.service.UserService;
|
import com.mindskip.xzs.service.UserService;
|
||||||
import com.mindskip.xzs.utility.RsaUtil;
|
import com.mindskip.xzs.utility.RsaUtil;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
|
||||||
public class AuthenticationServiceImpl implements AuthenticationService {
|
public class AuthenticationServiceImpl implements AuthenticationService {
|
||||||
|
|
||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
private final SystemConfig systemConfig;
|
private final SystemConfig systemConfig;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public AuthenticationServiceImpl(UserService userService, SystemConfig systemConfig) {
|
||||||
|
this.userService = userService;
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param username username
|
* @param username username
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ package com.mindskip.xzs.service.impl;
|
|||||||
|
|
||||||
import com.mindskip.xzs.repository.BaseMapper;
|
import com.mindskip.xzs.repository.BaseMapper;
|
||||||
import com.mindskip.xzs.service.BaseService;
|
import com.mindskip.xzs.service.BaseService;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
|
|
||||||
@AllArgsConstructor
|
|
||||||
public abstract class BaseServiceImpl<T> implements BaseService<T> {
|
public abstract class BaseServiceImpl<T> implements BaseService<T> {
|
||||||
|
|
||||||
BaseMapper<T> baseMapper;
|
private final BaseMapper<T> baseMapper;
|
||||||
|
|
||||||
|
public BaseServiceImpl(BaseMapper<T> baseMapper) {
|
||||||
|
this.baseMapper = baseMapper;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int deleteById(Integer id) {
|
public int deleteById(Integer id) {
|
||||||
|
|||||||
@@ -11,19 +11,24 @@ import com.qiniu.storage.Region;
|
|||||||
import com.qiniu.storage.UploadManager;
|
import com.qiniu.storage.UploadManager;
|
||||||
import com.qiniu.storage.model.DefaultPutRet;
|
import com.qiniu.storage.model.DefaultPutRet;
|
||||||
import com.qiniu.util.Auth;
|
import com.qiniu.util.Auth;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
|
||||||
public class FileUploadImpl implements FileUpload {
|
public class FileUploadImpl implements FileUpload {
|
||||||
private final Logger logger = LoggerFactory.getLogger(FileUpload.class);
|
private final Logger logger = LoggerFactory.getLogger(FileUpload.class);
|
||||||
private final SystemConfig systemConfig;
|
private final SystemConfig systemConfig;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public FileUploadImpl(SystemConfig systemConfig) {
|
||||||
|
this.systemConfig = systemConfig;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String uploadFile(InputStream inputStream, long size, String extName) {
|
public String uploadFile(InputStream inputStream, long size, String extName) {
|
||||||
QnConfig qnConfig = systemConfig.getQn();
|
QnConfig qnConfig = systemConfig.getQn();
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import com.mindskip.xzs.viewmodel.admin.message.MessagePageRequestVM;
|
|||||||
import com.mindskip.xzs.viewmodel.student.user.MessageRequestVM;
|
import com.mindskip.xzs.viewmodel.student.user.MessageRequestVM;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@@ -17,12 +17,17 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@AllArgsConstructor
|
|
||||||
public class MessageServiceImpl implements MessageService {
|
public class MessageServiceImpl implements MessageService {
|
||||||
|
|
||||||
private final MessageMapper messageMapper;
|
private final MessageMapper messageMapper;
|
||||||
private final MessageUserMapper messageUserMapper;
|
private final MessageUserMapper messageUserMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public MessageServiceImpl(MessageMapper messageMapper, MessageUserMapper messageUserMapper) {
|
||||||
|
this.messageMapper = messageMapper;
|
||||||
|
this.messageUserMapper = messageUserMapper;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Message> selectMessageByIds(List<Integer> ids) {
|
public List<Message> selectMessageByIds(List<Integer> ids) {
|
||||||
return messageMapper.selectByIds(ids);
|
return messageMapper.selectByIds(ids);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class SubjectServiceImpl extends BaseServiceImpl<Subject> implements SubjectService {
|
public class SubjectServiceImpl extends BaseServiceImpl<Subject> implements SubjectService {
|
||||||
|
|
||||||
private final static String CACHE_NAME = "Subject";
|
private final static String CACHE_NAME = "xzs:subject";
|
||||||
private final SubjectMapper subjectMapper;
|
private final SubjectMapper subjectMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
public class TextContentServiceImpl extends BaseServiceImpl<TextContent> implements TextContentService {
|
public class TextContentServiceImpl extends BaseServiceImpl<TextContent> implements TextContentService {
|
||||||
|
|
||||||
private final static String CACHE_NAME = "TextContent";
|
private final static String CACHE_NAME = "xzs:textcontent";
|
||||||
private final TextContentMapper textContentMapper;
|
private final TextContentMapper textContentMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
|||||||
@Service
|
@Service
|
||||||
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {
|
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {
|
||||||
|
|
||||||
private final static String CACHE_NAME = "User";
|
private final static String CACHE_NAME = "xzs:user";
|
||||||
private final UserMapper userMapper;
|
private final UserMapper userMapper;
|
||||||
private final ApplicationEventPublisher eventPublisher;
|
private final ApplicationEventPublisher eventPublisher;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import java.util.UUID;
|
|||||||
@Service
|
@Service
|
||||||
public class UserTokenServiceImpl extends BaseServiceImpl<UserToken> implements UserTokenService {
|
public class UserTokenServiceImpl extends BaseServiceImpl<UserToken> implements UserTokenService {
|
||||||
|
|
||||||
private final static String CACHE_NAME = "Token";
|
private final static String CACHE_NAME = "xzs:token";
|
||||||
private final UserTokenMapper userTokenMapper;
|
private final UserTokenMapper userTokenMapper;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
private final SystemConfig systemConfig;
|
private final SystemConfig systemConfig;
|
||||||
|
|||||||
@@ -1,12 +1,30 @@
|
|||||||
package com.mindskip.xzs.utility;
|
package com.mindskip.xzs.utility;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class WxResponse implements Serializable {
|
public class WxResponse implements Serializable {
|
||||||
private static final long serialVersionUID = -8496869159673561976L;
|
private static final long serialVersionUID = -8496869159673561976L;
|
||||||
private String session_key;
|
private String session_key;
|
||||||
private String openid;
|
private String openid;
|
||||||
|
|
||||||
|
public static long getSerialVersionUID() {
|
||||||
|
return serialVersionUID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSession_key() {
|
||||||
|
return session_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSession_key(String session_key) {
|
||||||
|
this.session_key = session_key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOpenid() {
|
||||||
|
return openid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOpenid(String openid) {
|
||||||
|
this.openid = openid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,21 @@
|
|||||||
package com.mindskip.xzs.viewmodel;
|
package com.mindskip.xzs.viewmodel;
|
||||||
|
|
||||||
import com.mindskip.xzs.utility.ModelMapperSingle;
|
import com.mindskip.xzs.utility.ModelMapperSingle;
|
||||||
import lombok.Data;
|
|
||||||
import org.modelmapper.ModelMapper;
|
import org.modelmapper.ModelMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 武汉思维跳跃科技有限公司
|
* @author 武汉思维跳跃科技有限公司
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BaseVM {
|
public class BaseVM {
|
||||||
protected static ModelMapper modelMapper = ModelMapperSingle.Instance();
|
protected static ModelMapper modelMapper = ModelMapperSingle.Instance();
|
||||||
|
|
||||||
|
|
||||||
|
public static ModelMapper getModelMapper() {
|
||||||
|
return modelMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setModelMapper(ModelMapper modelMapper) {
|
||||||
|
BaseVM.modelMapper = modelMapper;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.mindskip.xzs.viewmodel.admin.dashboard;
|
package com.mindskip.xzs.viewmodel.admin.dashboard;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
|
||||||
public class IndexVM {
|
public class IndexVM {
|
||||||
private Integer examPaperCount;
|
private Integer examPaperCount;
|
||||||
private Integer questionCount;
|
private Integer questionCount;
|
||||||
@@ -13,4 +13,60 @@ public class IndexVM {
|
|||||||
private List<Integer> mothDayUserActionValue;
|
private List<Integer> mothDayUserActionValue;
|
||||||
private List<Integer> mothDayDoExamQuestionValue;
|
private List<Integer> mothDayDoExamQuestionValue;
|
||||||
private List<String> mothDayText;
|
private List<String> mothDayText;
|
||||||
|
|
||||||
|
public Integer getExamPaperCount() {
|
||||||
|
return examPaperCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExamPaperCount(Integer examPaperCount) {
|
||||||
|
this.examPaperCount = examPaperCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getQuestionCount() {
|
||||||
|
return questionCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuestionCount(Integer questionCount) {
|
||||||
|
this.questionCount = questionCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDoExamPaperCount() {
|
||||||
|
return doExamPaperCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoExamPaperCount(Integer doExamPaperCount) {
|
||||||
|
this.doExamPaperCount = doExamPaperCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDoQuestionCount() {
|
||||||
|
return doQuestionCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDoQuestionCount(Integer doQuestionCount) {
|
||||||
|
this.doQuestionCount = doQuestionCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getMothDayUserActionValue() {
|
||||||
|
return mothDayUserActionValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMothDayUserActionValue(List<Integer> mothDayUserActionValue) {
|
||||||
|
this.mothDayUserActionValue = mothDayUserActionValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Integer> getMothDayDoExamQuestionValue() {
|
||||||
|
return mothDayDoExamQuestionValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMothDayDoExamQuestionValue(List<Integer> mothDayDoExamQuestionValue) {
|
||||||
|
this.mothDayDoExamQuestionValue = mothDayDoExamQuestionValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getMothDayText() {
|
||||||
|
return mothDayText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMothDayText(List<String> mothDayText) {
|
||||||
|
this.mothDayText = mothDayText;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||