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
4e9acb03
Commit
4e9acb03
authored
Oct 31, 2024
by
梅存智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目评论增加关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯
parent
3fa8e1ed
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
40 additions
and
12 deletions
+40
-12
cloud-training-project-api/src/main/java/com/yizhi/training/application/feign/TpCommentClient.java
+1
-0
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/api/TrCommentVo.java
+3
-0
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/domain/TpCommentVo.java
+2
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TpCommentController.java
+2
-1
cloud-training-project-service/src/main/java/com/yizhi/training/application/domain/TpComment.java
+2
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TpCommentMapper.java
+4
-3
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TpCommentMapper.xml
+18
-0
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/ITpCommentService.java
+2
-2
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TpCommentServiceImpl.java
+5
-5
cloud-training-project-service/src/main/java/com/yizhi/training/application/task/CommentListExportAsync.java
+1
-1
No files found.
cloud-training-project-api/src/main/java/com/yizhi/training/application/feign/TpCommentClient.java
View file @
4e9acb03
...
@@ -22,6 +22,7 @@ public interface TpCommentClient {
...
@@ -22,6 +22,7 @@ public interface TpCommentClient {
@GetMapping
(
"/tpComment/list"
)
@GetMapping
(
"/tpComment/list"
)
Page
<
PageCommentVo
>
list
(
Page
<
PageCommentVo
>
list
(
@RequestParam
(
name
=
"trainingProjectId"
)
Long
trainingProjectId
,
@RequestParam
(
name
=
"trainingProjectId"
)
Long
trainingProjectId
,
@RequestParam
(
name
=
"bizType"
,
required
=
false
)
Integer
bizType
,
@RequestParam
(
name
=
"accountId"
)
Long
accountId
,
@RequestParam
(
name
=
"accountId"
)
Long
accountId
,
@RequestParam
(
name
=
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
name
=
"pageSize"
)
Integer
pageSize
,
...
...
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/api/TrCommentVo.java
View file @
4e9acb03
...
@@ -10,6 +10,9 @@ public class TrCommentVo {
...
@@ -10,6 +10,9 @@ public class TrCommentVo {
@ApiModelProperty
(
value
=
"培训项目Id 必传"
,
required
=
true
)
@ApiModelProperty
(
value
=
"培训项目Id 必传"
,
required
=
true
)
Long
trainingProjectId
;
Long
trainingProjectId
;
@ApiModelProperty
(
value
=
"关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯"
)
Integer
bizType
;
@ApiModelProperty
(
value
=
"评论分页参数"
)
@ApiModelProperty
(
value
=
"评论分页参数"
)
Integer
pageNo
=
1
;
Integer
pageNo
=
1
;
...
...
cloud-training-project-api/src/main/java/com/yizhi/training/application/vo/domain/TpCommentVo.java
View file @
4e9acb03
...
@@ -65,6 +65,8 @@ public class TpCommentVo extends Model<TpCommentVo> {
...
@@ -65,6 +65,8 @@ public class TpCommentVo extends Model<TpCommentVo> {
@ApiModelProperty
(
value
=
"用户头像"
)
@ApiModelProperty
(
value
=
"用户头像"
)
private
String
userAvatar
;
private
String
userAvatar
;
@ApiModelProperty
(
value
=
"业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯"
)
private
Integer
bizType
;
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/controller/TpCommentController.java
View file @
4e9acb03
...
@@ -85,13 +85,14 @@ public class TpCommentController {
...
@@ -85,13 +85,14 @@ public class TpCommentController {
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
Page
<
PageCommentVo
>
list
(
public
Page
<
PageCommentVo
>
list
(
@RequestParam
(
name
=
"trainingProjectId"
)
Long
trainingProjectId
,
@RequestParam
(
name
=
"trainingProjectId"
)
Long
trainingProjectId
,
@RequestParam
(
name
=
"bizType"
,
required
=
false
)
Integer
bizType
,
@RequestParam
(
name
=
"accountId"
)
Long
accountId
,
@RequestParam
(
name
=
"accountId"
)
Long
accountId
,
@RequestParam
(
name
=
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageNo"
)
Integer
pageNo
,
@RequestParam
(
name
=
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
name
=
"pageSize"
)
Integer
pageSize
,
@RequestParam
(
name
=
"type"
)
Integer
type
@RequestParam
(
name
=
"type"
)
Integer
type
)
{
)
{
Page
<
PageCommentVo
>
page
=
iTpCommentService
.
getCommentPage
(
trainingProjectId
,
accountId
,
pageNo
,
pageSize
,
type
);
Page
<
PageCommentVo
>
page
=
iTpCommentService
.
getCommentPage
(
trainingProjectId
,
bizType
,
accountId
,
pageNo
,
pageSize
,
type
);
String
fullName
;
String
fullName
;
String
name
;
String
name
;
TpCommentReply
reply
=
new
TpCommentReply
();
TpCommentReply
reply
=
new
TpCommentReply
();
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/domain/TpComment.java
View file @
4e9acb03
...
@@ -83,6 +83,8 @@ public class TpComment extends Model<TpComment> {
...
@@ -83,6 +83,8 @@ public class TpComment extends Model<TpComment> {
@TableField
(
"user_avatar"
)
@TableField
(
"user_avatar"
)
private
String
userAvatar
;
private
String
userAvatar
;
@ApiModelProperty
(
value
=
"关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯"
)
private
Integer
bizType
;
@Override
@Override
protected
Serializable
pkVal
()
{
protected
Serializable
pkVal
()
{
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TpCommentMapper.java
View file @
4e9acb03
...
@@ -21,12 +21,13 @@ public interface TpCommentMapper extends BaseMapper<TpComment> {
...
@@ -21,12 +21,13 @@ public interface TpCommentMapper extends BaseMapper<TpComment> {
/**
/**
* 培训项目列表分页查询 RowBounds
* 培训项目列表分页查询 RowBounds
* @param trainingProjectId
* @param trainingProjectId
* @param bizType 关联业务类型:1活动服务;2新闻资讯;3培训测试;4培训资讯
* @param rowBounds
* @param rowBounds
* @return
* @return
*/
*/
List
<
PageCommentVo
>
searchPage
(
@Param
(
"trainingProjectId"
)
Long
trainingProjectId
,
@Param
(
"accountId"
)
Long
accountId
,
RowBounds
rowBounds
,
@Param
(
"type"
)
Integer
type
);
List
<
PageCommentVo
>
searchPage
(
@Param
(
"trainingProjectId"
)
Long
trainingProjectId
,
@Param
(
"bizType"
)
Integer
bizType
,
@Param
(
"accountId"
)
Long
accountId
,
RowBounds
rowBounds
,
@Param
(
"type"
)
Integer
type
);
Integer
searchPageCount
(
@Param
(
"trainingProjectId"
)
Long
trainingProjectId
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"type"
)
Integer
type
);
Integer
searchPageCount
(
@Param
(
"trainingProjectId"
)
Long
trainingProjectId
,
@Param
(
"bizType"
)
Integer
bizType
,
@Param
(
"accountId"
)
Long
accountId
,
@Param
(
"type"
)
Integer
type
);
List
<
PageCommentVo
>
getList
(
@Param
(
"trainingProjectId"
)
Long
trainingProjectId
,
@Param
(
"accountId"
)
Long
accountId
);
List
<
PageCommentVo
>
getList
(
@Param
(
"trainingProjectId"
)
Long
trainingProjectId
,
@Param
(
"bizType"
)
Integer
bizType
,
@Param
(
"accountId"
)
Long
accountId
);
}
}
cloud-training-project-service/src/main/java/com/yizhi/training/application/mapper/TpCommentMapper.xml
View file @
4e9acb03
...
@@ -98,6 +98,12 @@
...
@@ -98,6 +98,12 @@
AND tuu.`account_id` = #{accountId}
AND tuu.`account_id` = #{accountId}
WHERE
WHERE
c.`training_project_id` = #{trainingProjectId}
c.`training_project_id` = #{trainingProjectId}
<if
test=
"bizType == null"
>
AND c.biz_type=1
</if>
<if
test=
"bizType != null"
>
AND c.biz_type=#{bizType}
</if>
AND c.`audit_status` = 0
AND c.`audit_status` = 0
<if
test=
"type != 0 "
>
<if
test=
"type != 0 "
>
and c.state=0
and c.state=0
...
@@ -157,6 +163,12 @@
...
@@ -157,6 +163,12 @@
AND tuu.`account_id` = #{accountId}
AND tuu.`account_id` = #{accountId}
WHERE
WHERE
c.`training_project_id` = #{trainingProjectId}
c.`training_project_id` = #{trainingProjectId}
<if
test=
"bizType == null"
>
AND c.biz_type=1
</if>
<if
test=
"bizType != null"
>
AND c.biz_type=#{bizType}
</if>
AND c.`audit_status` = 0
AND c.`audit_status` = 0
<if
test=
"type != 0 "
>
<if
test=
"type != 0 "
>
and c.state=0
and c.state=0
...
@@ -220,6 +232,12 @@
...
@@ -220,6 +232,12 @@
AND tuu.`account_id` = #{accountId}
AND tuu.`account_id` = #{accountId}
WHERE
WHERE
c.`training_project_id` = #{trainingProjectId}
c.`training_project_id` = #{trainingProjectId}
<if
test=
"bizType == null"
>
AND c.biz_type=1
</if>
<if
test=
"bizType != null"
>
AND c.biz_type=#{bizType}
</if>
AND c.`audit_status` = 0
AND c.`audit_status` = 0
GROUP BY
GROUP BY
c.`id`
c.`id`
...
...
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/ITpCommentService.java
View file @
4e9acb03
...
@@ -17,7 +17,7 @@ import com.yizhi.training.application.vo.manage.PageCommentVo;
...
@@ -17,7 +17,7 @@ import com.yizhi.training.application.vo.manage.PageCommentVo;
*/
*/
public
interface
ITpCommentService
extends
IService
<
TpComment
>
{
public
interface
ITpCommentService
extends
IService
<
TpComment
>
{
Page
<
PageCommentVo
>
getCommentPage
(
Long
trainingProjectId
,
Long
accountId
,
int
pageNo
,
int
pageSize
,
int
type
);
Page
<
PageCommentVo
>
getCommentPage
(
Long
trainingProjectId
,
Integer
bizType
,
Long
accountId
,
int
pageNo
,
int
pageSize
,
int
type
);
List
<
PageCommentVo
>
getList
(
Long
trainingProjectId
,
Long
accountId
);
List
<
PageCommentVo
>
getList
(
Long
trainingProjectId
,
Integer
bizType
,
Long
accountId
);
}
}
cloud-training-project-service/src/main/java/com/yizhi/training/application/service/impl/TpCommentServiceImpl.java
View file @
4e9acb03
...
@@ -24,17 +24,17 @@ import org.springframework.stereotype.Service;
...
@@ -24,17 +24,17 @@ import org.springframework.stereotype.Service;
public
class
TpCommentServiceImpl
extends
ServiceImpl
<
TpCommentMapper
,
TpComment
>
implements
ITpCommentService
{
public
class
TpCommentServiceImpl
extends
ServiceImpl
<
TpCommentMapper
,
TpComment
>
implements
ITpCommentService
{
@Override
@Override
public
Page
<
PageCommentVo
>
getCommentPage
(
Long
trainingProjectId
,
Long
accountId
,
int
pageNo
,
int
pageSize
,
int
type
)
{
public
Page
<
PageCommentVo
>
getCommentPage
(
Long
trainingProjectId
,
Integer
bizType
,
Long
accountId
,
int
pageNo
,
int
pageSize
,
int
type
)
{
Page
<
PageCommentVo
>
page
=
new
Page
<
PageCommentVo
>(
pageNo
,
pageSize
);
Page
<
PageCommentVo
>
page
=
new
Page
<
PageCommentVo
>(
pageNo
,
pageSize
);
page
.
setRecords
(
this
.
baseMapper
.
searchPage
(
trainingProjectId
,
accountId
,
new
RowBounds
(
page
.
getOffset
(),
page
.
getLimit
()),
type
));
page
.
setRecords
(
this
.
baseMapper
.
searchPage
(
trainingProjectId
,
bizType
,
accountId
,
new
RowBounds
(
page
.
getOffset
(),
page
.
getLimit
()),
type
));
Integer
count
=
this
.
baseMapper
.
searchPageCount
(
trainingProjectId
,
accountId
,
type
);
Integer
count
=
this
.
baseMapper
.
searchPageCount
(
trainingProjectId
,
bizType
,
accountId
,
type
);
page
.
setTotal
(
count
);
page
.
setTotal
(
count
);
return
page
;
return
page
;
}
}
@Override
@Override
public
List
<
PageCommentVo
>
getList
(
Long
trainingProjectId
,
Long
accountId
){
public
List
<
PageCommentVo
>
getList
(
Long
trainingProjectId
,
Integer
bizType
,
Long
accountId
){
List
<
PageCommentVo
>
list
=
this
.
baseMapper
.
getList
(
trainingProjectId
,
accountId
);
List
<
PageCommentVo
>
list
=
this
.
baseMapper
.
getList
(
trainingProjectId
,
bizType
,
accountId
);
return
list
;
return
list
;
}
}
}
}
cloud-training-project-service/src/main/java/com/yizhi/training/application/task/CommentListExportAsync.java
View file @
4e9acb03
...
@@ -72,7 +72,7 @@ public class CommentListExportAsync extends
...
@@ -72,7 +72,7 @@ public class CommentListExportAsync extends
fileDir
.
mkdir
();
fileDir
.
mkdir
();
}
}
//项目评论开始组装
//项目评论开始组装
List
<
PageCommentVo
>
list
=
tpCommentService
.
getList
(
trainingProjectId
,
accountId
);
List
<
PageCommentVo
>
list
=
tpCommentService
.
getList
(
trainingProjectId
,
null
,
accountId
);
List
<
PageCommentVo
>
listVO
=
new
ArrayList
<
PageCommentVo
>();
List
<
PageCommentVo
>
listVO
=
new
ArrayList
<
PageCommentVo
>();
TpCommentReply
reply
=
new
TpCommentReply
();
TpCommentReply
reply
=
new
TpCommentReply
();
PageCommentVo
vo
=
new
PageCommentVo
();
PageCommentVo
vo
=
new
PageCommentVo
();
...
...
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