Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
peizhen-java
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
PeiZhen-Java
peizhen-java
Commits
4cbb57a9
Commit
4cbb57a9
authored
Sep 20, 2023
by
sdif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户端代码提交
parent
92d322a5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
pz-system/src/main/java/com/pz/system/mapper/ArticleCommentMapper.java
+1
-1
pz-system/src/main/java/com/pz/system/service/impl/ArticleServiceImpl.java
+1
-1
pz-system/src/main/resources/mapper/system/ArticleCommentMapper.xml
+1
-1
No files found.
pz-system/src/main/java/com/pz/system/mapper/ArticleCommentMapper.java
View file @
4cbb57a9
...
...
@@ -14,5 +14,5 @@ import java.util.List;
* @date 2023-09-07
*/
public
interface
ArticleCommentMapper
extends
BaseMapperPlus
<
ArticleCommentMapper
,
ArticleComment
,
ArticleCommentVo
>
{
List
<
ArticleCommentVo
>
selectByArticleComment
(
@Param
(
"aid"
)
Integer
aid
,
@Param
(
"uid"
)
Integer
uid
);
List
<
ArticleCommentVo
>
selectByArticleComment
(
@Param
(
"aid"
)
Integer
aid
);
}
pz-system/src/main/java/com/pz/system/service/impl/ArticleServiceImpl.java
View file @
4cbb57a9
...
...
@@ -80,7 +80,7 @@ public class ArticleServiceImpl implements IArticleService {
articleVo
.
setCollectNum
(
Math
.
toIntExact
(
collectCount
));
// 查询用户评论
List
<
ArticleCommentVo
>
articleCommentVos
=
articleCommentMapper
.
selectByArticleComment
(
id
,
loginUser
.
getUserId
().
intValue
()
);
List
<
ArticleCommentVo
>
articleCommentVos
=
articleCommentMapper
.
selectByArticleComment
(
id
);
// 查询用户信息并设置到评论中
/*if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
...
...
pz-system/src/main/resources/mapper/system/ArticleCommentMapper.xml
View file @
4cbb57a9
...
...
@@ -3,6 +3,6 @@
<mapper
namespace=
"com.pz.system.mapper.ArticleCommentMapper"
>
<select
id=
"selectByArticleComment"
resultType=
"com.pz.system.domain.vo.ArticleCommentVo"
>
SELECT a.*,s.avatar,s.user_name FROM article_comment a left join sys_user s on s.user_id = a.uid
WHERE a.aid = #{aid}
and a.uid = #{uid}
WHERE a.aid = #{aid}
</select>
</mapper>
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