Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
7321f5e1
Commit
7321f5e1
authored
Sep 26, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 好办评论
parent
40ac1a1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
CommentController.java
...oban/manage/web/controller/content/CommentController.java
+24
-6
CommentCountQO.java
.../haoban/manage/web/qo/content/comment/CommentCountQO.java
+5
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/CommentController.java
View file @
7321f5e1
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
content
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.content.api.dto.comment.ListCommentDTO
;
import
com.gic.content.api.dto.comment.ListSonCommentDTO
;
import
com.gic.content.api.enums.MaterialPurposeEnum
;
import
com.gic.content.api.enums.UserTypeEnum
;
import
com.gic.content.api.qdto.comment.ListMobileCommentQDTO
;
import
com.gic.content.api.qdto.comment.SaveCommentQDTO
;
...
...
@@ -56,7 +59,7 @@ public class CommentController {
ListMobileCommentQDTO
mobileCommentQDTO
=
new
ListMobileCommentQDTO
();
mobileCommentQDTO
.
setEnterpriseId
(
commentCountQO
.
getEnterpriseId
());
mobileCommentQDTO
.
setContentMaterial
Comment
Id
(
commentCountQO
.
getContentMaterialId
());
mobileCommentQDTO
.
setContentMaterialId
(
commentCountQO
.
getContentMaterialId
());
mobileCommentQDTO
.
setMemberId
(
commentCountQO
.
getClerkId
());
mobileCommentQDTO
.
setMaterialPurpose
(
3
);
ServiceResponse
<
Integer
>
serviceResponse
=
contentMaterialCommentApiService
.
countCommentForWechat
(
mobileCommentQDTO
);
...
...
@@ -72,12 +75,15 @@ public class CommentController {
public
RestResponse
<
Page
<
CommentInfoVO
>>
listCommentInfoVo
(
CommentCountQO
commentCountQO
)
{
ListMobileCommentQDTO
mobileCommentQDTO
=
new
ListMobileCommentQDTO
();
mobileCommentQDTO
.
setEnterpriseId
(
commentCountQO
.
getEnterpriseId
());
mobileCommentQDTO
.
setContentMaterial
Comment
Id
(
commentCountQO
.
getContentMaterialId
());
mobileCommentQDTO
.
setContentMaterialId
(
commentCountQO
.
getContentMaterialId
());
mobileCommentQDTO
.
setMemberId
(
commentCountQO
.
getClerkId
());
mobileCommentQDTO
.
setMaterialPurpose
(
3
);
mobileCommentQDTO
.
setMaterialPurpose
(
MaterialPurposeEnum
.
KNOWLEDGE
.
code
);
ServiceResponse
<
Page
<
ListCommentDTO
>>
serviceResponse
=
contentMaterialCommentApiService
.
listComment
(
mobileCommentQDTO
);
return
RestResponse
.
successResult
();
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
Page
<
CommentInfoVO
>
commentInfoVOPage
=
PageHelperUtils
.
changePageToCurrentPage
(
serviceResponse
.
getResult
(),
CommentInfoVO
.
class
);
return
RestResponse
.
successResult
(
commentInfoVOPage
);
}
/**
...
...
@@ -86,7 +92,19 @@ public class CommentController {
*/
@RequestMapping
(
path
=
"/list-son-comment"
)
public
RestResponse
<
Page
<
SonCommentInfoVO
>>
listSonComment
(
CommentCountQO
commentCountQO
)
{
return
RestResponse
.
successResult
();
if
(
ObjectUtil
.
isEmpty
(
commentCountQO
.
getNextContentMaterialCommentId
())){
commentCountQO
.
setNextContentMaterialCommentId
(
0L
);
}
ListMobileCommentQDTO
listMobileCommentQDTO
=
EntityUtil
.
changeEntityByJSON
(
ListMobileCommentQDTO
.
class
,
commentCountQO
);
listMobileCommentQDTO
.
setMemberId
(
commentCountQO
.
getClerkId
());
listMobileCommentQDTO
.
setMaterialPurpose
(
MaterialPurposeEnum
.
KNOWLEDGE
.
code
);
ServiceResponse
<
Page
<
ListSonCommentDTO
>>
serviceResponse
=
contentMaterialCommentApiService
.
listSonCommentForWechat
(
listMobileCommentQDTO
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
Page
<
SonCommentInfoVO
>
commentInfoVOPage
=
PageHelperUtils
.
changePageToCurrentPage
(
serviceResponse
.
getResult
(),
SonCommentInfoVO
.
class
);
return
RestResponse
.
successResult
(
commentInfoVOPage
);
}
/**
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/comment/CommentCountQO.java
View file @
7321f5e1
...
...
@@ -28,4 +28,9 @@ public class CommentCountQO extends BasePageInfo {
* 导购id
*/
private
String
clerkId
;
/**
* 滚动查询,评论ID
*/
private
Long
nextContentMaterialCommentId
;
}
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