Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
3d1c126f
Commit
3d1c126f
authored
Sep 21, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增个人简介
parent
aa1cec65
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
2 deletions
+66
-2
ch-core/src/main/java/com/wwdz/ch/core/consts/FollowFansEnum.java
...src/main/java/com/wwdz/ch/core/consts/FollowFansEnum.java
+38
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/FollowFansRecordVo.java
...ain/java/com/wwdz/ch/wx/entity/vo/FollowFansRecordVo.java
+16
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FollowFansRecordServiceImpl.java
...java/com/wwdz/ch/wx/impl/FollowFansRecordServiceImpl.java
+12
-1
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/FollowFansEnum.java
0 → 100644
View file @
3d1c126f
package
com.wwdz.ch.core.consts
;
public
class
FollowFansEnum
{
public
enum
RelationEnum
{
NO_FOLLOWED
(
0
,
"未关注"
),
FOLLOWED
(
1
,
"已关注"
),
BOTH_FOLLOWED
(
2
,
"互相关注"
),
BACK_FOLLOWED
(
3
,
"回关"
),
;
private
int
code
;
private
String
des
;
RelationEnum
(
int
code
,
String
des
)
{
this
.
code
=
code
;
this
.
des
=
des
;
}
public
static
String
getNameByCode
(
int
code
)
{
for
(
FollowFansEnum
.
RelationEnum
relationEnum
:
FollowFansEnum
.
RelationEnum
.
values
())
{
if
(
code
==
relationEnum
.
getCode
())
{
return
relationEnum
.
getDes
();
}
}
return
null
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getDes
()
{
return
des
;
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/FollowFansRecordVo.java
View file @
3d1c126f
...
@@ -22,6 +22,11 @@ public class FollowFansRecordVo implements Entity {
...
@@ -22,6 +22,11 @@ public class FollowFansRecordVo implements Entity {
*/
*/
private
String
fansIcon
;
private
String
fansIcon
;
/**
* 粉丝个人简介
*/
private
String
fansProfile
;
/**
/**
* 被关注者id
* 被关注者id
*/
*/
...
@@ -35,10 +40,20 @@ public class FollowFansRecordVo implements Entity {
...
@@ -35,10 +40,20 @@ public class FollowFansRecordVo implements Entity {
private
String
followerIcon
;
private
String
followerIcon
;
/**
/**
* 关系(已关注,互相关注, 回关)
* 关注的人个人简介
*/
private
String
followerProfile
;
/**
* 关系(已关注,互相关注,未关注)
*/
*/
private
String
relation
;
private
String
relation
;
/**
* 关系(已关注,互相关注,未关注)
*/
private
Integer
relationCode
;
/**
/**
* 创建时间
* 创建时间
*/
*/
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/FollowFansRecordServiceImpl.java
View file @
3d1c126f
package
com.wwdz.ch.wx.impl
;
package
com.wwdz.ch.wx.impl
;
import
com.wwdz.ch.core.consts.FollowFansEnum
;
import
com.wwdz.ch.core.consts.MessageEnum
;
import
com.wwdz.ch.core.consts.MessageEnum
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
...
@@ -157,10 +158,13 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -157,10 +158,13 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
EntityMapper
.
copyAttribute
(
f
,
followFansRecordVo
);
EntityMapper
.
copyAttribute
(
f
,
followFansRecordVo
);
followFansRecordVo
.
setFollowerName
(
cacheUtil
.
getAppletUserNameById
(
f
.
getFollowerId
()));
followFansRecordVo
.
setFollowerName
(
cacheUtil
.
getAppletUserNameById
(
f
.
getFollowerId
()));
followFansRecordVo
.
setFollowerIcon
(
cacheUtil
.
getAppletUsers
(
f
.
getFollowerId
()).
getAvatar
());
followFansRecordVo
.
setFollowerIcon
(
cacheUtil
.
getAppletUsers
(
f
.
getFollowerId
()).
getAvatar
());
followFansRecordVo
.
setFansProfile
(
cacheUtil
.
getAppletUsers
(
f
.
getFollowerId
()).
getProfile
());
if
(
fansIdList
.
contains
(
f
.
getFollowerId
().
longValue
()))
{
if
(
fansIdList
.
contains
(
f
.
getFollowerId
().
longValue
()))
{
followFansRecordVo
.
setRelation
(
"互相关注"
);
followFansRecordVo
.
setRelation
(
"互相关注"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
BOTH_FOLLOWED
.
getCode
());
}
else
{
}
else
{
followFansRecordVo
.
setRelation
(
"已关注"
);
followFansRecordVo
.
setRelation
(
"已关注"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
FOLLOWED
.
getCode
());
}
}
followFansRecordVos
.
add
(
followFansRecordVo
);
followFansRecordVos
.
add
(
followFansRecordVo
);
});
});
...
@@ -193,10 +197,13 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -193,10 +197,13 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
EntityMapper
.
copyAttribute
(
f
,
followFansRecordVo
);
EntityMapper
.
copyAttribute
(
f
,
followFansRecordVo
);
followFansRecordVo
.
setFansName
(
cacheUtil
.
getAppletUserNameById
(
f
.
getFansId
()));
followFansRecordVo
.
setFansName
(
cacheUtil
.
getAppletUserNameById
(
f
.
getFansId
()));
followFansRecordVo
.
setFansIcon
(
cacheUtil
.
getAppletUsers
(
f
.
getFansId
()).
getAvatar
());
followFansRecordVo
.
setFansIcon
(
cacheUtil
.
getAppletUsers
(
f
.
getFansId
()).
getAvatar
());
followFansRecordVo
.
setFansProfile
(
cacheUtil
.
getAppletUsers
(
f
.
getFansId
()).
getProfile
());
if
(
followerIdList
.
contains
(
f
.
getFansId
().
longValue
()))
{
if
(
followerIdList
.
contains
(
f
.
getFansId
().
longValue
()))
{
followFansRecordVo
.
setRelation
(
"互相关注"
);
followFansRecordVo
.
setRelation
(
"互相关注"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
BOTH_FOLLOWED
.
getCode
());
}
else
{
}
else
{
followFansRecordVo
.
setRelation
(
"回关"
);
followFansRecordVo
.
setRelation
(
"回关"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
BACK_FOLLOWED
.
getCode
());
}
}
followFansRecordVos
.
add
(
followFansRecordVo
);
followFansRecordVos
.
add
(
followFansRecordVo
);
});
});
...
@@ -227,12 +234,16 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
...
@@ -227,12 +234,16 @@ public class FollowFansRecordServiceImpl implements FollowFansRecordService {
long
followerId
=
followFansRecordVo
.
getFollowerId
();
long
followerId
=
followFansRecordVo
.
getFollowerId
();
if
(
currentFollowIdList
.
contains
(
followerId
)
&&
currentFansIdList
.
contains
(
followerId
))
{
if
(
currentFollowIdList
.
contains
(
followerId
)
&&
currentFansIdList
.
contains
(
followerId
))
{
followFansRecordVo
.
setRelation
(
"互相关注"
);
followFansRecordVo
.
setRelation
(
"互相关注"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
BOTH_FOLLOWED
.
getCode
());
}
else
if
(
currentFollowIdList
.
contains
(
followerId
)
&&
!
currentFansIdList
.
contains
(
followerId
))
{
}
else
if
(
currentFollowIdList
.
contains
(
followerId
)
&&
!
currentFansIdList
.
contains
(
followerId
))
{
followFansRecordVo
.
setRelation
(
"已关注"
);
followFansRecordVo
.
setRelation
(
"已关注"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
FOLLOWED
.
getCode
());
}
else
if
(!
currentFollowIdList
.
contains
(
followerId
)
&&
currentFansIdList
.
contains
(
followerId
))
{
}
else
if
(!
currentFollowIdList
.
contains
(
followerId
)
&&
currentFansIdList
.
contains
(
followerId
))
{
followFansRecordVo
.
setRelation
(
"回关"
);
followFansRecordVo
.
setRelation
(
"回关"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
BACK_FOLLOWED
.
getCode
());
}
else
{
}
else
{
followFansRecordVo
.
setRelation
(
""
);
followFansRecordVo
.
setRelation
(
"未关注"
);
followFansRecordVo
.
setRelationCode
(
FollowFansEnum
.
RelationEnum
.
NO_FOLLOWED
.
getCode
());
}
}
});
});
}
}
...
...
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