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
29716af8
Commit
29716af8
authored
Oct 20, 2019
by
tangyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
1fdebf0e
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 @
29716af8
...
@@ -70,7 +70,6 @@ public class SysUtil {
...
@@ -70,7 +70,6 @@ public class SysUtil {
tenantCode
=
getCurrentUserTenantCode
();
tenantCode
=
getCurrentUserTenantCode
();
if
(
StringUtils
.
isBlank
(
tenantCode
))
if
(
StringUtils
.
isBlank
(
tenantCode
))
tenantCode
=
SecurityConstant
.
DEFAULT_TENANT_CODE
;
tenantCode
=
SecurityConstant
.
DEFAULT_TENANT_CODE
;
log
.
debug
(
"租户code:{}"
,
tenantCode
);
return
tenantCode
;
return
tenantCode
;
}
}
...
...
config-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9181
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
config-service/pom.xml
View file @
29716af8
...
@@ -69,7 +69,6 @@
...
@@ -69,7 +69,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
config-service/src/main/resources/application-prd.yml
0 → 100644
View file @
29716af8
# 生产环境的配置,采用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 @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
docs/deploy/docker-compose-nginx.yml
View file @
29716af8
...
@@ -32,6 +32,24 @@ services:
...
@@ -32,6 +32,24 @@ services:
networks
:
networks
:
-
net
-
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
:
networks
:
net
:
net
:
driver
:
bridge
driver
:
bridge
...
...
docs/deploy/docker-compose.env
View file @
29716af8
...
@@ -73,6 +73,3 @@ TZ=Asia/Shanghai
...
@@ -73,6 +73,3 @@ TZ=Asia/Shanghai
# elk配置
# elk配置
ELK_DESTINATION=localhost:5044
ELK_DESTINATION=localhost:5044
# 日志级别
LOGGING_LEVEL=error
\ No newline at end of file
docs/deploy/mysql/init/microservice_auth.sql
View file @
29716af8
...
@@ -21,9 +21,9 @@ CREATE TABLE `oauth_client_details` (
...
@@ -21,9 +21,9 @@ CREATE TABLE `oauth_client_details` (
`additional_information`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
,
`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
,
`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
'创建人'
,
`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
'修改人'
,
`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
'删除标记'
,
`del_flag`
tinyint
(
4
)
NOT
NULL
COMMENT
'删除标记'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
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
'租户编号'
,
`tenant_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'租户编号'
,
...
...
docs/deploy/mysql/init/microservice_exam.sql
View file @
29716af8
This diff is collapsed.
Click to expand it.
docs/deploy/mysql/init/microservice_gateway.sql
View file @
29716af8
...
@@ -18,7 +18,7 @@ CREATE TABLE `sys_route` (
...
@@ -18,7 +18,7 @@ CREATE TABLE `sys_route` (
`creator`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
,
`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
'创建时间'
,
`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
'修改人'
,
`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
'删除标记'
,
`del_flag`
tinyint
(
4
)
NOT
NULL
DEFAULT
0
COMMENT
'删除标记'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'系统编号'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'系统编号'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
...
...
docs/deploy/mysql/init/microservice_user.sql
View file @
29716af8
...
@@ -19,7 +19,7 @@ CREATE TABLE `sys_attachment` (
...
@@ -19,7 +19,7 @@ CREATE TABLE `sys_attachment` (
`creator`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'创建人'
,
`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
'创建时间'
,
`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
'修改人'
,
`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
'删除标记'
,
`del_flag`
tinyint
(
4
)
NULL
DEFAULT
NULL
COMMENT
'删除标记'
,
`application_code`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
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
'租户编号'
,
`tenant_code`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'租户编号'
,
...
@@ -121,9 +121,9 @@ CREATE TABLE `sys_menu` (
...
@@ -121,9 +121,9 @@ CREATE TABLE `sys_menu` (
`type`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'类型'
,
`type`
varchar
(
20
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'类型'
,
`data_level`
int
(
11
)
NULL
DEFAULT
NULL
,
`data_level`
int
(
11
)
NULL
DEFAULT
NULL
,
`creator`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
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
,
`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
,
`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
,
`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
'模块'
,
`component`
varchar
(
255
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'模块'
,
...
@@ -1183,7 +1183,7 @@ CREATE TABLE `sys_tenant` (
...
@@ -1183,7 +1183,7 @@ CREATE TABLE `sys_tenant` (
`creator`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
''
,
`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
),
`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
''
,
`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
'删除标记'
,
`del_flag`
tinyint
(
4
)
NOT
NULL
DEFAULT
0
COMMENT
'删除标记'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'租户信息表'
ROW_FORMAT
=
Compact
;
)
ENGINE
=
InnoDB
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
COMMENT
=
'租户信息表'
ROW_FORMAT
=
Compact
;
...
@@ -1234,8 +1234,6 @@ CREATE TABLE `sys_user` (
...
@@ -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
(
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
(
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
(
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
-- Table structure for sys_user_auths
...
@@ -1263,8 +1261,6 @@ CREATE TABLE `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
(
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
(
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
(
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
-- Table structure for sys_user_role
...
@@ -1287,8 +1283,6 @@ INSERT INTO `sys_user_role` VALUES (624983494547869696, 624983493071474688, 6249
...
@@ -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
(
625079311711473664
,
596332387600830500
,
596330074307956700
);
INSERT
INTO
`sys_user_role`
VALUES
(
625079323929481216
,
596078038307967000
,
596117256346406900
);
INSERT
INTO
`sys_user_role`
VALUES
(
625079323929481216
,
596078038307967000
,
596117256346406900
);
INSERT
INTO
`sys_user_role`
VALUES
(
627482325994835968
,
627482273154994200
,
596116511031169000
);
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
-- Table structure for sys_user_student
...
...
docs/deploy/mysql/update/microservice-exam-user.sql
View file @
29716af8
...
@@ -3,3 +3,10 @@
...
@@ -3,3 +3,10 @@
-- ----------------------------
-- ----------------------------
ALTER
TABLE
`microservice-user`
.
`sys_attachment`
ALTER
TABLE
`microservice-user`
.
`sys_attachment`
ADD
COLUMN
`previewUrl`
varchar
(
255
)
NULL
COMMENT
'预览地址'
AFTER
`busi_type`
;
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 @
29716af8
...
@@ -280,16 +280,16 @@ export default {
...
@@ -280,16 +280,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/exam/exam.vue
View file @
29716af8
...
@@ -587,10 +587,9 @@ export default {
...
@@ -587,10 +587,9 @@ export default {
// 题目列表查询参数
// 题目列表查询参数
listQuery
:
{
listQuery
:
{
subjectName
:
undefined
,
subjectName
:
undefined
,
categoryId
:
0
,
categoryId
:
''
,
sort
:
'id'
,
sort
:
'id'
,
order
:
'ascending'
,
order
:
'ascending'
type
:
0
},
},
// 题目列表数据
// 题目列表数据
list
:
[],
list
:
[],
...
@@ -1056,16 +1055,16 @@ export default {
...
@@ -1056,16 +1055,16 @@ export default {
// 批量删除
// 批量删除
handleDeletesSubject
()
{
handleDeletesSubject
()
{
if
(
checkMultipleSelect
(
this
.
multipleSubjectSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSubjectSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSubjectSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllSubject
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllSubject
(
ids
).
then
(()
=>
{
this
.
handleSubjectManagement
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
})
})
...
@@ -1093,11 +1092,11 @@ export default {
...
@@ -1093,11 +1092,11 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'success'
type
:
'success'
}).
then
(()
=>
{
}).
then
(()
=>
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
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
// 导出Excel
exportExcel
(
response
)
exportExcel
(
response
)
})
})
...
...
frontend/spring-microservice-exam-ui/src/views/exam/knowledge.vue
View file @
29716af8
...
@@ -290,16 +290,16 @@ export default {
...
@@ -290,16 +290,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/exam/subject.vue
View file @
29716af8
...
@@ -35,9 +35,6 @@
...
@@ -35,9 +35,6 @@
</div>
</div>
<div
class=
"filter-container"
>
<div
class=
"filter-container"
>
<el-input
v-model=
"listQuery.subjectName"
placeholder=
"题目名称"
style=
"width: 200px;"
class=
"filter-item"
@
keyup
.
enter
.
native=
"handleFilter"
/>
<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-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_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>
<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 @@
...
@@ -58,11 +55,6 @@
<span>
{{
scope
.
row
.
subjectName
|
subjectNameFilter
}}
</span>
<span>
{{
scope
.
row
.
subjectName
|
subjectNameFilter
}}
</span>
</
template
>
</
template
>
</el-table-column>
</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"
>
<el-table-column
:label=
"$t('table.subject.type')"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-tag
type=
"success"
>
{{
scope
.
row
.
type
|
subjectTypeFilter
}}
</el-tag>
<el-tag
type=
"success"
>
{{
scope
.
row
.
type
|
subjectTypeFilter
}}
</el-tag>
...
@@ -231,8 +223,7 @@ export default {
...
@@ -231,8 +223,7 @@ export default {
subjectName
:
undefined
,
subjectName
:
undefined
,
categoryId
:
-
1
,
categoryId
:
-
1
,
sort
:
'id'
,
sort
:
'id'
,
order
:
'ascending'
,
order
:
'ascending'
type
:
0
},
},
treeData
:
[],
treeData
:
[],
oExpandedKey
:
{
oExpandedKey
:
{
...
@@ -283,11 +274,6 @@ export default {
...
@@ -283,11 +274,6 @@ export default {
analysis
:
''
,
analysis
:
''
,
level
:
2
level
:
2
},
},
tempSubjectTypeList
:
[
{
name
:
'单选题'
,
type
:
0
},
{
name
:
'简答题'
,
type
:
1
},
{
name
:
'多选题'
,
type
:
3
}
],
// 选择题类型
// 选择题类型
tempChoiceType
:
[
tempChoiceType
:
[
{
type
:
0
,
name
:
'单选题'
},
{
type
:
0
,
name
:
'单选题'
},
...
@@ -567,40 +553,9 @@ export default {
...
@@ -567,40 +553,9 @@ export default {
}
}
},
},
resetTempSubject
(
serialNumber
,
score
)
{
resetTempSubject
(
serialNumber
,
score
)
{
// 新增上一次增加的题型
const
ref
=
this
.
getSubjectRef
()
const
type
=
this
.
tempSubject
.
type
if
(
isNotEmpty
(
ref
))
{
this
.
tempSubject
=
{
ref
.
resetTempSubject
(
serialNumber
,
score
)
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
}
}
},
},
// 加载题目
// 加载题目
...
@@ -640,6 +595,7 @@ export default {
...
@@ -640,6 +595,7 @@ export default {
const
subjectInfo
=
response
.
data
.
data
const
subjectInfo
=
response
.
data
.
data
this
.
subjectFormStatus
=
'update'
this
.
subjectFormStatus
=
'update'
this
.
dialogSubjectFormVisible
=
true
this
.
dialogSubjectFormVisible
=
true
this
.
tempSubject
=
subjectInfo
// 切换到对应的题型选项卡
// 切换到对应的题型选项卡
this
.
updateCurrentTag
(
subjectInfo
.
type
)
this
.
updateCurrentTag
(
subjectInfo
.
type
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -670,81 +626,73 @@ export default {
...
@@ -670,81 +626,73 @@ export default {
},
},
// 保存题目
// 保存题目
createSubjectData
()
{
createSubjectData
()
{
this
.
$refs
[
'dataSubjectForm'
].
validate
((
valid
)
=>
{
const
ref
=
this
.
getSubjectRef
()
if
(
valid
)
{
if
(
ref
.
validate
()
)
{
// 绑定分类ID
let
subjectInfo
=
ref
.
getSubjectInfo
()
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
subjectInfo
.
categoryId
=
this
.
currentCategoryId
addSubject
(
this
.
tempSubject
).
then
(()
=>
{
addSubject
(
subjectInfo
).
then
(()
=>
{
this
.
dialogSubjectFormVisible
=
false
this
.
dialogSubjectFormVisible
=
false
this
.
handleSubjectManagement
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'创建成功'
)
notifySuccess
(
this
,
'创建成功'
)
})
})
}
}
})
},
},
// 更新题目
// 更新题目
updateSubjectData
()
{
updateSubjectData
()
{
this
.
$refs
[
'dataSubjectForm'
].
validate
((
valid
)
=>
{
const
ref
=
this
.
getSubjectRef
()
if
(
valid
)
{
if
(
ref
.
validate
()
)
{
const
tempData
=
Object
.
assign
({},
this
.
tempSubject
)
const
subjectInfo
=
ref
.
getSubjectInfo
(
)
putSubject
(
tempData
).
then
(()
=>
{
putSubject
(
subjectInfo
).
then
(()
=>
{
this
.
dialogSubjectFormVisible
=
false
this
.
dialogSubjectFormVisible
=
false
this
.
handleSubjectManagement
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'更新成功'
)
notifySuccess
(
this
,
'更新成功'
)
})
})
}
}
})
},
},
// 更新并添加题目
// 更新并添加题目
updateAndAddSubjectData
()
{
updateAndAddSubjectData
()
{
this
.
$refs
[
'dataSubjectForm'
].
validate
((
valid
)
=>
{
const
ref
=
this
.
getSubjectRef
()
if
(
valid
)
{
if
(
ref
.
validate
())
{
const
subjectInfo
=
ref
.
getSubjectInfo
()
if
(
isNotEmpty
(
this
.
currentCategoryId
))
{
if
(
isNotEmpty
(
this
.
currentCategoryId
))
{
// 绑定分类ID
subjectInfo
.
categoryId
=
this
.
currentCategoryId
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
}
}
const
tempData
=
Object
.
assign
({},
this
.
tempSubject
)
// 创建
// 创建
if
(
this
.
subjectFormStatus
===
'create'
)
{
if
(
this
.
subjectFormStatus
===
'create'
)
{
addSubject
(
tempData
).
then
(()
=>
{
addSubject
(
subjectInfo
).
then
(()
=>
{
this
.
resetTempSubject
(
parseInt
(
tempData
.
serialNumber
)
+
1
,
tempData
.
score
)
this
.
resetTempSubject
(
parseInt
(
subjectInfo
.
serialNumber
)
+
1
,
subjectInfo
.
score
)
this
.
subjectFormStatus
=
'create'
this
.
subjectFormStatus
=
'create'
this
.
$nextTick
(()
=>
{
ref
.
clearValidate
()
this
.
$refs
[
'dataSubjectForm'
].
clearValidate
()
})
this
.
handleSubjectManagement
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'创建成功'
)
notifySuccess
(
this
,
'创建成功'
)
})
})
}
else
{
}
else
{
// 更新
// 更新
putSubject
(
tempData
).
then
(()
=>
{
putSubject
(
subjectInfo
).
then
(()
=>
{
this
.
resetTempSubject
(
parseInt
(
tempData
.
serialNumber
)
+
1
,
tempData
.
score
)
this
.
resetTempSubject
(
parseInt
(
subjectInfo
.
serialNumber
)
+
1
,
subjectInfo
.
score
)
this
.
subjectFormStatus
=
'create'
this
.
subjectFormStatus
=
'create'
// 绑定分类ID
// 绑定分类ID
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
this
.
tempSubject
.
categoryId
=
this
.
currentCategoryId
this
.
$nextTick
(()
=>
{
ref
.
clearValidate
()
this
.
$refs
[
'dataSubjectForm'
].
clearValidate
()
})
this
.
handleSubjectManagement
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'更新成功'
)
notifySuccess
(
this
,
'更新成功'
)
})
})
}
}
}
}
})
},
},
// 批量删除
// 批量删除
handleDeletesSubject
()
{
handleDeletesSubject
()
{
if
(
checkMultipleSelect
(
this
.
multipleSubjectSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSubjectSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSubjectSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSubjectSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllSubject
(
{
idString
:
ids
,
type
:
this
.
listQuery
.
type
}
).
then
(()
=>
{
delAllSubject
(
ids
).
then
(()
=>
{
this
.
handleSubjectManagement
()
this
.
handleSubjectManagement
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
})
})
...
@@ -780,11 +728,11 @@ export default {
...
@@ -780,11 +728,11 @@ export default {
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'success'
type
:
'success'
}).
then
(()
=>
{
}).
then
(()
=>
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleS
ubjectS
election
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSubjectSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
exportSubject
({
id
String
:
ids
,
categoryId
:
''
}).
then
(
response
=>
{
exportSubject
({
id
s
:
ids
,
categoryId
:
''
}).
then
(
response
=>
{
// 导出Excel
// 导出Excel
exportExcel
(
response
)
exportExcel
(
response
)
})
})
...
@@ -876,10 +824,5 @@ export default {
...
@@ -876,10 +824,5 @@ export default {
margin
:
5px
;
margin
:
5px
;
padding
:
6px
13px
;
padding
:
6px
13px
;
}
}
.subject-info
{
padding-right
:
12px
;
}
.subject-tinymce
{
padding-left
:
12px
;
}
</
style
>
</
style
>
frontend/spring-microservice-exam-ui/src/views/monitor/log.vue
View file @
29716af8
...
@@ -281,16 +281,16 @@ export default {
...
@@ -281,16 +281,16 @@ export default {
},
},
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
this
.
$notify
({
this
.
$notify
({
...
...
frontend/spring-microservice-exam-ui/src/views/sys/client.vue
View file @
29716af8
...
@@ -329,16 +329,16 @@ export default {
...
@@ -329,16 +329,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/sys/menu.vue
View file @
29716af8
...
@@ -160,7 +160,7 @@ export default {
...
@@ -160,7 +160,7 @@ export default {
formAdd
:
true
,
formAdd
:
true
,
formStatus
:
''
,
formStatus
:
''
,
showElement
:
false
,
showElement
:
false
,
typeOptions
:
[
'0'
,
'1'
],
typeOptions
:
[
0
,
1
],
listQuery
:
{
listQuery
:
{
name
:
undefined
name
:
undefined
},
},
...
@@ -183,7 +183,7 @@ export default {
...
@@ -183,7 +183,7 @@ export default {
icon
:
''
,
icon
:
''
,
sort
:
30
,
sort
:
30
,
component
:
undefined
,
component
:
undefined
,
type
:
'0'
,
type
:
0
,
path
:
undefined
,
path
:
undefined
,
remark
:
undefined
remark
:
undefined
},
},
...
...
frontend/spring-microservice-exam-ui/src/views/sys/role.vue
View file @
29716af8
...
@@ -306,16 +306,16 @@ export default {
...
@@ -306,16 +306,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/sys/route.vue
View file @
29716af8
...
@@ -321,16 +321,16 @@ export default {
...
@@ -321,16 +321,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
...
frontend/spring-microservice-exam-ui/src/views/sys/user.vue
View file @
29716af8
...
@@ -501,16 +501,16 @@ export default {
...
@@ -501,16 +501,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
@@ -556,11 +556,11 @@ export default {
...
@@ -556,11 +556,11 @@ export default {
})
})
}).
catch
(()
=>
{})
}).
catch
(()
=>
{})
}
else
{
}
else
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
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
// 导出Excel
exportExcel
(
response
)
exportExcel
(
response
)
})
})
...
...
frontend/spring-microservice-exam-ui/src/views/tenant/tenant.vue
View file @
29716af8
...
@@ -283,16 +283,16 @@ export default {
...
@@ -283,16 +283,16 @@ export default {
// 批量删除
// 批量删除
handleDeletes
()
{
handleDeletes
()
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
if
(
checkMultipleSelect
(
this
.
multipleSelection
,
this
))
{
let
ids
=
''
let
ids
=
[]
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
ids
+=
this
.
multipleSelection
[
i
].
id
+
','
ids
.
push
(
this
.
multipleSelection
[
i
].
id
)
}
}
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定要删除吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
delAllObj
(
{
idString
:
ids
}
).
then
(()
=>
{
delAllObj
(
ids
).
then
(()
=>
{
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
this
.
getList
()
this
.
getList
()
notifySuccess
(
this
,
'删除成功'
)
notifySuccess
(
this
,
'删除成功'
)
...
...
gateway-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9180
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
gateway-service/pom.xml
View file @
29716af8
...
@@ -87,7 +87,6 @@
...
@@ -87,7 +87,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
gateway-service/src/main/resources/bootstrap.yml
View file @
29716af8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
spring
:
spring
:
application
:
application
:
name
:
gateway-service
name
:
gateway-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
cloud
:
# 使用consul作为注册中心
# 使用consul作为注册中心
consul
:
consul
:
...
...
gateway-service/src/main/resources/logback.xml
View file @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
modules/auth-service-parent/auth-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9182
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/auth-service-parent/auth-service/pom.xml
View file @
29716af8
...
@@ -134,7 +134,6 @@
...
@@ -134,7 +134,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
modules/auth-service-parent/auth-service/src/main/resources/bootstrap.yml
View file @
29716af8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
spring
:
spring
:
application
:
application
:
name
:
auth-service
name
:
auth-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
cloud
:
# 使用consul作为注册中心
# 使用consul作为注册中心
consul
:
consul
:
...
...
modules/auth-service-parent/auth-service/src/main/resources/logback.xml
View file @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
modules/auth-service-parent/auth-service/src/main/resources/mapper/OauthClientMapper.xml
View file @
29716af8
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
UPDATE oauth_client_details SET
UPDATE oauth_client_details SET
del_flag = 1
del_flag = 1
WHERE id in
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service-api/src/main/java/com/github/tangyi/exam/api/constants/ExamSubjectConstant.java
View file @
29716af8
...
@@ -20,4 +20,9 @@ public class ExamSubjectConstant {
...
@@ -20,4 +20,9 @@ public class ExamSubjectConstant {
* 简答题
* 简答题
*/
*/
public
static
final
Integer
SUBJECT_TYPE_QAS
=
1
;
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 @
29716af8
...
@@ -20,6 +20,12 @@ public class ExaminationSubject extends BaseEntity<ExaminationSubject> {
...
@@ -20,6 +20,12 @@ public class ExaminationSubject extends BaseEntity<ExaminationSubject> {
private
Long
examinationId
;
private
Long
examinationId
;
/**
/**
* 分类ID
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Long
categoryId
;
/**
* 题目ID
* 题目ID
*/
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
...
...
modules/exam-service-parent/exam-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9184
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/exam-service-parent/exam-service/pom.xml
View file @
29716af8
...
@@ -123,7 +123,6 @@
...
@@ -123,7 +123,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/controller/SubjectCategoryController.java
View file @
29716af8
...
@@ -8,6 +8,7 @@ import com.github.tangyi.common.core.utils.TreeUtil;
...
@@ -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.core.web.BaseController
;
import
com.github.tangyi.common.log.annotation.Log
;
import
com.github.tangyi.common.log.annotation.Log
;
import
com.github.tangyi.common.security.constant.SecurityConstant
;
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.dto.SubjectCategoryDto
;
import
com.github.tangyi.exam.api.module.SubjectCategory
;
import
com.github.tangyi.exam.api.module.SubjectCategory
;
import
com.github.tangyi.exam.service.SubjectCategoryService
;
import
com.github.tangyi.exam.service.SubjectCategoryService
;
...
@@ -94,6 +95,7 @@ public class SubjectCategoryController extends BaseController {
...
@@ -94,6 +95,7 @@ public class SubjectCategoryController extends BaseController {
@Log
(
"新增题目分类"
)
@Log
(
"新增题目分类"
)
public
ResponseBean
<
Boolean
>
addSubjectCategory
(
@RequestBody
@Valid
SubjectCategory
subjectCategory
)
{
public
ResponseBean
<
Boolean
>
addSubjectCategory
(
@RequestBody
@Valid
SubjectCategory
subjectCategory
)
{
subjectCategory
.
setCommonValue
(
SysUtil
.
getUser
(),
SysUtil
.
getSysCode
(),
SysUtil
.
getTenantCode
());
subjectCategory
.
setCommonValue
(
SysUtil
.
getUser
(),
SysUtil
.
getSysCode
(),
SysUtil
.
getTenantCode
());
subjectCategory
.
setType
(
ExamSubjectConstant
.
PUBLIC_CATEGORY
);
return
new
ResponseBean
<>(
categoryService
.
insert
(
subjectCategory
)
>
0
);
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 @
29716af8
...
@@ -94,8 +94,6 @@ public class SubjectController extends BaseController {
...
@@ -94,8 +94,6 @@ public class SubjectController extends BaseController {
@RequestParam
(
value
=
CommonConstant
.
ORDER
,
required
=
false
,
defaultValue
=
CommonConstant
.
PAGE_ORDER_DEFAULT
)
String
order
,
@RequestParam
(
value
=
CommonConstant
.
ORDER
,
required
=
false
,
defaultValue
=
CommonConstant
.
PAGE_ORDER_DEFAULT
)
String
order
,
SubjectDto
subject
)
{
SubjectDto
subject
)
{
subject
.
setTenantCode
(
SysUtil
.
getTenantCode
());
subject
.
setTenantCode
(
SysUtil
.
getTenantCode
());
if
(
CommonConstant
.
ROOT
.
equals
(
subject
.
getCategoryId
()))
subject
.
setCategoryId
(
null
);
return
subjectService
.
findPage
(
PageUtil
.
pageInfo
(
pageNum
,
pageSize
,
sort
,
order
),
subject
);
return
subjectService
.
findPage
(
PageUtil
.
pageInfo
(
pageNum
,
pageSize
,
sort
,
order
),
subject
);
}
}
...
@@ -255,7 +253,6 @@ public class SubjectController extends BaseController {
...
@@ -255,7 +253,6 @@ public class SubjectController extends BaseController {
* 批量删除
* 批量删除
*
*
* @param ids ids
* @param ids ids
* @param type type
* @return ResponseBean
* @return ResponseBean
* @author tangyi
* @author tangyi
* @date 2018/12/04 9:55
* @date 2018/12/04 9:55
...
@@ -263,13 +260,10 @@ public class SubjectController extends BaseController {
...
@@ -263,13 +260,10 @@ public class SubjectController extends BaseController {
@PostMapping
(
"deleteAll"
)
@PostMapping
(
"deleteAll"
)
@PreAuthorize
(
"hasAuthority('exam:exam:subject:del') or hasAnyRole('"
+
SecurityConstant
.
ROLE_ADMIN
+
"')"
)
@PreAuthorize
(
"hasAuthority('exam:exam:subject:del') or hasAnyRole('"
+
SecurityConstant
.
ROLE_ADMIN
+
"')"
)
@ApiOperation
(
value
=
"批量删除题目"
,
notes
=
"根据题目id批量删除题目"
)
@ApiOperation
(
value
=
"批量删除题目"
,
notes
=
"根据题目id批量删除题目"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"题目ID"
,
dataType
=
"Long"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"题目ID"
,
dataType
=
"Long"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"题目类型"
,
dataType
=
"Integer"
,
example
=
"3"
)
})
@Log
(
"批量删除题目"
)
@Log
(
"批量删除题目"
)
public
ResponseBean
<
Boolean
>
deleteSubjects
(
@RequestBody
Long
[]
ids
,
@RequestParam
Integer
type
)
{
public
ResponseBean
<
Boolean
>
deleteSubjects
(
@RequestBody
Long
[]
ids
)
{
return
new
ResponseBean
<>(
subjectService
.
physicalDeleteAll
(
type
,
ids
)
>
0
);
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 @
29716af8
...
@@ -298,6 +298,7 @@ public class SubjectChoicesService extends CrudService<SubjectChoicesMapper, Sub
...
@@ -298,6 +298,7 @@ public class SubjectChoicesService extends CrudService<SubjectChoicesMapper, Sub
SubjectChoices
subjectChoices
=
new
SubjectChoices
();
SubjectChoices
subjectChoices
=
new
SubjectChoices
();
BeanUtils
.
copyProperties
(
subjectDto
,
subjectChoices
);
BeanUtils
.
copyProperties
(
subjectDto
,
subjectChoices
);
subjectChoices
.
setAnswer
(
subjectDto
.
getAnswer
().
getAnswer
());
subjectChoices
.
setAnswer
(
subjectDto
.
getAnswer
().
getAnswer
());
subjectChoices
.
setChoicesType
(
subjectDto
.
getType
());
return
this
.
insert
(
subjectChoices
);
return
this
.
insert
(
subjectChoices
);
}
}
...
...
modules/exam-service-parent/exam-service/src/main/java/com/github/tangyi/exam/service/SubjectService.java
View file @
29716af8
...
@@ -2,6 +2,7 @@ package com.github.tangyi.exam.service;
...
@@ -2,6 +2,7 @@ package com.github.tangyi.exam.service;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.tangyi.common.core.exceptions.CommonException
;
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.common.core.utils.SysUtil
;
import
com.github.tangyi.exam.api.constants.ExamSubjectConstant
;
import
com.github.tangyi.exam.api.constants.ExamSubjectConstant
;
import
com.github.tangyi.exam.api.dto.SubjectDto
;
import
com.github.tangyi.exam.api.dto.SubjectDto
;
...
@@ -13,6 +14,7 @@ import com.github.tangyi.exam.utils.SubjectUtil;
...
@@ -13,6 +14,7 @@ import com.github.tangyi.exam.utils.SubjectUtil;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -142,7 +144,22 @@ public class SubjectService {
...
@@ -142,7 +144,22 @@ public class SubjectService {
* @date 2019/06/16 18:12
* @date 2019/06/16 18:12
*/
*/
public
PageInfo
<
SubjectDto
>
findPage
(
PageInfo
pageInfo
,
SubjectDto
subjectDto
)
{
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 {
...
@@ -173,6 +190,7 @@ public class SubjectService {
examinationSubject
.
setCommonValue
(
subjectDto
.
getCreator
(),
subjectDto
.
getApplicationCode
(),
examinationSubject
.
setCommonValue
(
subjectDto
.
getCreator
(),
subjectDto
.
getApplicationCode
(),
subjectDto
.
getTenantCode
());
subjectDto
.
getTenantCode
());
examinationSubject
.
setExaminationId
(
subjectDto
.
getExaminationId
());
examinationSubject
.
setExaminationId
(
subjectDto
.
getExaminationId
());
examinationSubject
.
setCategoryId
(
subjectDto
.
getCategoryId
());
examinationSubject
.
setSubjectId
(
subjectDto
.
getId
());
examinationSubject
.
setSubjectId
(
subjectDto
.
getId
());
examinationSubject
.
setType
(
subjectDto
.
getType
());
examinationSubject
.
setType
(
subjectDto
.
getType
());
examinationSubjectService
.
insert
(
examinationSubject
);
examinationSubjectService
.
insert
(
examinationSubject
);
...
@@ -246,15 +264,29 @@ public class SubjectService {
...
@@ -246,15 +264,29 @@ public class SubjectService {
/**
/**
* 物理批量删除
* 物理批量删除
*
*
* @param type type
* @param ids ids
* @param ids ids
* @return int
* @return int
* @author tangyi
* @author tangyi
* @date 2019/06/16 22:52
* @date 2019/06/16 22:52
*/
*/
@Transactional
@Transactional
public
int
physicalDeleteAll
(
Integer
type
,
Long
[]
ids
)
{
public
int
physicalDeleteAll
(
Long
[]
ids
)
{
return
subjectService
(
type
).
physicalDeleteAllSubject
(
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 @
29716af8
...
@@ -169,6 +169,7 @@ public class SubjectShortAnswerService extends CrudService<SubjectShortAnswerMap
...
@@ -169,6 +169,7 @@ public class SubjectShortAnswerService extends CrudService<SubjectShortAnswerMap
public
int
insertSubject
(
SubjectDto
subjectDto
)
{
public
int
insertSubject
(
SubjectDto
subjectDto
)
{
SubjectShortAnswer
subjectShortAnswer
=
new
SubjectShortAnswer
();
SubjectShortAnswer
subjectShortAnswer
=
new
SubjectShortAnswer
();
BeanUtils
.
copyProperties
(
subjectDto
,
subjectShortAnswer
);
BeanUtils
.
copyProperties
(
subjectDto
,
subjectShortAnswer
);
subjectShortAnswer
.
setAnswer
(
subjectDto
.
getAnswer
().
getAnswer
());
return
this
.
insert
(
subjectShortAnswer
);
return
this
.
insert
(
subjectShortAnswer
);
}
}
...
...
modules/exam-service-parent/exam-service/src/main/resources/bootstrap.yml
View file @
29716af8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
spring
:
spring
:
application
:
application
:
name
:
exam-service
name
:
exam-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
cloud
:
# 使用consul作为注册中心
# 使用consul作为注册中心
consul
:
consul
:
...
...
modules/exam-service-parent/exam-service/src/main/resources/logback.xml
View file @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
modules/exam-service-parent/exam-service/src/main/resources/mapper/CourseMapper.xml
View file @
29716af8
...
@@ -135,7 +135,7 @@
...
@@ -135,7 +135,7 @@
UPDATE exam_course SET
UPDATE exam_course SET
del_flag = 1
del_flag = 1
WHERE id in
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/ExaminationMapper.xml
View file @
29716af8
...
@@ -177,7 +177,7 @@
...
@@ -177,7 +177,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
UPDATE exam_examination SET del_flag = 1 WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/ExaminationSubjectMapper.xml
View file @
29716af8
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<resultMap
id=
"examinationSubjectResultMap"
type=
"com.github.tangyi.exam.api.module.ExaminationSubject"
>
<resultMap
id=
"examinationSubjectResultMap"
type=
"com.github.tangyi.exam.api.module.ExaminationSubject"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"examination_id"
property=
"examinationId"
/>
<result
column=
"examination_id"
property=
"examinationId"
/>
<result
column=
"category_id"
property=
"categoryId"
/>
<result
column=
"subject_id"
property=
"subjectId"
/>
<result
column=
"subject_id"
property=
"subjectId"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"application_code"
property=
"applicationCode"
/>
<result
column=
"application_code"
property=
"applicationCode"
/>
...
@@ -13,6 +14,7 @@
...
@@ -13,6 +14,7 @@
<sql
id=
"examinationSubjectColumns"
>
<sql
id=
"examinationSubjectColumns"
>
a.id,
a.id,
a.examination_id,
a.examination_id,
a.category_id,
a.subject_id,
a.subject_id,
a.type,
a.type,
a.application_code,
a.application_code,
...
@@ -21,15 +23,23 @@
...
@@ -21,15 +23,23 @@
<!-- where 条件 -->
<!-- where 条件 -->
<sql
id=
"whereColumnList"
>
<sql
id=
"whereColumnList"
>
<if
test=
"examinationId != null and examinationId != ''"
>
and a.examination_id = #{examinationId}
</if>
<if
test=
"subjectId != null and subjectId != ''"
>
<if
test=
"subjectId != null and subjectId != ''"
>
and a.subject_id = #{subjectId}
and a.subject_id = #{subjectId}
</if>
</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 != ''"
>
<if
test=
"type != null and type != ''"
>
and a.type = #{type}
and a.type = #{type}
</if>
</if>
<if
test=
"tenantCode != null and tenantCode != ''"
>
and a.tenant_code = #{tenantCode}
</if>
</sql>
</sql>
<select
id=
"get"
resultMap=
"examinationSubjectResultMap"
>
<select
id=
"get"
resultMap=
"examinationSubjectResultMap"
>
...
@@ -51,7 +61,7 @@
...
@@ -51,7 +61,7 @@
<select
id=
"findList"
resultMap=
"examinationSubjectResultMap"
>
<select
id=
"findList"
resultMap=
"examinationSubjectResultMap"
>
SELECT
SELECT
<include
refid=
"examinationSubjectColumns"
/>
<include
refid=
"examinationSubjectColumns"
/>
FROM exam_examination_subject a WHERE
a.examination_id = #{examinationId}
FROM exam_examination_subject a WHERE
1=1
<include
refid=
"whereColumnList"
/>
<include
refid=
"whereColumnList"
/>
ORDER BY a.subject_id ASC
ORDER BY a.subject_id ASC
</select>
</select>
...
@@ -91,6 +101,7 @@
...
@@ -91,6 +101,7 @@
insert into exam_examination_subject (
insert into exam_examination_subject (
id,
id,
examination_id,
examination_id,
category_id,
subject_id,
subject_id,
type,
type,
application_code,
application_code,
...
@@ -98,6 +109,7 @@
...
@@ -98,6 +109,7 @@
) values (
) values (
#{id},
#{id},
#{examinationId},
#{examinationId},
#{categoryId},
#{subjectId},
#{subjectId},
#{type},
#{type},
#{applicationCode},
#{applicationCode},
...
@@ -110,6 +122,9 @@
...
@@ -110,6 +122,9 @@
<if
test=
"examinationId != null"
>
<if
test=
"examinationId != null"
>
examination_id = #{examinationId},
examination_id = #{examinationId},
</if>
</if>
<if
test=
"categoryId != null"
>
category_id = #{categoryId},
</if>
<if
test=
"subjectId != null"
>
<if
test=
"subjectId != null"
>
subject_id = #{subjectId},
subject_id = #{subjectId},
</if>
</if>
...
@@ -132,7 +147,7 @@
...
@@ -132,7 +147,7 @@
<!-- 物理删除 -->
<!-- 物理删除 -->
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
DELETE FROM exam_examination_subject WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/KnowledgeMapper.xml
View file @
29716af8
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
UPDATE exam_knowledge SET del_flag = 1 WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectChoicesMapper.xml
View file @
29716af8
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
<!-- 物理删除 -->
<!-- 物理删除 -->
<delete
id=
"physicalDeleteAll"
>
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_choices WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectJudgementMapper.xml
View file @
29716af8
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
UPDATE exam_subject_judgement SET del_flag = 1 WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
<!-- 物理删除 -->
<!-- 物理删除 -->
<delete
id=
"physicalDeleteAll"
>
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_judgement WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectOptionMapper.xml
View file @
29716af8
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
UPDATE exam_subject_option SET del_flag = 1 WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
<!-- 物理批量删除 -->
<!-- 物理批量删除 -->
<delete
id=
"physicalDeleteAll"
>
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_option WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/exam-service-parent/exam-service/src/main/resources/mapper/SubjectShortAnswerMapper.xml
View file @
29716af8
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
UPDATE exam_subject_short_answer SET del_flag = 1 WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
<!-- 物理删除 -->
<!-- 物理删除 -->
<delete
id=
"physicalDeleteAll"
>
<delete
id=
"physicalDeleteAll"
>
DELETE FROM exam_subject_short_answer WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/msc-service-parent/msc-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9185
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/msc-service-parent/msc-service/pom.xml
View file @
29716af8
...
@@ -100,7 +100,6 @@
...
@@ -100,7 +100,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
modules/msc-service-parent/msc-service/src/main/resources/bootstrap.yml
View file @
29716af8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
spring
:
spring
:
application
:
application
:
name
:
msc-service
name
:
msc-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
cloud
:
# 使用consul作为注册中心
# 使用consul作为注册中心
consul
:
consul
:
...
...
modules/msc-service-parent/msc-service/src/main/resources/logback.xml
View file @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
modules/user-service-parent/user-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9185
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
modules/user-service-parent/user-service/pom.xml
View file @
29716af8
...
@@ -129,7 +129,6 @@
...
@@ -129,7 +129,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
modules/user-service-parent/user-service/src/main/java/com/github/tangyi/user/service/MenuService.java
View file @
29716af8
...
@@ -298,7 +298,7 @@ public class MenuService extends CrudService<MenuMapper, Menu> {
...
@@ -298,7 +298,7 @@ public class MenuService extends CrudService<MenuMapper, Menu> {
// 租户菜单
// 租户菜单
tenantMenus
.
forEach
(
tenantMenu
->
{
tenantMenus
.
forEach
(
tenantMenu
->
{
Optional
<
Menu
>
exist
=
userMenus
.
stream
()
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
())
{
if
(!
exist
.
isPresent
())
{
userMenus
.
add
(
tenantMenu
);
userMenus
.
add
(
tenantMenu
);
}
}
...
...
modules/user-service-parent/user-service/src/main/resources/bootstrap.yml
View file @
29716af8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
spring
:
spring
:
application
:
application
:
name
:
user-service
name
:
user-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
cloud
:
# 使用consul作为注册中心
# 使用consul作为注册中心
consul
:
consul
:
...
...
modules/user-service-parent/user-service/src/main/resources/logback.xml
View file @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
modules/user-service-parent/user-service/src/main/resources/mapper/AttachmentMapper.xml
View file @
29716af8
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
UPDATE sys_attachment SET
UPDATE sys_attachment SET
del_flag = 1
del_flag = 1
WHERE id in
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/LogMapper.xml
View file @
29716af8
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
DELETE FROM sys_log WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/RoleMapper.xml
View file @
29716af8
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
UPDATE sys_role SET
UPDATE sys_role SET
del_flag = 1
del_flag = 1
WHERE id in
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/StudentMapper.xml
View file @
29716af8
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
update sys_student SET
update sys_student SET
del_flag = 1
del_flag = 1
where id in
where id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/TenantMapper.xml
View file @
29716af8
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
update sys_tenant SET
update sys_tenant SET
del_flag = 1
del_flag = 1
where id in
where id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/UserAuthsMapper.xml
View file @
29716af8
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
DELETE FROM sys_user_auths WHERE id in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/UserMapper.xml
View file @
29716af8
...
@@ -254,7 +254,7 @@
...
@@ -254,7 +254,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
DELETE FROM sys_user
DELETE FROM sys_user
WHERE id in
WHERE id in
<foreach
item=
"item"
index=
"index"
collection=
"
array
"
open=
"("
<foreach
item=
"item"
index=
"index"
collection=
"
ids
"
open=
"("
separator=
","
close=
")"
>
#{item}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
modules/user-service-parent/user-service/src/main/resources/mapper/UserStudentMapper.xml
View file @
29716af8
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<delete
id=
"deleteAll"
>
<delete
id=
"deleteAll"
>
DELETE FROM sys_user_student ID in
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}
separator=
","
close=
")"
>
#{item}
</foreach>
</foreach>
</delete>
</delete>
...
...
monitor-service/Dockerfile
View file @
29716af8
FROM
anapsix/alpine-java:8_server-jre_unlimited
FROM
anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER
tangyi(1633736729@qq.com)
MAINTAINER
tangyi(1633736729@qq.com)
ARG
JAR_FILE
ARG
JAR_FILE
ENV
PROFILE native
ADD
target/${JAR_FILE} /opt/app.jar
ADD
target/${JAR_FILE} /opt/app.jar
EXPOSE
9186
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'
# JAVA_OPS配置,如:JAVA_OPS='-Xmx512m -Xms256m'
\ No newline at end of file
monitor-service/pom.xml
View file @
29716af8
...
@@ -86,7 +86,6 @@
...
@@ -86,7 +86,6 @@
</executions>
</executions>
<configuration>
<configuration>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<repository>
${docker.registry}/${docker.namespace}/${project.artifactId}
</repository>
<tag>
${project.version}
</tag>
<tag>
latest
</tag>
<tag>
latest
</tag>
<!-- 构建参数,指定jar包名称 -->
<!-- 构建参数,指定jar包名称 -->
<buildArgs>
<buildArgs>
...
...
monitor-service/src/main/resources/bootstrap.yml
View file @
29716af8
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
spring
:
spring
:
application
:
application
:
name
:
monitor-service
name
:
monitor-service
profiles
:
active
:
${SPRING_PROFILES_ACTIVE:native}
cloud
:
cloud
:
# 使用consul作为注册中心
# 使用consul作为注册中心
consul
:
consul
:
...
...
monitor-service/src/main/resources/logback.xml
View file @
29716af8
...
@@ -39,18 +39,24 @@
...
@@ -39,18 +39,24 @@
</filter>
</filter>
</appender>
</appender>
<!-- 输出到logstash的appender -->
<!-- 输出到logstash的appender, ELK_DESTINATION为logstash的IP和端口,从环境变量注入-->
<appender
name=
"logstash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<!-- logstash的IP和端口,从环境变量注入 -->
<destination>${ELK_DESTINATION}</destination>
<destination>${ELK_DESTINATION}</destination>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
</appender
>
</appender>--
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"info"
>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
<
appender-ref
ref=
"logstash"
/
>
<
!--<appender-ref ref="logstash"/>--
>
</root>
</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>
</configuration>
pom.xml
View file @
29716af8
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.1.
8
.RELEASE
</version>
<version>
2.1.
9
.RELEASE
</version>
<relativePath/>
<!-- lookup parent from repository -->
<relativePath/>
<!-- lookup parent from repository -->
</parent>
</parent>
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<maven.compiler.source>
${java.version}
</maven.compiler.source>
<maven.compiler.source>
${java.version}
</maven.compiler.source>
<maven.compiler.target>
${java.version}
</maven.compiler.target>
<maven.compiler.target>
${java.version}
</maven.compiler.target>
<!-- spring boot、spring cloud -->
<!-- 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>
<spring-cloud.version>
Greenwich.SR3
</spring-cloud.version>
<security.auth.version>
2.3.5.RELEASE
</security.auth.version>
<security.auth.version>
2.3.5.RELEASE
</security.auth.version>
<spring-boot-admin.version>
2.1.6
</spring-boot-admin.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