Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
training-project
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
training-project
Commits
7e65d2b3
Commit
7e65d2b3
authored
Sep 10, 2025
by
“Kongxiangkun”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动签到问题优化
parent
cac32492
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TrainingProjectServiceImpl.java
+6
-1
No files found.
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TrainingProjectServiceImpl.java
View file @
7e65d2b3
...
...
@@ -5,6 +5,8 @@ import java.text.ParseException;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.hutool.json.JSONUtil
;
import
com.google.gson.JsonNull
;
import
com.yizhi.training.application.util.LegacyDateUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
...
...
@@ -820,7 +822,7 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
// 报名通过的
List
<
Long
>
passEnrollTpIds
=
tpStudentEnrollPassedMapper
.
selectTpIds
(
context
.
getAccountId
());
LOGGER
.
info
(
"查询活动{}详情,报名成功id:{},账号:{}"
,
tr
.
getId
(),
passEnrollTpIds
,
context
.
getAccountId
());
// 判断学员是否报名了该项目
if
(
CollectionUtils
.
isEmpty
(
passEnrollTpIds
)
||
!
passEnrollTpIds
.
contains
(
tr
.
getId
()))
{
// 没有报名:判断活动状态是未报名还是报名,默认待报名
...
...
@@ -850,6 +852,7 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
}
else
if
(
tr
.
getEnableSign
()
==
1
)
{
// 查询签到记录
List
<
Long
>
passSignTpIds
=
tpStudentEnrollPassedMapper
.
selectSignTpIds
(
context
.
getAccountId
());
LOGGER
.
info
(
"查询活动{}详情,查询签到记录:{},账号:{}"
,
tr
.
getId
(),
passSignTpIds
,
context
.
getAccountId
());
if
(
CollectionUtils
.
isEmpty
(
passSignTpIds
)
||
!
passSignTpIds
.
contains
(
tr
.
getId
()))
{
// 没有签到:判断活动状态是签到还是未签到,默认待签到
introductionVo
.
setActivityStateCode
(
TrEnrollStatusEnum
.
ACT_WAIT_SIGN
.
getCode
());
...
...
@@ -857,6 +860,7 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
// 根据签到开始时间和签到结束时间设置活动状态
state
=
compareTime
(
tr
.
getSignStartTime
(),
tr
.
getSignEndTime
());
LOGGER
.
info
(
"查询活动{}详情,判断签到状态:{},账号:{}"
,
tr
.
getId
(),
state
,
context
.
getAccountId
());
if
(
state
==
TrEnrollStatusEnum
.
ACT_RUN
)
{
introductionVo
.
setActivityStateCode
(
TrEnrollStatusEnum
.
ACT_SIGN
.
getCode
());
introductionVo
.
setActivityStateName
(
TrEnrollStatusEnum
.
ACT_SIGN
.
getValue
());
...
...
@@ -890,6 +894,7 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
Long
signTimeId
=
tpStudentEnrollPassedMapper
.
selectSignTimeId
(
project
.
getId
());
introductionVo
.
setSignTimeId
(
signTimeId
);
introductionVo
.
setSignType
(
0
);
LOGGER
.
info
(
"查询活动{}详情,返回:{}"
,
tr
.
getId
(),
JSONUtil
.
toJsonStr
(
vo
));
return
vo
;
}
return
null
;
...
...
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