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
671b203a
Commit
671b203a
authored
Mar 07, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了动态评论删除和新增
parent
6b661824
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
42 additions
and
12 deletions
+42
-12
AppOpmArticleController.java
...ft/app/appArticle/controller/AppOpmArticleController.java
+1
-1
MemInfo.java
...ain/java/org/rcisoft/business/memInfo/entity/MemInfo.java
+7
-0
ArticleCommentVO.java
.../rcisoft/business/opmArticle/entity/ArticleCommentVO.java
+6
-0
OpmArticle.java
...va/org/rcisoft/business/opmArticle/entity/OpmArticle.java
+6
-0
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+19
-11
OpmArticleMapper.xml
...es/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
+3
-0
No files found.
src/main/java/org/rcisoft/app/appArticle/controller/AppOpmArticleController.java
View file @
671b203a
...
@@ -51,7 +51,7 @@ public class AppOpmArticleController extends CyPaginationController<OpmArticle>
...
@@ -51,7 +51,7 @@ public class AppOpmArticleController extends CyPaginationController<OpmArticle>
}
}
@PreAuthorize
(
"@cyPerm.hasPerm('
sys
:opmArticle:delete')"
)
@PreAuthorize
(
"@cyPerm.hasPerm('
app
:opmArticle:delete')"
)
@CyOpeLogAnno
(
title
=
"system-opmArticle管理管理-删除动态"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@CyOpeLogAnno
(
title
=
"system-opmArticle管理管理-删除动态"
,
businessType
=
CyLogTypeEnum
.
DELETE
)
@Operation
(
summary
=
"删除动态"
,
description
=
"删除动态"
)
@Operation
(
summary
=
"删除动态"
,
description
=
"删除动态"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
true
)})
...
...
src/main/java/org/rcisoft/business/memInfo/entity/MemInfo.java
View file @
671b203a
...
@@ -612,6 +612,13 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> {
...
@@ -612,6 +612,13 @@ public class MemInfo extends CyIdIncreEntity<MemInfo> {
/**
/**
* 学历认证图片url
* 学历认证图片url
*/
*/
@TableField
(
exist
=
false
)
private
String
memEducationUrl
;
private
String
memEducationUrl
;
/**
* 动态内容
*/
@TableField
(
exist
=
false
)
private
String
articleContent
;
}
}
src/main/java/org/rcisoft/business/opmArticle/entity/ArticleCommentVO.java
View file @
671b203a
...
@@ -84,6 +84,12 @@ public class ArticleCommentVO {
...
@@ -84,6 +84,12 @@ public class ArticleCommentVO {
*/
*/
private
String
isLike
;
private
String
isLike
;
/**
* 审核状态
*/
private
String
examStatus
;
/**
/**
* 子评论
* 子评论
*/
*/
...
...
src/main/java/org/rcisoft/business/opmArticle/entity/OpmArticle.java
View file @
671b203a
...
@@ -243,5 +243,11 @@ public class OpmArticle extends CyIdIncreEntity<OpmArticle> {
...
@@ -243,5 +243,11 @@ public class OpmArticle extends CyIdIncreEntity<OpmArticle> {
*/
*/
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
isPay
;
private
String
isPay
;
/**
* 话题名称
*/
@TableField
(
exist
=
false
)
private
Integer
topicName
;
}
}
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
View file @
671b203a
...
@@ -497,23 +497,31 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
...
@@ -497,23 +497,31 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
public
CyPersistModel
removeComment
(
ArticleCommentDTO
dto
,
String
type
){
public
CyPersistModel
removeComment
(
ArticleCommentDTO
dto
,
String
type
){
if
(
type
.
equals
(
"app"
)){
if
(
type
.
equals
(
"app"
)){
//app端
//app端
ArticleCommentVO
comment
=
baseMapper
.
selectCommentById
(
dto
.
getBusinessId
());
//删除评论
//删除评论
int
line
=
baseMapper
.
deleteComment
(
dto
);
int
line
=
baseMapper
.
deleteComment
(
dto
);
int
childrenCommentCount
=
0
;
int
childrenCommentCount
=
0
;
OpmArticle
article
=
new
OpmArticle
();
article
.
setBusinessId
(
dto
.
getArticleId
());
if
(
dto
.
getParentId
()
!=
null
){
if
(
dto
.
getParentId
()
!=
null
){
//删除的子评论 需要减掉父评论的数量
if
(
comment
.
getExamStatus
().
equals
(
"1"
)){
baseMapper
.
reduceCommentCount
(
dto
.
getParentId
());
//删除的子评论 需要减掉父评论的数量
baseMapper
.
reduceCommentCount
(
dto
.
getParentId
());
article
.
setCommentCount
(
1
);
}
}
else
{
}
else
{
//删除的是父评论 要查父评论下的子评论数量
if
(
comment
.
getExamStatus
().
equals
(
"1"
)){
ArticleCommentVO
vo
=
new
ArticleCommentVO
();
//删除的是父评论 要查父评论下的子评论数量
vo
.
setParentId
(
dto
.
getBusinessId
());
ArticleCommentVO
vo
=
new
ArticleCommentVO
();
Integer
count
=
baseMapper
.
selectArticleChildrenCommentCount
(
vo
);
vo
.
setParentId
(
dto
.
getBusinessId
());
childrenCommentCount
=
count
;
Integer
count
=
baseMapper
.
selectArticleChildrenCommentCount
(
vo
);
childrenCommentCount
=
count
;
article
.
setCommentCount
(
childrenCommentCount
+
1
);
}
}
if
(
comment
.
getExamStatus
().
equals
(
"1"
)){
baseMapper
.
updateArticleCommentCountById
(
article
);
}
}
OpmArticle
article
=
new
OpmArticle
();
article
.
setBusinessId
(
dto
.
getArticleId
());
article
.
setCommentCount
(
childrenCommentCount
+
1
);
baseMapper
.
updateArticleCommentCountById
(
article
);
return
new
CyPersistModel
(
1
);
return
new
CyPersistModel
(
1
);
}
else
{
}
else
{
//web端
//web端
...
...
src/main/resources/mapper/business/opmArticle/mapper/OpmArticleMapper.xml
View file @
671b203a
...
@@ -538,6 +538,7 @@
...
@@ -538,6 +538,7 @@
mi.mem_career AS memCareer,
mi.mem_career AS memCareer,
mi.mem_nick_name AS memNickName,
mi.mem_nick_name AS memNickName,
mi.avatar AS avatarId,
mi.avatar AS avatarId,
opt.topic_name,
# oi.url AS memAvatar,
# oi.url AS memAvatar,
CASE
CASE
WHEN oal.business_id IS NOT NULL THEN 1 ELSE 0
WHEN oal.business_id IS NOT NULL THEN 1 ELSE 0
...
@@ -546,6 +547,7 @@
...
@@ -546,6 +547,7 @@
FROM
FROM
opm_article opa
opm_article opa
LEFT JOIN mem_info mi ON mi.user_id = opa.create_by
LEFT JOIN mem_info mi ON mi.user_id = opa.create_by
LEFT JOIN opm_topic opt ON opt.business_id = opa.topic_id
# LEFT JOIN (
# LEFT JOIN (
# SELECT
# SELECT
# opm_article.business_id,
# opm_article.business_id,
...
@@ -682,6 +684,7 @@
...
@@ -682,6 +684,7 @@
AND opc.del_flag = '0'
AND opc.del_flag = '0'
AND opc.article_id = #{articleId}
AND opc.article_id = #{articleId}
and opc.parent_id = #{parentId}
and opc.parent_id = #{parentId}
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)
...
...
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