Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
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
李伟
cust-api
Commits
484f05fd
Commit
484f05fd
authored
Mar 03, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了bug
parent
8ee88be4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+7
-5
OpmArticleMapper.xml
...es/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
+4
-3
No files found.
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
View file @
484f05fd
...
@@ -543,11 +543,13 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
...
@@ -543,11 +543,13 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
dto
.
setCreateBy
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
dto
.
setCreateBy
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
dto
.
setUpdateBy
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
dto
.
setUpdateBy
(
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
int
line
=
baseMapper
.
addComment
(
dto
);
int
line
=
baseMapper
.
addComment
(
dto
);
//修改主表的评论数
if
(
dto
.
getExamStatus
().
equals
(
"1"
)){
baseMapper
.
addArticleCommentCount
(
dto
.
getArticleId
());
//修改主表的评论数
//修改子表的评论数 给父级评论数+1
baseMapper
.
addArticleCommentCount
(
dto
.
getArticleId
());
if
(
dto
.
getParentId
()
!=
null
){
//修改子表的评论数 给父级评论数+1
baseMapper
.
addCommentCount
(
dto
.
getParentId
());
if
(
dto
.
getParentId
()
!=
null
){
baseMapper
.
addCommentCount
(
dto
.
getParentId
());
}
}
}
return
new
CyPersistModel
(
1
);
return
new
CyPersistModel
(
1
);
}
}
...
...
src/main/resources/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
View file @
484f05fd
...
@@ -391,7 +391,8 @@
...
@@ -391,7 +391,8 @@
WHERE 1 = 1
WHERE 1 = 1
AND opc.del_flag = '0'
AND opc.del_flag = '0'
AND opc.parent_id is null
AND opc.parent_id is null
AND opc.article_id = 6
AND opc.article_id = #{articleId}
and opc.exam_status = '1'
AND NOT EXISTS (
AND NOT EXISTS (
SELECT 1 FROM opm_black_list obl
SELECT 1 FROM opm_black_list obl
WHERE (obl.user_id = #{loginUserId} AND obl.target_id = opc.user_id)
WHERE (obl.user_id = #{loginUserId} AND obl.target_id = opc.user_id)
...
@@ -444,12 +445,12 @@
...
@@ -444,12 +445,12 @@
<insert
id=
"addComment"
>
<insert
id=
"addComment"
>
INSERT INTO opm_article_comment
INSERT INTO opm_article_comment
(
(
create_by, create_date, update_by, update_date, content, parent_id, article_id, user_id
create_by, create_date, update_by, update_date, content, parent_id, article_id, user_id
,exam_status
)
)
VALUES
VALUES
(
(
#{entity.createBy}, #{entity.createDate},#{entity.updateBy},#{entity.updateDate},
#{entity.createBy}, #{entity.createDate},#{entity.updateBy},#{entity.updateDate},
#{entity.commentContent},#{entity.parentId},#{entity.articleId},#{entity.commentedUserId}
#{entity.commentContent},#{entity.parentId},#{entity.articleId},#{entity.commentedUserId}
,#{entity.examStatus}
)
)
</insert>
</insert>
</mapper>
</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