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
b2831a2e
You need to sign in or sign up before continuing.
Commit
b2831a2e
authored
May 31, 2025
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改BUG
parent
e38d1aab
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
4 deletions
+57
-4
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/domain/LeaveWordVo.java
+3
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TpStudentEnrollPassedController.java
+5
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TrainingProjectController.java
+1
-1
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/LeaveWordMapper.java
+6
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/LeaveWordMapper.xml
+15
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/LeaveWordServiceImpl.java
+22
-1
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TrainingProjectServiceImpl.java
+5
-2
No files found.
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/domain/LeaveWordVo.java
View file @
b2831a2e
...
...
@@ -76,6 +76,9 @@ public class LeaveWordVo extends Model<LeaveWordVo> {
@ApiModelProperty
(
value
=
"业务类型:1-功能异常、2-体验问题、3-产品建议、4-其他"
)
private
Integer
bizType
;
@ApiModelProperty
(
value
=
"姓名"
)
private
String
fullName
;
@Override
protected
Serializable
pkVal
()
{
return
this
.
id
;
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TpStudentEnrollPassedController.java
View file @
b2831a2e
...
...
@@ -84,6 +84,11 @@ public class TpStudentEnrollPassedController {
e
.
printStackTrace
();
}
}
//判断是否要签到,不要签到就完成项目
if
(
tp
.
getEnableSign
()
==
0
){
trainingProjectService
.
trainingProjectFinished
(
projrctId
,
requestContext
.
getSiteId
(),
requestContext
.
getAccountId
());
}
return
tep
.
getId
();
}
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TrainingProjectController.java
View file @
b2831a2e
...
...
@@ -497,7 +497,7 @@ public class TrainingProjectController {
@PostMapping
(
"/api/detail/progress/get"
)
public
TrainingProjectDetailVo
getTpDetailWithProgress
(
@RequestBody
BaseModel
<
Long
>
model
)
throws
ParseException
{
TrainingProjectDetailVo
vo
=
trainingProjectService
.
getTpDetail
(
model
.
getObj
(),
model
.
getContext
(),
model
.
getDate
(),
true
);
if
(
null
!=
vo
.
getIntroductionVo
().
getEnroll
())
{
if
(
vo
!=
null
&&
null
!=
vo
.
getIntroductionVo
().
getEnroll
())
{
vo
.
getIntroductionVo
().
setEnrollLimit
(
vo
.
getIntroductionVo
().
getEnroll
().
getLimit
());
}
return
vo
;
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/LeaveWordMapper.java
View file @
b2831a2e
...
...
@@ -3,9 +3,12 @@ package com.yizhi.training.application.mapper;
import
com.baomidou.mybatisplus.mapper.BaseMapper
;
import
com.yizhi.training.application.domain.LeaveWord
;
import
com.yizhi.training.application.vo.domain.AuthzUserGroupVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* com.yizhi.training.application.mapper
...
...
@@ -20,4 +23,7 @@ public interface LeaveWordMapper extends BaseMapper<LeaveWord> {
AuthzUserGroupVo
getUserGroupById
(
@Param
(
"groupId"
)
Long
groupId
);
List
<
AuthzUserGroupVo
>
queryUserGroupByIds
(
@Param
(
"groupIds"
)
List
<
Long
>
groupIds
);
@MapKey
(
"id"
)
Map
<
Long
,
Map
<
Long
,
String
>>
queryAccountNameByIds
(
@Param
(
"accountIds"
)
List
<
Long
>
accountIds
);
}
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/LeaveWordMapper.xml
View file @
b2831a2e
...
...
@@ -47,4 +47,18 @@
where
aug.id = #{groupId}
</select>
<select
id=
"queryAccountNameByIds"
resultType=
"java.util.Map"
>
select
a.id,
a.full_name AS fullName
from
cloud_system.account a
where
a.id in
<foreach
item=
"item"
index=
"index"
collection=
"accountIds"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
AND a.deleted=0
</select>
</mapper>
\ No newline at end of file
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/LeaveWordServiceImpl.java
View file @
b2831a2e
...
...
@@ -36,12 +36,17 @@ public class LeaveWordServiceImpl extends ServiceImpl<LeaveWordMapper, LeaveWord
@Autowired
private
IdGenerator
idGenerator
;
@Autowired
private
LeaveWordMapper
leaveWordMapper
;
@Override
public
Page
<
LeaveWordVo
>
page
(
LeaveWordParamVo
paramVo
){
Page
<
LeaveWordVo
>
page
=
new
Page
(
paramVo
.
getPageNo
(),
paramVo
.
getPageSize
());
Page
<
LeaveWord
>
paramPage
=
new
Page
(
paramVo
.
getPageNo
(),
paramVo
.
getPageSize
());
EntityWrapper
<
LeaveWord
>
map
=
new
EntityWrapper
<
LeaveWord
>();
RequestContext
context
=
ContextHolder
.
get
();
RequestContext
context
=
new
RequestContext
();
//ContextHolder.get();
context
.
setSiteId
(
1635853066584846336L
);
map
.
eq
(
"site_id"
,
context
.
getSiteId
());
if
(
ObjectUtil
.
isNotEmpty
(
paramVo
.
getName
())){
map
.
like
(
"name"
,
paramVo
.
getName
());
...
...
@@ -76,6 +81,8 @@ public class LeaveWordServiceImpl extends ServiceImpl<LeaveWordMapper, LeaveWord
groupVoMap
=
authzUserGroupVoList
.
stream
().
collect
(
Collectors
.
toMap
(
AuthzUserGroupVo:
:
getId
,
a
->
a
));
}
}
List
<
Long
>
accountIds
=
new
ArrayList
<
Long
>();
Map
<
Long
,
AuthzUserGroupVo
>
finalGroupVoMap
=
groupVoMap
;
leaveWordList
.
stream
().
forEach
(
leaveWord
->
{
LeaveWordVo
leaveWordVo
=
new
LeaveWordVo
();
...
...
@@ -85,8 +92,22 @@ public class LeaveWordServiceImpl extends ServiceImpl<LeaveWordMapper, LeaveWord
leaveWordVo
.
setGroupName
(
groupVo
.
getName
());
leaveWordVo
.
setOrgName
(
groupVo
.
getDescription
());
leaveWordVoList
.
add
(
leaveWordVo
);
accountIds
.
add
(
leaveWordVo
.
getCreateById
());
}
});
//设置姓名
if
(
CollUtil
.
isNotEmpty
(
accountIds
))
{
Map
<
Long
,
Map
<
Long
,
String
>>
accountMap
=
leaveWordMapper
.
queryAccountNameByIds
(
accountIds
);
if
(
accountMap
!=
null
){
leaveWordVoList
.
stream
().
forEach
(
leaveWord
->
{
if
(
accountMap
.
get
(
leaveWord
.
getCreateById
())
!=
null
){
leaveWord
.
setFullName
(
accountMap
.
get
(
leaveWord
.
getCreateById
()).
get
(
"fullName"
));
}
});
}
}
}
page
.
setRecords
(
leaveWordVoList
);
}
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TrainingProjectServiceImpl.java
View file @
b2831a2e
...
...
@@ -607,7 +607,7 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
vo
.
setActivityStateCode
(
TrEnrollStatusEnum
.
ACT_NO_ENROLL
.
getCode
());
vo
.
setActivityStateName
(
TrEnrollStatusEnum
.
ACT_NO_ENROLL
.
getValue
());
}
}
else
{
}
else
if
(
tr
.
getEnableSign
()
==
1
)
{
//查询签到记录
List
<
Long
>
passSignTpIds
=
tpStudentEnrollPassedMapper
.
selectSignTpIds
(
context
.
getAccountId
());
if
(
CollectionUtils
.
isEmpty
(
passSignTpIds
)
||
!
passSignTpIds
.
contains
(
tr
.
getId
()))
{
...
...
@@ -804,6 +804,9 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
* 设置活动状态: 1、先根据项目的开始和结束时间设置活动状态
*/
com
.
yizhi
.
training
.
application
.
vo
.
domain
.
TrainingProjectVo
tr
=
trainingProjectMapper
.
selectTrainingProjectTime
(
context
.
getSiteId
(),
trainingProjectId
);
if
(
tr
==
null
){
return
null
;
}
TrEnrollStatusEnum
state
=
compareTime
(
tr
.
getStartTime
(),
tr
.
getEndTime
());
introductionVo
.
setActivityStateCode
(
state
.
getCode
());
introductionVo
.
setActivityStateName
(
state
.
getValue
());
...
...
@@ -844,7 +847,7 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
introductionVo
.
setActivityStateCode
(
TrEnrollStatusEnum
.
ACT_NO_ENROLL
.
getCode
());
introductionVo
.
setActivityStateName
(
TrEnrollStatusEnum
.
ACT_NO_ENROLL
.
getValue
());
}
}
else
{
}
else
if
(
tr
.
getEnableSign
()
==
1
)
{
// 查询签到记录
List
<
Long
>
passSignTpIds
=
tpStudentEnrollPassedMapper
.
selectSignTpIds
(
context
.
getAccountId
());
if
(
CollectionUtils
.
isEmpty
(
passSignTpIds
)
||
!
passSignTpIds
.
contains
(
tr
.
getId
()))
{
...
...
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