Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
practical_train
Commits
821ac5f1
"src/main/resources/git@gitlab.ruzhoukj.com:wujipeng/ops.git" did not exist on "06969c16ea5f09293b40cd9eaf1ac95e5791e961"
Commit
821ac5f1
authored
Sep 16, 2026
by
wujipeng
Browse files
优化
parent
98561b99
Changes
11
Show whitespace changes
Inline
Side-by-side
practical-auth/src/main/java/com/platform/auth/service/impl/UserServiceImpl.java
View file @
821ac5f1
...
@@ -104,6 +104,7 @@ public class UserServiceImpl extends ServiceImpl<USerMapper, User> implements Us
...
@@ -104,6 +104,7 @@ public class UserServiceImpl extends ServiceImpl<USerMapper, User> implements Us
response
.
setFirstLogin
(
firstLogin
);
response
.
setFirstLogin
(
firstLogin
);
response
.
setLevel
(
user
.
getLevel
());
response
.
setLevel
(
user
.
getLevel
());
response
.
setExamFlag
(
user
.
getExamFlag
());
response
.
setExamFlag
(
user
.
getExamFlag
());
response
.
setExamType
(
user
.
getExamType
());
response
.
setExamOneselfId
(
user
.
getExamOneselfId
());
response
.
setExamOneselfId
(
user
.
getExamOneselfId
());
return
Result
.
data
(
response
);
return
Result
.
data
(
response
);
}
}
...
...
practical-business/src/main/resources/sql/account_management.sql
View file @
821ac5f1
...
@@ -104,7 +104,7 @@ create table if not exists account_login_log (
...
@@ -104,7 +104,7 @@ create table if not exists account_login_log (
primary
key
(
id
),
primary
key
(
id
),
key
idx_account_login_user_time
(
user_id
,
login_time
),
key
idx_account_login_user_time
(
user_id
,
login_time
),
key
idx_account_login_name_time
(
login_name
,
login_time
)
key
idx_account_login_name_time
(
login_name
,
login_time
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
comment
=
'账户登录日志'
;
)
engine
=
InnoDB
comment
=
'账户登录日志'
;
-- 管理端所有写操作的审计记录,满足批量结业、归档和重置密码的追溯要求。
-- 管理端所有写操作的审计记录,满足批量结业、归档和重置密码的追溯要求。
create
table
if
not
exists
account_operation_log
(
create
table
if
not
exists
account_operation_log
(
...
@@ -118,7 +118,7 @@ create table if not exists account_operation_log (
...
@@ -118,7 +118,7 @@ create table if not exists account_operation_log (
primary
key
(
id
),
primary
key
(
id
),
key
idx_account_operation_target_time
(
target_user_id
,
operation_time
),
key
idx_account_operation_target_time
(
target_user_id
,
operation_time
),
key
idx_account_operation_operator_time
(
operator_id
,
operation_time
)
key
idx_account_operation_operator_time
(
operator_id
,
operation_time
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
comment
=
'账户管理操作审计日志'
;
)
engine
=
InnoDB
comment
=
'账户管理操作审计日志'
;
-- 兼容旧数据:优先根据phone_role大类角色推导账户状态,不覆盖已经人工维护的状态。
-- 兼容旧数据:优先根据phone_role大类角色推导账户状态,不覆盖已经人工维护的状态。
update
user
u
update
user
u
...
...
practical-business/src/main/resources/sql/evaluation.sql
View file @
821ac5f1
...
@@ -26,7 +26,7 @@ create table if not exists evaluation_task (
...
@@ -26,7 +26,7 @@ create table if not exists evaluation_task (
references
user
(
id
),
references
user
(
id
),
constraint
fk_evaluation_task_revoker
foreign
key
(
revoked_by
)
constraint
fk_evaluation_task_revoker
foreign
key
(
revoked_by
)
references
user
(
id
)
references
user
(
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
comment
=
'学员评议任务'
;
)
engine
=
InnoDB
comment
=
'学员评议任务'
;
create
table
if
not
exists
evaluation_record
(
create
table
if
not
exists
evaluation_record
(
id
varchar
(
32
)
not
null
comment
'学员评价记录ID'
,
id
varchar
(
32
)
not
null
comment
'学员评价记录ID'
,
...
@@ -52,4 +52,4 @@ create table if not exists evaluation_record (
...
@@ -52,4 +52,4 @@ create table if not exists evaluation_record (
references
evaluation_task
(
id
),
references
evaluation_task
(
id
),
constraint
fk_evaluation_record_student
foreign
key
(
student_id
)
constraint
fk_evaluation_record_student
foreign
key
(
student_id
)
references
user
(
id
)
references
user
(
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
comment
=
'学员实名评价记录及任务目标快照'
;
)
engine
=
InnoDB
comment
=
'学员实名评价记录及任务目标快照'
;
practical-business/src/main/resources/sql/exam_review.sql
View file @
821ac5f1
...
@@ -19,4 +19,4 @@ CREATE TABLE IF NOT EXISTS exam_review_score_log (
...
@@ -19,4 +19,4 @@ CREATE TABLE IF NOT EXISTS exam_review_score_log (
KEY
idx_review_log_student_time
(
exam_student_id
,
created_at
),
KEY
idx_review_log_student_time
(
exam_student_id
,
created_at
),
KEY
idx_review_log_exam
(
exam_id
),
KEY
idx_review_log_exam
(
exam_id
),
KEY
idx_review_log_question
(
question_id
)
KEY
idx_review_log_question
(
question_id
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
COMMENT
=
'阅卷评分审计日志'
;
)
ENGINE
=
InnoDB
COMMENT
=
'阅卷评分审计日志'
;
practical-business/src/main/resources/sql/home_dashboard.sql
View file @
821ac5f1
...
@@ -27,7 +27,7 @@ create table if not exists training_room_equipment (
...
@@ -27,7 +27,7 @@ create table if not exists training_room_equipment (
unique
key
uk_training_room_equipment_code
(
room_id
,
equipment_code
),
unique
key
uk_training_room_equipment_code
(
room_id
,
equipment_code
),
key
idx_training_room_equipment_due
(
del_flag
,
status
,
next_maintenance_date
),
key
idx_training_room_equipment_due
(
del_flag
,
status
,
next_maintenance_date
),
key
idx_training_room_equipment_room
(
room_id
,
del_flag
)
key
idx_training_room_equipment_room
(
room_id
,
del_flag
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
comment
=
'实训室设备及维护日期'
;
)
engine
=
InnoDB
comment
=
'实训室设备及维护日期'
;
delimiter
$$
delimiter
$$
...
...
practical-business/src/main/resources/sql/message_center.sql
View file @
821ac5f1
...
@@ -20,7 +20,7 @@ create table if not exists notification_message (
...
@@ -20,7 +20,7 @@ create table if not exists notification_message (
unique
key
uk_notification_message_event
(
event_id
),
unique
key
uk_notification_message_event
(
event_id
),
key
idx_notification_message_created
(
created_at
),
key
idx_notification_message_created
(
created_at
),
key
idx_notification_message_business
(
business_type
,
business_id
)
key
idx_notification_message_business
(
business_type
,
business_id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
comment
=
'消息正文'
;
)
engine
=
InnoDB
comment
=
'消息正文'
;
create
table
if
not
exists
notification_message_recipient
(
create
table
if
not
exists
notification_message_recipient
(
id
varchar
(
32
)
not
null
,
id
varchar
(
32
)
not
null
,
...
@@ -37,7 +37,7 @@ create table if not exists notification_message_recipient (
...
@@ -37,7 +37,7 @@ create table if not exists notification_message_recipient (
key
idx_notification_recipient_inbox
(
user_id
,
deleted_flag
,
read_flag
,
created_at
),
key
idx_notification_recipient_inbox
(
user_id
,
deleted_flag
,
read_flag
,
created_at
),
constraint
fk_notification_recipient_message
foreign
key
(
message_id
)
constraint
fk_notification_recipient_message
foreign
key
(
message_id
)
references
notification_message
(
id
)
references
notification_message
(
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
comment
=
'用户消息状态'
;
)
engine
=
InnoDB
comment
=
'用户消息状态'
;
create
table
if
not
exists
notification_outbox
(
create
table
if
not
exists
notification_outbox
(
id
varchar
(
32
)
not
null
,
id
varchar
(
32
)
not
null
,
...
@@ -55,4 +55,4 @@ create table if not exists notification_outbox (
...
@@ -55,4 +55,4 @@ create table if not exists notification_outbox (
primary
key
(
id
),
primary
key
(
id
),
unique
key
uk_notification_outbox_event
(
event_id
),
unique
key
uk_notification_outbox_event
(
event_id
),
key
idx_notification_outbox_due
(
status
,
scheduled_at
,
next_retry_at
)
key
idx_notification_outbox_due
(
status
,
scheduled_at
,
next_retry_at
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
comment
=
'消息事务发件箱'
;
)
engine
=
InnoDB
comment
=
'消息事务发件箱'
;
practical-business/src/main/resources/sql/practice_paper_rule.sql
View file @
821ac5f1
...
@@ -20,7 +20,7 @@ create table if not exists practice_paper_rule (
...
@@ -20,7 +20,7 @@ create table if not exists practice_paper_rule (
primary
key
(
id
),
primary
key
(
id
),
unique
key
uk_practice_rule_grade_project_unit
(
level_grade
,
project_name
,
unit_content
),
unique
key
uk_practice_rule_grade_project_unit
(
level_grade
,
project_name
,
unit_content
),
key
idx_practice_rule_grade_id
(
level_grade
,
id
)
key
idx_practice_rule_grade_id
(
level_grade
,
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
)
engine
=
InnoDB
comment
=
'实操自动组卷类目、考核时间及配分规则'
;
comment
=
'实操自动组卷类目、考核时间及配分规则'
;
-- 五级(6条)
-- 五级(6条)
...
@@ -107,7 +107,7 @@ create table if not exists practice_paper_rule_definition (
...
@@ -107,7 +107,7 @@ create table if not exists practice_paper_rule_definition (
primary
key
(
id
),
primary
key
(
id
),
unique
key
uk_practice_definition_grade_name
(
level_grade
,
name
),
unique
key
uk_practice_definition_grade_name
(
level_grade
,
name
),
key
idx_practice_definition_grade_status
(
level_grade
,
status
,
updated_time
,
id
)
key
idx_practice_definition_grade_status
(
level_grade
,
status
,
updated_time
,
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
)
engine
=
InnoDB
comment
=
'具名实操试卷规则主表'
;
comment
=
'具名实操试卷规则主表'
;
create
table
if
not
exists
practice_paper_rule_detail
(
create
table
if
not
exists
practice_paper_rule_detail
(
...
@@ -120,7 +120,7 @@ create table if not exists practice_paper_rule_detail (
...
@@ -120,7 +120,7 @@ create table if not exists practice_paper_rule_detail (
primary
key
(
id
),
primary
key
(
id
),
unique
key
uk_practice_detail_rule_catalog
(
rule_id
,
catalog_id
),
unique
key
uk_practice_detail_rule_catalog
(
rule_id
,
catalog_id
),
key
idx_practice_detail_rule
(
rule_id
,
id
)
key
idx_practice_detail_rule
(
rule_id
,
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
)
engine
=
InnoDB
comment
=
'具名实操试卷规则明细'
;
comment
=
'具名实操试卷规则明细'
;
-- 把升级前每个等级的唯一配置固化成已发布默认规则;唯一键保证脚本可重复执行。
-- 把升级前每个等级的唯一配置固化成已发布默认规则;唯一键保证脚本可重复执行。
...
@@ -156,7 +156,7 @@ create table if not exists exam_teacher_assignment (
...
@@ -156,7 +156,7 @@ create table if not exists exam_teacher_assignment (
unique
key
uk_exam_teacher_role
(
exam_id
,
teacher_id
,
role
),
unique
key
uk_exam_teacher_role
(
exam_id
,
teacher_id
,
role
),
key
idx_exam_teacher_permission
(
teacher_id
,
role
,
exam_id
),
key
idx_exam_teacher_permission
(
teacher_id
,
role
,
exam_id
),
key
idx_exam_teacher_exam
(
exam_id
,
role
,
display_order
,
id
)
key
idx_exam_teacher_exam
(
exam_id
,
role
,
display_order
,
id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
)
engine
=
InnoDB
comment
=
'考试首席考评员与监考教师多选关系'
;
comment
=
'考试首席考评员与监考教师多选关系'
;
delimiter
$$
delimiter
$$
...
...
practical-business/src/main/resources/sql/student_score_management.sql
View file @
821ac5f1
...
@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS fz_grades (
...
@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS fz_grades (
score
DECIMAL
(
10
,
2
)
NOT
NULL
DEFAULT
0
COMMENT
'本题实际得分'
,
score
DECIMAL
(
10
,
2
)
NOT
NULL
DEFAULT
0
COMMENT
'本题实际得分'
,
basic_score
DECIMAL
(
10
,
2
)
NULL
COMMENT
'第三方提供的本题基础分值,仅用于展示和汇总'
,
basic_score
DECIMAL
(
10
,
2
)
NULL
COMMENT
'第三方提供的本题基础分值,仅用于展示和汇总'
,
PRIMARY
KEY
(
id
)
PRIMARY
KEY
(
id
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
)
ENGINE
=
InnoDB
COMMENT
=
'仿真实训逐题成绩明细'
;
COMMENT
=
'仿真实训逐题成绩明细'
;
delimiter
$$
delimiter
$$
...
...
practical-business/src/main/resources/sql/teaching_plan.sql
View file @
821ac5f1
...
@@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS teaching_plan (
...
@@ -37,7 +37,7 @@ CREATE TABLE IF NOT EXISTS teaching_plan (
KEY
idx_teaching_plan_teacher_status
(
teacher_id
,
del_flag
,
status
),
KEY
idx_teaching_plan_teacher_status
(
teacher_id
,
del_flag
,
status
),
KEY
idx_teaching_plan_teacher_preparation
(
teacher_id
,
del_flag
,
preparation_date
),
KEY
idx_teaching_plan_teacher_preparation
(
teacher_id
,
del_flag
,
preparation_date
),
KEY
idx_teaching_plan_admin_filter_v2
(
del_flag
,
status
,
course_type
,
class_name
,
teacher_id
)
KEY
idx_teaching_plan_admin_filter_v2
(
del_flag
,
status
,
course_type
,
class_name
,
teacher_id
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
COMMENT
=
'教师教案'
;
)
ENGINE
=
InnoDB
COMMENT
=
'教师教案'
;
-- 教学环节使用独立子表保存,sequence_no 对应编辑器数组顺序。
-- 教学环节使用独立子表保存,sequence_no 对应编辑器数组顺序。
CREATE
TABLE
IF
NOT
EXISTS
teaching_plan_step
(
CREATE
TABLE
IF
NOT
EXISTS
teaching_plan_step
(
...
@@ -53,7 +53,7 @@ CREATE TABLE IF NOT EXISTS teaching_plan_step (
...
@@ -53,7 +53,7 @@ CREATE TABLE IF NOT EXISTS teaching_plan_step (
PRIMARY
KEY
(
id
),
PRIMARY
KEY
(
id
),
UNIQUE
KEY
uk_teaching_plan_step_sequence
(
plan_id
,
sequence_no
),
UNIQUE
KEY
uk_teaching_plan_step_sequence
(
plan_id
,
sequence_no
),
KEY
idx_teaching_plan_step_plan
(
plan_id
)
KEY
idx_teaching_plan_step_plan
(
plan_id
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
COMMENT
=
'教案教学环节'
;
)
ENGINE
=
InnoDB
COMMENT
=
'教案教学环节'
;
CREATE
TABLE
IF
NOT
EXISTS
teaching_plan_attachment
(
CREATE
TABLE
IF
NOT
EXISTS
teaching_plan_attachment
(
id
VARCHAR
(
32
)
NOT
NULL
COMMENT
'附件关联ID'
,
id
VARCHAR
(
32
)
NOT
NULL
COMMENT
'附件关联ID'
,
...
@@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS teaching_plan_attachment (
...
@@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS teaching_plan_attachment (
UNIQUE
KEY
uk_teaching_plan_file
(
plan_id
,
file_id
),
UNIQUE
KEY
uk_teaching_plan_file
(
plan_id
,
file_id
),
KEY
idx_teaching_plan_attachment_plan
(
plan_id
,
del_flag
),
KEY
idx_teaching_plan_attachment_plan
(
plan_id
,
del_flag
),
KEY
idx_teaching_plan_attachment_file
(
file_id
)
KEY
idx_teaching_plan_attachment_file
(
file_id
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_unicode_ci
COMMENT
=
'教案附件关联'
;
)
ENGINE
=
InnoDB
COMMENT
=
'教案附件关联'
;
--
--
-- HTML 原型字段及管理端审核字段的增量迁移。
-- HTML 原型字段及管理端审核字段的增量迁移。
...
...
practical-business/src/main/resources/sql/theoretical_library_management.sql
View file @
821ac5f1
...
@@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS theoretical_library_node (
...
@@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS theoretical_library_node (
UNIQUE
KEY
uk_tl_node_parent_code
(
bank_type
,
parent_id
,
code
),
UNIQUE
KEY
uk_tl_node_parent_code
(
bank_type
,
parent_id
,
code
),
KEY
idx_tl_node_parent_sort
(
bank_type
,
parent_id
,
sort_no
,
id
),
KEY
idx_tl_node_parent_sort
(
bank_type
,
parent_id
,
sort_no
,
id
),
KEY
idx_tl_node_name
(
bank_type
,
name
)
KEY
idx_tl_node_name
(
bank_type
,
name
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'理论题库层级节点'
;
)
ENGINE
=
InnoDB
COMMENT
=
'理论题库层级节点'
;
DELIMITER
$$
DELIMITER
$$
...
...
practical-business/src/main/resources/sql/theoretical_practice_statistics.sql
View file @
821ac5f1
...
@@ -22,7 +22,7 @@ create table if not exists theoretical_practice_answer_record (
...
@@ -22,7 +22,7 @@ create table if not exists theoretical_practice_answer_record (
key
idx_tp_answer_practice_student
(
practice_id
,
student_id
,
answered_at
),
key
idx_tp_answer_practice_student
(
practice_id
,
student_id
,
answered_at
),
key
idx_tp_answer_practice_knowledge
(
practice_id
,
knowledge_point
),
key
idx_tp_answer_practice_knowledge
(
practice_id
,
knowledge_point
),
key
idx_tp_answer_practice_question
(
practice_id
,
student_id
,
question_id
)
key
idx_tp_answer_practice_question
(
practice_id
,
student_id
,
question_id
)
)
engine
=
InnoDB
default
charset
=
utf8mb4
collate
=
utf8mb4_unicode_ci
)
engine
=
InnoDB
comment
=
'理论练习不可变作答历史及统计数据源'
;
comment
=
'理论练习不可变作答历史及统计数据源'
;
-- 如果目标环境曾提前创建过精简版表,以下过程会补齐统计所需索引;重复执行不会报错。
-- 如果目标环境曾提前创建过精简版表,以下过程会补齐统计所需索引;重复执行不会报错。
...
...
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