Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
engine-class-work
Project
Project
Details
Activity
Releases
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
liuchengjiu
engine-class-work
Commits
169d19fa
Commit
169d19fa
authored
Jul 21, 2023
by
Ryan Loong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 优化学生创建逻辑
parent
8169463b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
StudentInfoService.java
...xploring/engine/server/db/service/StudentInfoService.java
+21
-3
No files found.
server-db/src/main/java/cn/exploring/engine/server/db/service/StudentInfoService.java
View file @
169d19fa
...
...
@@ -73,9 +73,27 @@ public class StudentInfoService {
return
"Fail 学号重复! 请重新输入学号"
;
}
LocalDateTime
now
=
LocalDateTime
.
now
();
studentInfo
.
setAddTime
(
now
);
studentInfo
.
setUpdateTime
(
now
);
studentInfoMapper
.
insertSelective
(
studentInfo
);
StudentInfo
record
=
new
StudentInfo
();
BeanUtils
.
copyProperties
(
studentInfo
,
record
,
StudentInfo
.
Column
.
id
.
getJavaProperty
(),
StudentInfo
.
Column
.
callTimes
.
getJavaProperty
(),
StudentInfo
.
Column
.
addTime
.
getJavaProperty
(),
StudentInfo
.
Column
.
updateTime
.
getJavaProperty
(),
StudentInfo
.
Column
.
deleted
.
getJavaProperty
(),
"incrementColumnsInfoMap"
);
record
.
setCallTimes
(
0
);
record
.
setAddTime
(
now
);
record
.
setUpdateTime
(
now
);
record
.
setDeleted
(
StudentInfo
.
NOT_DELETED
);
if
(
StringUtils
.
isBlank
(
record
.
getHead
())
||
URL_DEFAULT_HEAD
.
equalsIgnoreCase
(
record
.
getHead
()))
{
record
.
setHead
(
STRING_DEFAULT_HEAD
);
}
studentInfoMapper
.
insert
(
record
);
return
"OK 添加成功"
;
}
...
...
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