Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-microservice-exam
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
汪想
spring-microservice-exam
Commits
020d962b
Commit
020d962b
authored
Oct 20, 2019
by
tangyi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
a6471756
29716af8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
73 changed files
with
310 additions
and
241 deletions
+310
-241
SysUtil.java
...ain/java/com/github/tangyi/common/core/utils/SysUtil.java
+0
-1
Dockerfile
config-service/Dockerfile
+2
-2
pom.xml
config-service/pom.xml
+0
-1
application-prd.yml
config-service/src/main/resources/application-prd.yml
+9
-0
logback.xml
config-service/src/main/resources/logback.xml
+11
-5
docker-compose-nginx.yml
docs/deploy/docker-compose-nginx.yml
+18
-0
docker-compose.env
docs/deploy/docker-compose.env
+0
-4
microservice_auth.sql
docs/deploy/mysql/init/microservice_auth.sql
+2
-2
microservice_exam.sql
docs/deploy/mysql/init/microservice_exam.sql
+0
-0
microservice_gateway.sql
docs/deploy/mysql/init/microservice_gateway.sql
+1
-1
microservice_user.sql
docs/deploy/mysql/init/microservice_user.sql
+4
-10
microservice-exam-user.sql
docs/deploy/mysql/update/microservice-exam-user.sql
+8
-0
course.vue
...end/spring-microservice-exam-ui/src/views/exam/course.vue
+3
-3
exam.vue
frontend/spring-microservice-exam-ui/src/views/exam/exam.vue
+8
-9
knowledge.vue
.../spring-microservice-exam-ui/src/views/exam/knowledge.vue
+3
-3
subject.vue
...nd/spring-microservice-exam-ui/src/views/exam/subject.vue
+32
-89
log.vue
...end/spring-microservice-exam-ui/src/views/monitor/log.vue
+3
-3
client.vue
...tend/spring-microservice-exam-ui/src/views/sys/client.vue
+3
-3
menu.vue
frontend/spring-microservice-exam-ui/src/views/sys/menu.vue
+2
-2
role.vue
frontend/spring-microservice-exam-ui/src/views/sys/role.vue
+3
-3
route.vue
frontend/spring-microservice-exam-ui/src/views/sys/route.vue
+3
-3
user.vue
frontend/spring-microservice-exam-ui/src/views/sys/user.vue
+6
-6
tenant.vue
...d/spring-microservice-exam-ui/src/views/tenant/tenant.vue
+3
-3
Dockerfile
gateway-service/Dockerfile
+2
-2
pom.xml
gateway-service/pom.xml
+0
-1
bootstrap.yml
gateway-service/src/main/resources/bootstrap.yml
+2
-0
logback.xml
gateway-service/src/main/resources/logback.xml
+11
-5
Dockerfile
modules/auth-service-parent/auth-service/Dockerfile
+2
-2
pom.xml
modules/auth-service-parent/auth-service/pom.xml
+0
-1
bootstrap.yml
...vice-parent/auth-service/src/main/resources/bootstrap.yml
+2
-0
logback.xml
...ervice-parent/auth-service/src/main/resources/logback.xml
+11
-5
OauthClientMapper.xml
...h-service/src/main/resources/mapper/OauthClientMapper.xml
+1
-1
ExamSubjectConstant.java
...github/tangyi/exam/api/constants/ExamSubjectConstant.java
+5
-0
ExaminationSubject.java
...com/github/tangyi/exam/api/module/ExaminationSubject.java
+6
-0
Dockerfile
modules/exam-service-parent/exam-service/Dockerfile
+2
-2
pom.xml
modules/exam-service-parent/exam-service/pom.xml
+0
-1
SubjectCategoryController.java
...hub/tangyi/exam/controller/SubjectCategoryController.java
+2
-0
SubjectController.java
.../com/github/tangyi/exam/controller/SubjectController.java
+3
-9
SubjectChoicesService.java
...com/github/tangyi/exam/service/SubjectChoicesService.java
+1
-0
SubjectService.java
...n/java/com/github/tangyi/exam/service/SubjectService.java
+36
-4
SubjectShortAnswerService.java
...github/tangyi/exam/service/SubjectShortAnswerService.java
+1
-0
bootstrap.yml
...vice-parent/exam-service/src/main/resources/bootstrap.yml
+2
-0
logback.xml
...ervice-parent/exam-service/src/main/resources/logback.xml
+11
-5
CourseMapper.xml
...t/exam-service/src/main/resources/mapper/CourseMapper.xml
+1
-1
ExaminationMapper.xml
...m-service/src/main/resources/mapper/ExaminationMapper.xml
+1
-1
ExaminationSubjectMapper.xml
...ce/src/main/resources/mapper/ExaminationSubjectMapper.xml
+20
-5
KnowledgeMapper.xml
...xam-service/src/main/resources/mapper/KnowledgeMapper.xml
+1
-1
SubjectChoicesMapper.xml
...ervice/src/main/resources/mapper/SubjectChoicesMapper.xml
+1
-1
SubjectJudgementMapper.xml
...vice/src/main/resources/mapper/SubjectJudgementMapper.xml
+2
-2
SubjectOptionMapper.xml
...service/src/main/resources/mapper/SubjectOptionMapper.xml
+2
-2
SubjectShortAnswerMapper.xml
...ce/src/main/resources/mapper/SubjectShortAnswerMapper.xml
+2
-2
Dockerfile
modules/msc-service-parent/msc-service/Dockerfile
+2
-2
pom.xml
modules/msc-service-parent/msc-service/pom.xml
+0
-1
bootstrap.yml
...rvice-parent/msc-service/src/main/resources/bootstrap.yml
+2
-0
logback.xml
...service-parent/msc-service/src/main/resources/logback.xml
+11
-5
Dockerfile
modules/user-service-parent/user-service/Dockerfile
+2
-2
pom.xml
modules/user-service-parent/user-service/pom.xml
+0
-1
MenuService.java
...main/java/com/github/tangyi/user/service/MenuService.java
+1
-1
bootstrap.yml
...vice-parent/user-service/src/main/resources/bootstrap.yml
+2
-0
logback.xml
...ervice-parent/user-service/src/main/resources/logback.xml
+11
-5
AttachmentMapper.xml
...er-service/src/main/resources/mapper/AttachmentMapper.xml
+1
-1
LogMapper.xml
...rent/user-service/src/main/resources/mapper/LogMapper.xml
+1
-1
RoleMapper.xml
...ent/user-service/src/main/resources/mapper/RoleMapper.xml
+1
-1
StudentMapper.xml
.../user-service/src/main/resources/mapper/StudentMapper.xml
+1
-1
TenantMapper.xml
...t/user-service/src/main/resources/mapper/TenantMapper.xml
+1
-1
UserAuthsMapper.xml
...ser-service/src/main/resources/mapper/UserAuthsMapper.xml
+1
-1
UserMapper.xml
...ent/user-service/src/main/resources/mapper/UserMapper.xml
+1
-1
UserStudentMapper.xml
...r-service/src/main/resources/mapper/UserStudentMapper.xml
+1
-1
Dockerfile
monitor-service/Dockerfile
+2
-2
pom.xml
monitor-service/pom.xml
+0
-1
bootstrap.yml
monitor-service/src/main/resources/bootstrap.yml
+2
-0
logback.xml
monitor-service/src/main/resources/logback.xml
+11
-5
pom.xml
pom.xml
+2
-2
No files found.
common/common-core/src/main/java/com/github/tangyi/common/core/utils/SysUtil.java
View file @
020d962b
...
...
@@ -70,7 +70,6 @@ public class SysUtil {
tenantCode
=
getCurrentUserTenantCode
();
if
(
StringUtils
.
isBlank
(
tenantCode
))
tenantCode
=
SecurityConstant
.
DEFAULT_TENANT_CODE
;
log
.
debug
(
"租户code:{}"
,
tenantCode
);
return
tenantCode
;
}
...
...
config-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9181
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
config-service/pom.xml
View file @
020d962b
...
...
@@ -69,7 +69,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
config-service/src/main/resources/application-prd.yml
0 → 100644
View file @
020d962b
# 生产环境的配置,采用git方式
spring
:
cloud
:
config
:
server
:
git
:
uri
:
https://git.oschina.net/wells2333/config-server
# 配置git仓库的地址
username
:
# git仓库的账号
password
:
# git仓库的密码
config-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
docs/deploy/docker-compose-nginx.yml
View file @
020d962b
...
...
@@ -32,6 +32,24 @@ services:
networks
:
-
net
# ---------------------------
# example
# ---------------------------
spring-microservice-exam-web-Spencer
:
image
:
registry.cn-hangzhou.aliyuncs.com/spring-microservice-exam/spring-microservice-exam-web:latest
volumes
:
# 挂载nginx的配置文件
-
./nginx.conf:/etc/nginx/nginx.conf
container_name
:
web-service-example
environment
:
-
TENANT_CODE=example
-
GATEWAY_SERVICE_HOST=gateway-service
restart
:
always
ports
:
-
"
88:80"
networks
:
-
net
networks
:
net
:
driver
:
bridge
...
...
docs/deploy/docker-compose.env
View file @
020d962b
...
...
@@ -73,6 +73,3 @@ TZ=Asia/Shanghai
# elk配置
ELK_DESTINATION=localhost:5044
\ No newline at end of file
# 日志级别
LOGGING_LEVEL=error
\ No newline at end of file
docs/deploy/mysql/init/microservice_auth.sql
View file @
020d962b
...
...
@@ -21,9 +21,9 @@ CREATE TABLE `oauth_client_details` (
`additional_information`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`autoapprove`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`creator`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'创建人'
,
`create_date`
timestamp
(
0
)
N
ULL
DEFAULT
NULL
COMMENT
'创建时间'
,
`create_date`
timestamp
(
0
)
N
OT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`modifier`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'修改人'
,
`modify_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
COMMENT
'修改时间'
,
`modify_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
`del_flag`
tinyint
(
4
)
NOT
NULL
COMMENT
'删除标记'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'系统编号'
,
`tenant_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'租户编号'
,
...
...
docs/deploy/mysql/init/microservice_exam.sql
View file @
020d962b
This diff is collapsed.
Click to expand it.
docs/deploy/mysql/init/microservice_gateway.sql
View file @
020d962b
...
...
@@ -18,7 +18,7 @@ CREATE TABLE `sys_route` (
`creator`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
,
`create_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
)
COMMENT
'创建时间'
,
`modifier`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'修改人'
,
`modify_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
COMMENT
'修改时间'
,
`modify_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
`del_flag`
tinyint
(
4
)
NOT
NULL
DEFAULT
0
COMMENT
'删除标记'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'系统编号'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
...
...
docs/deploy/mysql/init/microservice_user.sql
View file @
020d962b
...
...
@@ -19,7 +19,7 @@ CREATE TABLE `sys_attachment` (
`creator`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'创建人'
,
`create_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
)
COMMENT
'创建时间'
,
`modifier`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'修改人'
,
`modify_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
'0000-00-00 00:00:00'
COMMENT
'修改时间'
,
`modify_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'修改时间'
,
`del_flag`
tinyint
(
4
)
NULL
DEFAULT
NULL
COMMENT
'删除标记'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'系统编号'
,
`tenant_code`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'租户编号'
,
...
...
@@ -121,9 +121,9 @@ CREATE TABLE `sys_menu` (
`type`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'类型'
,
`data_level`
int
(
11
)
NULL
DEFAULT
NULL
,
`creator`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`create_date`
timestamp
(
0
)
N
ULL
DEFAULT
NULL
,
`create_date`
timestamp
(
0
)
N
OT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`modifier`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`modify_date`
timestamp
(
0
)
N
ULL
DEFAULT
NULL
,
`modify_date`
timestamp
(
0
)
N
OT
NULL
DEFAULT
CURRENT_TIMESTAMP
,
`del_flag`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`application_code`
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
,
`component`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'模块'
,
...
...
@@ -1183,7 +1183,7 @@ CREATE TABLE `sys_tenant` (
`creator`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
,
`create_date`
timestamp
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
),
`modifier`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
''
,
`modify_date`
timestamp
(
0
)
N
ULL
DEFAULT
NULL
,
`modify_date`
timestamp
(
0
)
N
OT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
(
0
)
,
`del_flag`
tinyint
(
4
)
NOT
NULL
DEFAULT
0
COMMENT
'删除标记'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'租户信息表'
ROW_FORMAT
=
Compact
;
...
...
@@ -1234,8 +1234,6 @@ CREATE TABLE `sys_user` (
INSERT
INTO
`sys_user`
VALUES
(
596078038307966976
,
'管理员'
,
'15521089185'
,
'596094244884713472'
,
'1633736729@qq.com'
,
'2019-07-01'
,
0
,
0
,
571347099191480320
,
'管理员'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'admin'
,
'2019-09-08 20:57:57'
,
'admin'
,
'2019-07-04 13:51:35'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user`
VALUES
(
596307222997372928
,
'梁同学'
,
'15521089185'
,
NULL
,
'1633736729@qq.com'
,
'2019-07-01'
,
0
,
1
,
NULL
,
'梁同学'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'admin'
,
'2019-09-08 20:57:57'
,
'admin'
,
'2019-07-05 21:53:17'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user`
VALUES
(
596332387600830464
,
'林老师'
,
'15521089185'
,
NULL
,
'1633736729@qq.com'
,
'2019-07-03'
,
0
,
1
,
NULL
,
'林老师'
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'admin'
,
'2019-09-21 22:33:16'
,
'admin'
,
'2019-09-21 22:25:04'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user`
VALUES
(
627482273154994176
,
'test1'
,
'15521089185'
,
NULL
,
'2232@11.com'
,
'2019-10-01'
,
0
,
0
,
596290673729212416
,
'test'
,
596329627606192128
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'admin'
,
'2019-10-07 14:59:17'
,
'admin'
,
'2019-10-07 14:50:50'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user`
VALUES
(
630779163304923136
,
'test2'
,
'15521089185'
,
NULL
,
NULL
,
NULL
,
0
,
0
,
NULL
,
''
,
596329627606192128
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
'admin'
,
'2019-10-08 21:55:30'
,
'admin'
,
'2019-10-08 21:47:04'
,
0
,
'EXAM'
,
'gitee'
);
-- ----------------------------
-- Table structure for sys_user_auths
...
...
@@ -1263,8 +1261,6 @@ CREATE TABLE `sys_user_auths` (
INSERT
INTO
`sys_user_auths`
VALUES
(
596329627606192128
,
596078038307966976
,
1
,
'admin'
,
'$2a$10$Lp3nTbBcPPcVCRNiRuqRteAzQfyjPzFWshT4ZyeTNeKMtPjzmPDHa'
,
'admin'
,
'2019-07-04 13:21:02'
,
'admin'
,
'2019-07-04 13:21:02'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user_auths`
VALUES
(
596329627648135168
,
596307222997372928
,
1
,
'student'
,
'$2a$10$czmVw4WF7Qt7RpwDJ4V4W.jkDKheEev63HlIsP31QnWHVOpSJz3au'
,
'admin'
,
'2019-07-04 13:21:03'
,
'admin'
,
'2019-07-04 13:21:03'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user_auths`
VALUES
(
596332387693105152
,
596332387600830464
,
1
,
'teacher'
,
'$2a$10$rRuYK1s8xKeGdRPefO1nMuE9rMH6yjmszznXySqcfuuXM/QSssZXW'
,
'admin'
,
'2019-07-04 13:32:01'
,
'admin'
,
'2019-07-04 13:32:01'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user_auths`
VALUES
(
627482274002243584
,
627482273154994176
,
1
,
'test'
,
'$2a$10$ekScY5JQjDByL./CUcHrjuM3HLagshRqZ.nBh6GYvYAIPzNNF0Uh2'
,
'admin'
,
'2019-09-28 12:30:32'
,
'admin'
,
'2019-09-28 12:30:32'
,
0
,
'EXAM'
,
'gitee'
);
INSERT
INTO
`sys_user_auths`
VALUES
(
630779164261224448
,
630779163304923136
,
1
,
'test2'
,
'$2a$10$9knBg6uoDSZiZi4DYGWuMuIfojpVYH1LGEmfBArDrTGzDYouVSteG'
,
'admin'
,
'2019-10-07 14:51:12'
,
'admin'
,
'2019-10-07 14:51:12'
,
0
,
'EXAM'
,
'gitee'
);
-- ----------------------------
-- Table structure for sys_user_role
...
...
@@ -1287,8 +1283,6 @@ INSERT INTO `sys_user_role` VALUES (624983494547869696, 624983493071474688, 6249
INSERT
INTO
`sys_user_role`
VALUES
(
625079311711473664
,
596332387600830500
,
596330074307956700
);
INSERT
INTO
`sys_user_role`
VALUES
(
625079323929481216
,
596078038307967000
,
596117256346406900
);
INSERT
INTO
`sys_user_role`
VALUES
(
627482325994835968
,
627482273154994200
,
596116511031169000
);
INSERT
INTO
`sys_user_role`
VALUES
(
630779074050134016
,
627482273154994176
,
596116511031169024
);
INSERT
INTO
`sys_user_role`
VALUES
(
631246209843073024
,
630779163304923136
,
596116511031169024
);
-- ----------------------------
-- Table structure for sys_user_student
...
...
docs/deploy/mysql/update/microservice-exam-user.sql
View file @
020d962b
...
...
@@ -3,3 +3,10 @@
-- ----------------------------
ALTER
TABLE
`microservice-user`
.
`sys_attachment`
ADD
COLUMN
`previewUrl`
varchar
(
255
)
NULL
COMMENT
'预览地址'
AFTER
`busi_type`
;
-- ----------------------------
-- 2019年10月17日21:52:01
-- ----------------------------
ALTER
TABLE
`dev_microservice_exam`
.
`exam_examination_subject`
MODIFY
COLUMN
`examination_id`
bigint
(
20
)
NULL
COMMENT
'考试ID'
AFTER
`id`
,
ADD
COLUMN
`category_id`
bigint
(
20
)
NULL
COMMENT
'分类'
AFTER
`examination_id`
;
\ No newline at end of file
frontend/spring-microservice-exam-ui/src/views/exam/course.vue
View file @
020d962b
...
...
@@ -280,16 +280,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/exam/exam.vue
View file @
020d962b
...
...
@@ -587,10 +587,9 @@ export default {
// 题目列表查询参数
listQuery
:
{
subjectName
:
undefined
,
categoryId
:
0
,
categoryId
:
''
,
sort
:
'id'
,
order
:
'ascending'
,
type
:
0
order
:
'ascending'
},
// 题目列表数据
list
:
[],
...
...
@@ -1056,16 +1055,16 @@ export default {
// 批量删除
handleDeletesSubject
()
{
if
(
checkMultipleSelect
(
this
.
multipleSubjectSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSubjectSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllSubject
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllSubject
(
ids
).
then
(()
=>
{
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'删除成功'
)
})
...
...
@@ -1093,11 +1092,11 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'success'
}).
then
(()
=>
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSubjectSelection
[
i
].
id
)
}
exportSubject
({
id
String
:
ids
,
examinationId
:
''
}).
then
(
response
=>
{
exportSubject
({
id
s
:
ids
,
examinationId
:
''
}).
then
(
response
=>
{
// 导出Excel
exportExcel
(
response
)
})
...
...
frontend/spring-microservice-exam-ui/src/views/exam/knowledge.vue
View file @
020d962b
...
...
@@ -290,16 +290,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/exam/subject.vue
View file @
020d962b
...
...
@@ -35,9 +35,6 @@
</div>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.subjectName"
placeholder=
"题目名称"
style=
"width: 200px;"
class=
"filter-item"
@
keyup
.
enter
.
native=
"handleFilter"
/>
<el-select
v-model=
"listQuery.type"
:placeholder=
"$t('table.type')"
style=
"width: 140px"
class=
"filter-item"
@
change=
"handleFilter"
>
<el-option
v-for=
"item in tempSubjectTypeList"
:key=
"item.type"
:label=
"item.name"
:value=
"item.type"
/>
</el-select>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
{{
$t
(
'table.search'
)
}}
</el-button>
<el-button
v-if=
"subject_bank_btn_add"
class=
"filter-item"
style=
"margin-left: 10px;"
icon=
"el-icon-check"
plain
@
click=
"handleCreateSubject"
>
{{
$t
(
'table.add'
)
}}
</el-button>
<el-button
v-if=
"subject_bank_btn_del"
class=
"filter-item"
icon=
"el-icon-delete"
plain
@
click=
"handleDeletesSubject"
>
{{
$t
(
'table.del'
)
}}
</el-button>
...
...
@@ -58,11 +55,6 @@
<span>
{{
scope
.
row
.
subjectName
|
subjectNameFilter
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.subject.category')"
min-width=
"60"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
categoryName
}}
</span>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('table.subject.type')"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
>
{{
scope
.
row
.
type
|
subjectTypeFilter
}}
</el-tag>
...
...
@@ -231,8 +223,7 @@ export default {
subjectName
:
undefined
,
categoryId
:
-
1
,
sort
:
'id'
,
order
:
'ascending'
,
type
:
0
order
:
'ascending'
},
treeData
:
[],
oExpandedKey
:
{
...
...
@@ -283,11 +274,6 @@ export default {
analysis
:
''
,
level
:
2
},
tempSubjectTypeList
:
[
{
name
:
'单选题'
,
type
:
0
},
{
name
:
'简答题'
,
type
:
1
},
{
name
:
'多选题'
,
type
:
3
}
],
// 选择题类型
tempChoiceType
:
[
{
type
:
0
,
name
:
'单选题'
},
...
...
@@ -567,40 +553,9 @@ export default {
}
},
resetTempSubject
(
serialNumber
,
score
)
{
// 新增上一次增加的题型
const
type
=
this
.
tempSubject
.
type
this
.
tempSubject
=
{
id
:
''
,
serialNumber
:
1
,
examinationId
:
''
,
categoryId
:
0
,
subjectName
:
''
,
type
:
type
,
choicesType
:
0
,
options
:
[
{
subjectChoicesId
:
''
,
optionName
:
'A'
,
optionContent
:
''
},
{
subjectChoicesId
:
''
,
optionName
:
'B'
,
optionContent
:
''
},
{
subjectChoicesId
:
''
,
optionName
:
'C'
,
optionContent
:
''
},
{
subjectChoicesId
:
''
,
optionName
:
'D'
,
optionContent
:
''
}
],
answer
:
{
subjectId
:
''
,
answer
:
''
,
answerType
:
''
,
score
:
''
},
score
:
5
,
analysis
:
''
,
level
:
2
}
// 默认序号
if
(
isNotEmpty
(
serialNumber
))
{
this
.
tempSubject
.
serialNumber
=
serialNumber
}
// 默认分数
if
(
isNotEmpty
(
score
))
{
this
.
tempSubject
.
score
=
score
const
ref
=
this
.
getSubjectRef
()
if
(
isNotEmpty
(
ref
))
{
ref
.
resetTempSubject
(
serialNumber
,
score
)
}
},
// 加载题目
...
...
@@ -640,6 +595,7 @@ export default {
const
subjectInfo
=
response
.
data
.
data
this
.
subjectFormStatus
=
'update'
this
.
dialogSubjectFormVisible
=
true
this
.
tempSubject
=
subjectInfo
// 切换到对应的题型选项卡
this
.
updateCurrentTag
(
subjectInfo
.
type
)
setTimeout
(()
=>
{
...
...
@@ -670,81 +626,73 @@ export default {
},
// 保存题目
createSubjectData
()
{
this
.
$refs
[
'dataSubjectForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// 绑定分类ID
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
addSubject
(
this
.
tempSubject
).
then
(()
=>
{
const
ref
=
this
.
getSubjectRef
()
if
(
ref
.
validate
()
)
{
let
subjectInfo
=
ref
.
getSubjectInfo
()
subjectInfo
.
categoryId
=
this
.
currentCategoryId
addSubject
(
subjectInfo
).
then
(()
=>
{
this
.
dialogSubjectFormVisible
=
false
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'创建成功'
)
})
}
})
},
// 更新题目
updateSubjectData
()
{
this
.
$refs
[
'dataSubjectForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
const
tempData
=
Object
.
assign
({},
this
.
tempSubject
)
putSubject
(
tempData
).
then
(()
=>
{
const
ref
=
this
.
getSubjectRef
()
if
(
ref
.
validate
()
)
{
const
subjectInfo
=
ref
.
getSubjectInfo
(
)
putSubject
(
subjectInfo
).
then
(()
=>
{
this
.
dialogSubjectFormVisible
=
false
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'更新成功'
)
})
}
})
},
// 更新并添加题目
updateAndAddSubjectData
()
{
this
.
$refs
[
'dataSubjectForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
const
ref
=
this
.
getSubjectRef
()
if
(
ref
.
validate
())
{
const
subjectInfo
=
ref
.
getSubjectInfo
()
if
(
isNotEmpty
(
this
.
currentCategoryId
))
{
// 绑定分类ID
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
subjectInfo
.
categoryId
=
this
.
currentCategoryId
}
const
tempData
=
Object
.
assign
({},
this
.
tempSubject
)
// 创建
if
(
this
.
subjectFormStatus
===
'create'
)
{
addSubject
(
tempData
).
then
(()
=>
{
this
.
resetTempSubject
(
parseInt
(
tempData
.
serialNumber
)
+
1
,
tempData
.
score
)
addSubject
(
subjectInfo
).
then
(()
=>
{
this
.
resetTempSubject
(
parseInt
(
subjectInfo
.
serialNumber
)
+
1
,
subjectInfo
.
score
)
this
.
subjectFormStatus
=
'create'
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataSubjectForm'
].
clearValidate
()
})
ref
.
clearValidate
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'创建成功'
)
})
}
else
{
// 更新
putSubject
(
tempData
).
then
(()
=>
{
this
.
resetTempSubject
(
parseInt
(
tempData
.
serialNumber
)
+
1
,
tempData
.
score
)
putSubject
(
subjectInfo
).
then
(()
=>
{
this
.
resetTempSubject
(
parseInt
(
subjectInfo
.
serialNumber
)
+
1
,
subjectInfo
.
score
)
this
.
subjectFormStatus
=
'create'
// 绑定分类ID
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'dataSubjectForm'
].
clearValidate
()
})
ref
.
clearValidate
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'更新成功'
)
})
}
}
})
},
// 批量删除
handleDeletesSubject
()
{
if
(
checkMultipleSelect
(
this
.
multipleSubjectSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSubjectSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllSubject
(
{
idString
:
ids
,
type
:
this
.
listQuery
.
type
}
).
then
(()
=>
{
delAllSubject
(
ids
).
then
(()
=>
{
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'删除成功'
)
})
...
...
@@ -780,11 +728,11 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'success'
}).
then
(()
=>
{
let
ids
=
''
for
(
let
i
=
0
;
i
<
this
.
multipleS
ubjectS
election
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
exportSubject
({
id
String
:
ids
,
categoryId
:
''
}).
then
(
response
=>
{
exportSubject
({
id
s
:
ids
,
categoryId
:
''
}).
then
(
response
=>
{
// 导出Excel
exportExcel
(
response
)
})
...
...
@@ -876,10 +824,5 @@ export default {
margin
:
5px
;
padding
:
6px
13px
;
}
.subject-info
{
padding-right
:
12px
;
}
.subject-tinymce
{
padding-left
:
12px
;
}
</
style
>
frontend/spring-microservice-exam-ui/src/views/monitor/log.vue
View file @
020d962b
...
...
@@ -281,16 +281,16 @@ export default {
},
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
$notify
({
...
...
frontend/spring-microservice-exam-ui/src/views/sys/client.vue
View file @
020d962b
...
...
@@ -329,16 +329,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/sys/menu.vue
View file @
020d962b
...
...
@@ -160,7 +160,7 @@ export default {
formAdd
:
true
,
formStatus
:
''
,
showElement
:
false
,
typeOptions
:
[
'0'
,
'1'
],
typeOptions
:
[
0
,
1
],
listQuery
:
{
name
:
undefined
},
...
...
@@ -183,7 +183,7 @@ export default {
icon
:
''
,
sort
:
30
,
component
:
undefined
,
type
:
'0'
,
type
:
0
,
path
:
undefined
,
remark
:
undefined
},
...
...
frontend/spring-microservice-exam-ui/src/views/sys/role.vue
View file @
020d962b
...
...
@@ -306,16 +306,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/sys/route.vue
View file @
020d962b
...
...
@@ -321,16 +321,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/sys/user.vue
View file @
020d962b
...
...
@@ -501,16 +501,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
@@ -556,11 +556,11 @@ export default {
})
}).
catch
(()
=>
{})
}
else
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
exportObj
(
{
idString
:
ids
}
).
then
(
response
=>
{
exportObj
(
ids
).
then
(
response
=>
{
// 导出Excel
exportExcel
(
response
)
})
...
...
frontend/spring-microservice-exam-ui/src/views/tenant/tenant.vue
View file @
020d962b
...
...
@@ -283,16 +283,16 @@ export default {
// 批量删除
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
...
...
gateway-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9180
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
gateway-service/pom.xml
View file @
020d962b
...
...
@@ -87,7 +87,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
gateway-service/src/main/resources/bootstrap.yml
View file @
020d962b
...
...
@@ -3,6 +3,8 @@
spring
:
application
:
name
:
gateway-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
# 使用consul作为注册中心
consul
:
...
...
gateway-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
modules/auth-service-parent/auth-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9182
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/auth-service-parent/auth-service/pom.xml
View file @
020d962b
...
...
@@ -134,7 +134,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
modules/auth-service-parent/auth-service/src/main/resources/bootstrap.yml
View file @
020d962b
...
...
@@ -3,6 +3,8 @@
spring
:
application
:
name
:
auth-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
# 使用consul作为注册中心
consul
:
...
...
modules/auth-service-parent/auth-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
modules/auth-service-parent/auth-service/src/main/resources/mapper/OauthClientMapper.xml
View file @
020d962b
...
...
@@ -184,7 +184,7 @@
UPDATE oauth_client_details SET
del_flag = 1
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service-api/src/main/java/com/github/tangyi/exam/api/constants/ExamSubjectConstant.java
View file @
020d962b
...
...
@@ -20,4 +20,9 @@ public class ExamSubjectConstant {
* 简答题
*/
public
static
final
Integer
SUBJECT_TYPE_QAS
=
1
;
/**
* 公共分类
*/
public
static
final
Integer
PUBLIC_CATEGORY
=
0
;
}
modules/exam-service-parent/exam-service-api/src/main/java/com/github/tangyi/exam/api/module/ExaminationSubject.java
View file @
020d962b
...
...
@@ -20,6 +20,12 @@ public class ExaminationSubject extends BaseEntity<ExaminationSubject> {
private
Long
examinationId
;
/**
* 分类ID
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
categoryId
;
/**
* 题目ID
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
...
...
modules/exam-service-parent/exam-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9184
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/exam-service-parent/exam-service/pom.xml
View file @
020d962b
...
...
@@ -123,7 +123,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/controller/SubjectCategoryController.java
View file @
020d962b
...
...
@@ -8,6 +8,7 @@ import com.github.tangyi.common.core.utils.TreeUtil;
import
com.github.tangyi.common.core.web.BaseController
;
import
com.github.tangyi.common.log.annotation.Log
;
import
com.github.tangyi.common.security.constant.SecurityConstant
;
import
com.github.tangyi.exam.api.constants.ExamSubjectConstant
;
import
com.github.tangyi.exam.api.dto.SubjectCategoryDto
;
import
com.github.tangyi.exam.api.module.SubjectCategory
;
import
com.github.tangyi.exam.service.SubjectCategoryService
;
...
...
@@ -94,6 +95,7 @@ public class SubjectCategoryController extends BaseController {
@Log
(
"新增题目分类"
)
public
ResponseBean
<
Boolean
>
addSubjectCategory
(
@RequestBody
@Valid
SubjectCategory
subjectCategory
)
{
subjectCategory
.
setCommonValue
(
SysUtil
.
getUser
(),
SysUtil
.
getSysCode
(),
SysUtil
.
getTenantCode
());
subjectCategory
.
setType
(
ExamSubjectConstant
.
PUBLIC_CATEGORY
);
return
new
ResponseBean
<>(
categoryService
.
insert
(
subjectCategory
)
>
0
);
}
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/controller/SubjectController.java
View file @
020d962b
...
...
@@ -94,8 +94,6 @@ public class SubjectController extends BaseController {
@RequestParam
(
value
=
CommonConstant
.
ORDER
,
required
=
false
,
defaultValue
=
CommonConstant
.
PAGE_ORDER_DEFAULT
)
String
order
,
SubjectDto
subject
)
{
subject
.
setTenantCode
(
SysUtil
.
getTenantCode
());
if
(
CommonConstant
.
ROOT
.
equals
(
subject
.
getCategoryId
()))
subject
.
setCategoryId
(
null
);
return
subjectService
.
findPage
(
PageUtil
.
pageInfo
(
pageNum
,
pageSize
,
sort
,
order
),
subject
);
}
...
...
@@ -255,7 +253,6 @@ public class SubjectController extends BaseController {
* 批量删除
*
* @param ids ids
* @param type type
* @return ResponseBean
* @author tangyi
* @date 2018/12/04 9:55
...
...
@@ -263,13 +260,10 @@ public class SubjectController extends BaseController {
@PostMapping
(
"deleteAll"
)
@PreAuthorize
(
"hasAuthority('exam:exam:subject:del') or hasAnyRole('"
+
SecurityConstant
.
ROLE_ADMIN
+
"')"
)
@ApiOperation
(
value
=
"批量删除题目"
,
notes
=
"根据题目id批量删除题目"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"题目ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"题目类型"
,
dataType
=
"Integer"
,
example
=
"3"
)
})
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"题目ID"
,
dataType
=
"Long"
)
@Log
(
"批量删除题目"
)
public
ResponseBean
<
Boolean
>
deleteSubjects
(
@RequestBody
Long
[]
ids
,
@RequestParam
Integer
type
)
{
return
new
ResponseBean
<>(
subjectService
.
physicalDeleteAll
(
type
,
ids
)
>
0
);
public
ResponseBean
<
Boolean
>
deleteSubjects
(
@RequestBody
Long
[]
ids
)
{
return
new
ResponseBean
<>(
subjectService
.
physicalDeleteAll
(
ids
)
>
0
);
}
/**
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/service/SubjectChoicesService.java
View file @
020d962b
...
...
@@ -298,6 +298,7 @@ public class SubjectChoicesService extends CrudService<SubjectChoicesMapper, Sub
SubjectChoices
subjectChoices
=
new
SubjectChoices
();
BeanUtils
.
copyProperties
(
subjectDto
,
subjectChoices
);
subjectChoices
.
setAnswer
(
subjectDto
.
getAnswer
().
getAnswer
());
subjectChoices
.
setChoicesType
(
subjectDto
.
getType
());
return
this
.
insert
(
subjectChoices
);
}
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/service/SubjectService.java
View file @
020d962b
...
...
@@ -2,6 +2,7 @@ package com.github.tangyi.exam.service;
import
com.github.pagehelper.PageInfo
;
import
com.github.tangyi.common.core.exceptions.CommonException
;
import
com.github.tangyi.common.core.utils.PageUtil
;
import
com.github.tangyi.common.core.utils.SysUtil
;
import
com.github.tangyi.exam.api.constants.ExamSubjectConstant
;
import
com.github.tangyi.exam.api.dto.SubjectDto
;
...
...
@@ -13,6 +14,7 @@ import com.github.tangyi.exam.utils.SubjectUtil;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -142,7 +144,22 @@ public class SubjectService {
* @date 2019/06/16 18:12
*/
public
PageInfo
<
SubjectDto
>
findPage
(
PageInfo
pageInfo
,
SubjectDto
subjectDto
)
{
return
subjectService
(
subjectDto
.
getType
()).
findSubjectPage
(
pageInfo
,
subjectDto
);
ExaminationSubject
examinationSubject
=
new
ExaminationSubject
();
examinationSubject
.
setCategoryId
(
subjectDto
.
getCategoryId
());
examinationSubject
.
setExaminationId
(
subjectDto
.
getExaminationId
());
PageInfo
<
ExaminationSubject
>
examinationSubjectPageInfo
=
examinationSubjectService
.
findPage
(
pageInfo
,
examinationSubject
);
List
<
SubjectDto
>
subjectDtos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
examinationSubjectPageInfo
.
getList
()))
{
examinationSubjectPageInfo
.
getList
().
forEach
(
tempExaminationSubject
->
{
SubjectDto
tempSubjectDto
=
subjectService
(
tempExaminationSubject
.
getType
()).
getSubject
(
tempExaminationSubject
.
getSubjectId
());
if
(
tempSubjectDto
!=
null
)
subjectDtos
.
add
(
tempSubjectDto
);
});
}
PageInfo
<
SubjectDto
>
subjectDtoPageInfo
=
new
PageInfo
<>();
PageUtil
.
copyProperties
(
examinationSubjectPageInfo
,
subjectDtoPageInfo
);
subjectDtoPageInfo
.
setList
(
subjectDtos
);
return
subjectDtoPageInfo
;
}
/**
...
...
@@ -173,6 +190,7 @@ public class SubjectService {
examinationSubject
.
setCommonValue
(
subjectDto
.
getCreator
(),
subjectDto
.
getApplicationCode
(),
subjectDto
.
getTenantCode
());
examinationSubject
.
setExaminationId
(
subjectDto
.
getExaminationId
());
examinationSubject
.
setCategoryId
(
subjectDto
.
getCategoryId
());
examinationSubject
.
setSubjectId
(
subjectDto
.
getId
());
examinationSubject
.
setType
(
subjectDto
.
getType
());
examinationSubjectService
.
insert
(
examinationSubject
);
...
...
@@ -246,15 +264,29 @@ public class SubjectService {
/**
* 物理批量删除
*
* @param type type
* @param ids ids
* @return int
* @author tangyi
* @date 2019/06/16 22:52
*/
@Transactional
public
int
physicalDeleteAll
(
Integer
type
,
Long
[]
ids
)
{
return
subjectService
(
type
).
physicalDeleteAllSubject
(
ids
);
public
int
physicalDeleteAll
(
Long
[]
ids
)
{
if
(
ArrayUtils
.
isNotEmpty
(
ids
))
{
ExaminationSubject
examinationSubject
=
new
ExaminationSubject
();
SubjectDto
subjectDto
=
new
SubjectDto
();
for
(
Long
id
:
ids
)
{
examinationSubject
.
setSubjectId
(
id
);
List
<
ExaminationSubject
>
examinationSubjects
=
examinationSubjectService
.
findListBySubjectId
(
examinationSubject
);
if
(
CollectionUtils
.
isNotEmpty
(
examinationSubjects
))
{
examinationSubjects
.
forEach
(
tempExaminationSubject
->
{
subjectDto
.
setId
(
tempExaminationSubject
.
getSubjectId
());
subjectService
(
tempExaminationSubject
.
getType
()).
physicalDeleteSubject
(
subjectDto
);
examinationSubjectService
.
delete
(
tempExaminationSubject
);
});
}
}
}
return
1
;
}
/**
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/service/SubjectShortAnswerService.java
View file @
020d962b
...
...
@@ -169,6 +169,7 @@ public class SubjectShortAnswerService extends CrudService<SubjectShortAnswerMap
public
int
insertSubject
(
SubjectDto
subjectDto
)
{
SubjectShortAnswer
subjectShortAnswer
=
new
SubjectShortAnswer
();
BeanUtils
.
copyProperties
(
subjectDto
,
subjectShortAnswer
);
subjectShortAnswer
.
setAnswer
(
subjectDto
.
getAnswer
().
getAnswer
());
return
this
.
insert
(
subjectShortAnswer
);
}
...
...
modules/exam-service-parent/exam-service/src/main/resources/bootstrap.yml
View file @
020d962b
...
...
@@ -3,6 +3,8 @@
spring
:
application
:
name
:
exam-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
# 使用consul作为注册中心
consul
:
...
...
modules/exam-service-parent/exam-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
modules/exam-service-parent/exam-service/src/main/resources/mapper/CourseMapper.xml
View file @
020d962b
...
...
@@ -135,7 +135,7 @@
UPDATE exam_course SET
del_flag = 1
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/ExaminationMapper.xml
View file @
020d962b
...
...
@@ -177,7 +177,7 @@
<delete
id=
"deleteAll"
>
UPDATE exam_examination SET del_flag = 1 WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/ExaminationSubjectMapper.xml
View file @
020d962b
...
...
@@ -4,6 +4,7 @@
<resultMap
id=
"examinationSubjectResultMap"
type=
"com.github.tangyi.exam.api.module.ExaminationSubject"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"examination_id"
property=
"examinationId"
/>
<result
column=
"category_id"
property=
"categoryId"
/>
<result
column=
"subject_id"
property=
"subjectId"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"application_code"
property=
"applicationCode"
/>
...
...
@@ -13,6 +14,7 @@
<sql
id=
"examinationSubjectColumns"
>
a.id,
a.examination_id,
a.category_id,
a.subject_id,
a.type,
a.application_code,
...
...
@@ -21,15 +23,23 @@
<!-- where 条件 -->
<sql
id=
"whereColumnList"
>
<if
test=
"examinationId != null and examinationId != ''"
>
and a.examination_id = #{examinationId}
</if>
<if
test=
"subjectId != null and subjectId != ''"
>
and a.subject_id = #{subjectId}
</if>
<choose>
<when
test=
"categoryId == -1"
>
and a.category_id != ''
</when>
<when
test=
"categoryId != '' and categoryId != null"
>
and a.category_id = #{categoryId}
</when>
</choose>
<if
test=
"type != null and type != ''"
>
and a.type = #{type}
</if>
<if
test=
"tenantCode != null and tenantCode != ''"
>
and a.tenant_code = #{tenantCode}
</if>
</sql>
<select
id=
"get"
resultMap=
"examinationSubjectResultMap"
>
...
...
@@ -51,7 +61,7 @@
<select
id=
"findList"
resultMap=
"examinationSubjectResultMap"
>
SELECT
<include
refid=
"examinationSubjectColumns"
/>
FROM exam_examination_subject a WHERE
a.examination_id = #{examinationId}
FROM exam_examination_subject a WHERE
1=1
<include
refid=
"whereColumnList"
/>
ORDER BY a.subject_id ASC
</select>
...
...
@@ -91,6 +101,7 @@
insert into exam_examination_subject (
id,
examination_id,
category_id,
subject_id,
type,
application_code,
...
...
@@ -98,6 +109,7 @@
) values (
#{id},
#{examinationId},
#{categoryId},
#{subjectId},
#{type},
#{applicationCode},
...
...
@@ -110,6 +122,9 @@
<if
test=
"examinationId != null"
>
examination_id = #{examinationId},
</if>
<if
test=
"categoryId != null"
>
category_id = #{categoryId},
</if>
<if
test=
"subjectId != null"
>
subject_id = #{subjectId},
</if>
...
...
@@ -132,7 +147,7 @@
<!-- 物理删除 -->
<delete
id=
"deleteAll"
>
DELETE FROM exam_examination_subject WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/KnowledgeMapper.xml
View file @
020d962b
...
...
@@ -124,7 +124,7 @@
<delete
id=
"deleteAll"
>
UPDATE exam_knowledge SET del_flag = 1 WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectChoicesMapper.xml
View file @
020d962b
...
...
@@ -160,7 +160,7 @@
<!-- 物理删除 -->
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_choices WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectJudgementMapper.xml
View file @
020d962b
...
...
@@ -140,7 +140,7 @@
<delete
id=
"deleteAll"
>
UPDATE exam_subject_judgement SET del_flag = 1 WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
@@ -153,7 +153,7 @@
<!-- 物理删除 -->
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_judgement WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectOptionMapper.xml
View file @
020d962b
...
...
@@ -155,7 +155,7 @@
<delete
id=
"deleteAll"
>
UPDATE exam_subject_option SET del_flag = 1 WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
@@ -163,7 +163,7 @@
<!-- 物理批量删除 -->
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_option WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectShortAnswerMapper.xml
View file @
020d962b
...
...
@@ -140,7 +140,7 @@
<delete
id=
"deleteAll"
>
UPDATE exam_subject_short_answer SET del_flag = 1 WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
@@ -153,7 +153,7 @@
<!-- 物理删除 -->
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_short_answer WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/msc-service-parent/msc-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9185
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/msc-service-parent/msc-service/pom.xml
View file @
020d962b
...
...
@@ -100,7 +100,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
modules/msc-service-parent/msc-service/src/main/resources/bootstrap.yml
View file @
020d962b
...
...
@@ -3,6 +3,8 @@
spring
:
application
:
name
:
msc-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
# 使用consul作为注册中心
consul
:
...
...
modules/msc-service-parent/msc-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
modules/user-service-parent/user-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9185
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/user-service-parent/user-service/pom.xml
View file @
020d962b
...
...
@@ -129,7 +129,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
modules/user-service-parent/user-service/src/main/java/com/github/tangyi/user/service/MenuService.java
View file @
020d962b
...
...
@@ -298,7 +298,7 @@ public class MenuService extends CrudService<MenuMapper, Menu> {
// 租户菜单
tenantMenus
.
forEach
(
tenantMenu
->
{
Optional
<
Menu
>
exist
=
userMenus
.
stream
()
.
filter
(
userMenu
->
userMenu
.
getName
().
equals
(
tenantMenu
.
getName
())).
findFirst
();
.
filter
(
userMenu
->
userMenu
.
getName
().
equals
(
tenantMenu
.
getName
())
&&
userMenu
.
getParentId
().
equals
(
tenantMenu
.
getParentId
())
).
findFirst
();
if
(!
exist
.
isPresent
())
{
userMenus
.
add
(
tenantMenu
);
}
...
...
modules/user-service-parent/user-service/src/main/resources/bootstrap.yml
View file @
020d962b
...
...
@@ -3,6 +3,8 @@
spring
:
application
:
name
:
user-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
# 使用consul作为注册中心
consul
:
...
...
modules/user-service-parent/user-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
modules/user-service-parent/user-service/src/main/resources/mapper/AttachmentMapper.xml
View file @
020d962b
...
...
@@ -165,7 +165,7 @@
UPDATE sys_attachment SET
del_flag = 1
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/LogMapper.xml
View file @
020d962b
...
...
@@ -105,7 +105,7 @@
<delete
id=
"deleteAll"
>
DELETE FROM sys_log WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/RoleMapper.xml
View file @
020d962b
...
...
@@ -161,7 +161,7 @@
UPDATE sys_role SET
del_flag = 1
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/StudentMapper.xml
View file @
020d962b
...
...
@@ -160,7 +160,7 @@
update sys_student SET
del_flag = 1
where id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/TenantMapper.xml
View file @
020d962b
...
...
@@ -115,7 +115,7 @@
update sys_tenant SET
del_flag = 1
where id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/UserAuthsMapper.xml
View file @
020d962b
...
...
@@ -195,7 +195,7 @@
<delete
id=
"deleteAll"
>
DELETE FROM sys_user_auths WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/UserMapper.xml
View file @
020d962b
...
...
@@ -254,7 +254,7 @@
<delete
id=
"deleteAll"
>
DELETE FROM sys_user
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/UserStudentMapper.xml
View file @
020d962b
...
...
@@ -80,7 +80,7 @@
<delete
id=
"deleteAll"
>
DELETE FROM sys_user_student ID in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</delete>
...
...
monitor-service/Dockerfile
View file @
020d962b
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9186
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -
Dspring.profiles.active=${PROFILE} -
jar /opt/app.jar
ENTRYPOINT
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Asia/Shanghai -Dfile.encoding=UTF-8 -jar /opt/app.jar
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
monitor-service/pom.xml
View file @
020d962b
...
...
@@ -86,7 +86,6 @@
</executions>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
...
...
monitor-service/src/main/resources/bootstrap.yml
View file @
020d962b
...
...
@@ -3,6 +3,8 @@
spring
:
application
:
name
:
monitor-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
# 使用consul作为注册中心
consul
:
...
...
monitor-service/src/main/resources/logback.xml
View file @
020d962b
...
...
@@ -39,18 +39,24 @@
</filter>
</appender>
<!-- 输出到logstash的appender -->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- logstash的IP和端口,从环境变量注入 -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
<logger
name=
"com.github.tangyi"
level=
"debug"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<!--<appender-ref ref="logstash"/>-->
</logger>
</configuration>
pom.xml
View file @
020d962b
...
...
@@ -30,7 +30,7 @@
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.1.
8
.RELEASE
</version>
<version>
2.1.
9
.RELEASE
</version>
<relativePath/>
<!-- lookup parent from repository -->
</parent>
...
...
@@ -45,7 +45,7 @@
<maven.compiler.source>
${java.version}
</maven.compiler.source>
<maven.compiler.target>
${java.version}
</maven.compiler.target>
<!-- spring boot、spring cloud -->
<spring-boot.version>
2.1.
8
.RELEASE
</spring-boot.version>
<spring-boot.version>
2.1.
9
.RELEASE
</spring-boot.version>
<spring-cloud.version>
Greenwich.SR3
</spring-cloud.version>
<security.auth.version>
2.3.5.RELEASE
</security.auth.version>
<spring-boot-admin.version>
2.1.6
</spring-boot-admin.version>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment