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
c185bde7
Commit
c185bde7
authored
Nov 18, 2026
by
wujipeng
Browse files
优化项
parent
ca71e3af
Changes
5
Show whitespace changes
Inline
Side-by-side
practical-api/practical-business-api/src/main/java/com/platform/business/model/dto/CourseAdminScheduleSwapDTO.java
View file @
c185bde7
...
...
@@ -12,6 +12,6 @@ public class CourseAdminScheduleSwapDTO {
/** 产品规定的必填调课原因。 */
private
String
reason
;
/** 可选调课说明,
服务端限制最多60字
。 */
/** 可选调课说明,
不限制业务字符数
。 */
private
String
note
;
}
practical-api/practical-business-api/src/main/java/com/platform/business/model/entity/ClassSubjectEntity.java
View file @
c185bde7
...
...
@@ -77,7 +77,7 @@ public class ClassSubjectEntity {
/** 最近一次调课原因。 */
private
String
adjustmentReason
;
/** 最近一次调课说明,
产品限制最多60字
。 */
/** 最近一次调课说明,
使用TEXT字段完整保存
。 */
private
String
adjustmentNote
;
/** 记录创建时间,由管理端新增接口维护。 */
...
...
practical-business/src/main/java/com/platform/business/service/impl/CourseAdminServiceImpl.java
View file @
c185bde7
...
...
@@ -737,7 +737,8 @@ public class CourseAdminServiceImpl implements CourseAdminService {
String
targetGroupId
=
requireScheduleGroupId
(
request
.
getTargetScheduleGroupId
());
if
(
sourceGroupId
.
equals
(
targetGroupId
))
throw
new
BusinessException
(
"不能与当前课次对调"
);
String
reason
=
requireText
(
request
.
getReason
(),
"调课原因"
,
32
);
String
note
=
optionalText
(
request
.
getNote
(),
"调课说明"
,
60
);
// 调课说明按产品要求不限制业务字符数,仅清理首尾空白和纯空白输入。
String
note
=
trimToNull
(
request
.
getNote
());
List
<
ClassSubjectEntity
>
sourceSnapshot
=
classSubjectMapper
.
selectAdminCourseGroupEntities
(
sourceGroupId
);
...
...
practical-business/src/main/resources/sql/course_management.sql
View file @
c185bde7
...
...
@@ -56,8 +56,14 @@ begin
end
if
;
if
not
exists
(
select
1
from
information_schema
.
columns
where
table_schema
=
database
()
and
table_name
=
'class_subject'
and
column_name
=
'adjustment_note'
)
then
alter
table
class_subject
add
column
adjustment_note
varchar
(
60
)
null
alter
table
class_subject
add
column
adjustment_note
text
null
comment
'最近一次调课说明'
after
adjustment_reason
;
elseif
exists
(
select
1
from
information_schema
.
columns
where
table_schema
=
database
()
and
table_name
=
'class_subject'
and
column_name
=
'adjustment_note'
and
data_type
<>
'text'
)
then
-- 旧环境为varchar(60),升级为TEXT后才能真正取消调课说明字数限制。
alter
table
class_subject
modify
column
adjustment_note
text
null
comment
'最近一次调课说明'
;
end
if
;
-- 编辑弹窗仅携带全局唯一的排课组ID,组ID前导索引避免首次定位班级时扫描全表。
...
...
practical-business/src/test/java/com/platform/business/sql/CourseMigrationSqlTest.java
View file @
c185bde7
...
...
@@ -47,7 +47,8 @@ class CourseMigrationSqlTest {
assertTrue
(
sql
.
contains
(
"adjusted tinyint(1) not null default 0"
));
assertTrue
(
sql
.
contains
(
"adjustment_counterpart_group_id varchar(32)"
));
assertTrue
(
sql
.
contains
(
"adjustment_reason varchar(32)"
));
assertTrue
(
sql
.
contains
(
"adjustment_note varchar(60)"
));
assertTrue
(
sql
.
contains
(
"adjustment_note text"
));
assertTrue
(
sql
.
contains
(
"modify column adjustment_note text"
));
}
private
static
String
resource
(
String
path
)
throws
Exception
{
...
...
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