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
fa5b4a5a
Commit
fa5b4a5a
authored
Feb 19, 2025
by
gaoyingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 动态添加实名
parent
b936ff67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
AppActivityController.java
...oft/app/appActivity/controller/AppActivityController.java
+1
-1
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+21
-2
No files found.
src/main/java/org/rcisoft/app/appActivity/controller/AppActivityController.java
View file @
fa5b4a5a
...
...
@@ -50,7 +50,7 @@ public class AppActivityController extends CyPaginationController<CmsActivity> {
/**
* 活动-查看活动列表
*/
@PreAuthorize
(
"@cyPerm.hasPerm('app:activity:query')"
)
//
@PreAuthorize("@cyPerm.hasPerm('app:activity:query')")
@CyOpeLogAnno
(
title
=
"system-活动管理-查询活动"
,
businessType
=
CyLogTypeEnum
.
QUERY
)
@Operation
(
summary
=
"分页查询活动集合"
,
description
=
"分页查询活动集合"
)
@GetMapping
(
value
=
"/open/cmsActivity/queryCmsActivityByPagination"
)
...
...
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
View file @
fa5b4a5a
...
...
@@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.rcisoft.baidu.censor.dto.CensorResult
;
import
org.rcisoft.baidu.censor.service.ContentCensorService
;
import
org.rcisoft.business.memInfo.dao.MemInfoRepository
;
import
org.rcisoft.business.memInfo.entity.MemInfo
;
import
org.rcisoft.business.opmArticle.dao.OpmArticleRepository
;
import
org.rcisoft.business.opmArticle.entity.ArticleCommentDTO
;
import
org.rcisoft.business.opmArticle.entity.ArticleCommentVO
;
...
...
@@ -62,6 +63,11 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
persist
(
OpmArticle
opmArticle
){
//添加实名判断
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
MemInfo
info
=
memInfoRepository
.
getInfoByUserId
(
userId
);
if
(!
"1"
.
equals
(
info
.
getMemRealAuthen
()))
throw
new
CyServiceException
(
"请先进行实名认证"
);
//从redis获取动态审核配置 0:自动审核,1:人工审核
List
<
DictData
>
articleAudit
=
dictionaryService
.
selectByTypes
(
"article_audit_config"
);
String
style
=
articleAudit
.
get
(
0
).
getDictValue
();
...
...
@@ -313,6 +319,11 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
likeAdd
(
Integer
articleId
,
String
praiseType
){
//添加实名判断
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
MemInfo
info
=
memInfoRepository
.
getInfoByUserId
(
userId
);
if
(!
"1"
.
equals
(
info
.
getMemRealAuthen
()))
throw
new
CyServiceException
(
"请先进行实名认证"
);
int
line
=
0
;
if
(
praiseType
.
equals
(
"praise"
)){
//点赞
...
...
@@ -326,7 +337,6 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
}
else
if
(
praiseType
.
equals
(
"cancel"
)){
//取消点赞
//删除点赞表中的数据
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
baseMapper
.
likeDelete
(
userId
,
articleId
);
//修改主表中该动态的点赞数
line
=
baseMapper
.
reduceLikeCount
(
articleId
);
...
...
@@ -345,6 +355,11 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
likeCommentAdd
(
Integer
commentId
,
String
praiseType
){
//添加实名判断
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
MemInfo
info
=
memInfoRepository
.
getInfoByUserId
(
userId
);
if
(!
"1"
.
equals
(
info
.
getMemRealAuthen
()))
throw
new
CyServiceException
(
"请先进行实名认证"
);
int
line
=
0
;
if
(
praiseType
.
equals
(
"praise"
)){
//点赞
...
...
@@ -358,7 +373,6 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
}
else
if
(
praiseType
.
equals
(
"cancel"
)){
//取消点赞
//删除点赞表中的数据
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
baseMapper
.
likeDelete
(
userId
,
commentId
);
//修改该条评论的点赞数
line
=
baseMapper
.
reduceCommentLikeCount
(
commentId
);
...
...
@@ -375,6 +389,11 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
*/
@Override
public
CyPersistModel
addComment
(
ArticleCommentDTO
dto
)
{
//添加实名判断
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
MemInfo
info
=
memInfoRepository
.
getInfoByUserId
(
userId
);
if
(!
"1"
.
equals
(
info
.
getMemRealAuthen
()))
throw
new
CyServiceException
(
"请先进行实名认证"
);
//校验 超过规定的时间不能评论 计算天数对应的秒数
List
<
DictData
>
articleConfig
=
dictionaryService
.
selectByTypes
(
"article_config"
);
DictData
dictData
=
articleConfig
.
stream
().
filter
(
item
->
item
.
getDictLabel
().
equals
(
"comment_limit_days"
)).
findFirst
().
orElse
(
null
);
...
...
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