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
88cff9c8
Commit
88cff9c8
authored
Mar 10, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了用户详情点赞和关注自己对自己的判断
parent
44bc8b96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
MemInfoServiceImpl.java
...oft/business/memInfo/service/impl/MemInfoServiceImpl.java
+10
-1
OpmArticleServiceImpl.java
...siness/opmArticle/service/impl/OpmArticleServiceImpl.java
+1
-0
No files found.
src/main/java/org/rcisoft/business/memInfo/service/impl/MemInfoServiceImpl.java
View file @
88cff9c8
...
...
@@ -633,6 +633,11 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
addFollow
(
MemFollowDTO
followDTO
){
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
if
(
userId
.
equals
(
String
.
valueOf
(
followDTO
.
getTargetId
()))){
//不能自己给自己点赞
throw
new
CyServiceException
(
"不能关注自己!"
);
}
//添加到关注表
int
line
=
baseMapper
.
addFollow
(
followDTO
);
return
new
CyPersistModel
(
line
);
...
...
@@ -669,8 +674,12 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
*/
@Override
public
CyPersistModel
addLike
(
MemLikeDTO
likeDTO
)
{
//获取当前登录用户id
//获取当前登录用户id
和 目标用户id
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
if
(
userId
.
equals
(
String
.
valueOf
(
likeDTO
.
getTargetId
()))){
//不能自己给自己点赞
throw
new
CyServiceException
(
"不能给自己点赞!"
);
}
//添加实名判断
userUtil
.
checkUserAuth
(
"请先实名认证!"
);
//获取当前日期 例2025/2/20 获取02和20 用来存redis
...
...
src/main/java/org/rcisoft/business/opmArticle/service/impl/OpmArticleServiceImpl.java
View file @
88cff9c8
...
...
@@ -653,6 +653,7 @@ public class OpmArticleServiceImpl extends ServiceImpl<OpmArticleRepository, Opm
createDate
=
sdf
.
format
(
new
Date
());
commentedUserId
=
Integer
.
valueOf
(
userId
);
}
else
{
//发的是二级评论
createDate
=
String
.
valueOf
(
comment
.
getCreateDate
());
commentedUserId
=
comment
.
getCreateBy
();
}
...
...
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