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
f4aaad83
Commit
f4aaad83
authored
Jan 16, 2026
by
“Kongxiangkun”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改小e主题活动提醒bug
parent
52c8f832
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
2 deletions
+37
-2
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/api/TrainingProjectMyParamVo.java
+1
-1
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TrainingProjectMapper.java
+4
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TrainingProjectMapper.xml
+27
-1
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TrainingProjectServiceImpl.java
+5
-0
No files found.
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/api/TrainingProjectMyParamVo.java
View file @
f4aaad83
...
...
@@ -15,7 +15,7 @@ import java.util.Date;
@ApiModel
(
value
=
"我的--培训项目列表查询参数vo"
)
public
class
TrainingProjectMyParamVo
{
@ApiModelProperty
(
value
=
"列表类型,1:未开始,2:进行中,3:已完成,4.已过期"
,
notes
=
"必传"
)
@ApiModelProperty
(
value
=
"列表类型,1:未开始,2:进行中,3:已完成,4.已过期
5. 小e主题活动提醒数量
"
,
notes
=
"必传"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"当前时间,必传"
)
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TrainingProjectMapper.java
View file @
f4aaad83
...
...
@@ -120,6 +120,10 @@ public interface TrainingProjectMapper extends BaseMapper<TrainingProject> {
@Param
(
"visiableTpIds"
)
List
<
Long
>
visiableTpIds
,
@Param
(
"finishedTpIds"
)
List
<
Long
>
finishedTpIds
);
Integer
selectMyJoinedPageNumByEnrollDate
(
@Param
(
"now"
)
Date
now
,
@Param
(
"siteId"
)
Long
siteId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"visiableTpIds"
)
List
<
Long
>
visiableTpIds
,
@Param
(
"finishedTpIds"
)
List
<
Long
>
finishedTpIds
);
/**
* 我的培训项目列表 已结束
*
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TrainingProjectMapper.xml
View file @
f4aaad83
...
...
@@ -285,7 +285,7 @@
</select>
<select
id=
"apiPageListCount"
resultType=
"com.yizhi.training.application.vo.domain.TrainingProjectVo"
>
select
en.start_time as startTime,en
.end_time as endTime
select
tb.start_time as startTime,tb
.end_time as endTime
from training_project tb
left join tr_enroll en on tb.id = en.training_project_id
where
...
...
@@ -411,6 +411,32 @@
</select>
<select
id=
"selectMyJoinedPageNumByEnrollDate"
resultType=
"java.lang.Integer"
>
select COUNT (tb.id)
from training_project tb
left join tr_enroll en on tb.id = en.training_project_id
where
-- 首先用站点 id 和上架状态缩小范围
(tb.site_id = #{siteId} and tb.status = 1 and tb.deleted = 0 and
<![CDATA[ DATE_FORMAT(en.start_time, '%Y-%m-%d') <= DATE_FORMAT(#{now}, '%Y-%m-%d')
and DATE_FORMAT(en.end_time, '%Y-%m-%d') >
= DATE_FORMAT(#{now}, '%Y-%m-%d') ]]>)
and
(tb.visible_range = 1
<if
test=
"visiableTpIds != null and visiableTpIds.size > 0"
>
or
(tb.visible_range = 0
and tb.id in
<foreach
collection=
"visiableTpIds"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
)
</if>
)
<if
test=
"finishedTpIds != null and finishedTpIds.size > 0"
>
and (tb.id not in
<foreach
collection=
"finishedTpIds"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
)
</if>
<if
test=
"keyword != null"
>
and (tb.key_words like concat('%', #{keyword}, '%') or tb.name like concat('%', #{keyword}, '%'))
</if>
</select>
<!-- 我的培训项目列表 已结束 -->
<select
id=
"selectMyFinishedPage"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List_simple"
/>
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TrainingProjectServiceImpl.java
View file @
f4aaad83
...
...
@@ -728,6 +728,11 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
// 已过期
else
if
(
vo
.
getType
()
==
4
)
{
trainingProjects
=
trainingProjectMapper
.
selectMyExpiredPage
(
siteId
,
now
,
visiableTpIds
,
finishedIds
,
new
RowBounds
(
page
.
getOffset
(),
page
.
getLimit
()));
}
//特殊查询小e主题活动提醒数量
else
if
(
vo
.
getType
()
==
5
)
{
//trainingProjects = trainingProjectMapper.selectMyJoinedPage(now, siteId, vo.getKeyword(), visiableTpIds, finishedIds, new RowBounds(page.getOffset(), page.getLimit()));
page
.
setTotal
(
trainingProjectMapper
.
selectMyJoinedPageNumByEnrollDate
(
now
,
siteId
,
vo
.
getKeyword
(),
visiableTpIds
,
finishedIds
));
}
else
{
throw
new
Exception
(
"未知的列表类型 - "
+
vo
.
getType
()
+
",请检查:列表类型,1:未开始,2:已开始,3:已完成"
);
}
...
...
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