|
@@ -129,19 +129,8 @@ public class TbMyPublishServiceImpl extends ServiceImpl<TbMyPublishMapper, TbMyP
|
|
|
public TbMyPublish getPublish(Long id, Long appUserId) {
|
|
|
TbMyPublish publish = this.getById(id);
|
|
|
if (publish != null) {
|
|
|
- Long familyId = null;
|
|
|
- TbFamilyMember member = memberService.getOne(new LambdaQueryWrapper<TbFamilyMember>()
|
|
|
- .eq(TbFamilyMember::getAppUserId,appUserId)
|
|
|
- .last("limit 1")
|
|
|
- );
|
|
|
- if (member != null) {
|
|
|
- TbFamily family = familyService.myFamily(member.getId());
|
|
|
- if (family != null) {
|
|
|
- familyId = family.getId();
|
|
|
- }
|
|
|
- }
|
|
|
// 只能看好友和族友的点赞、评论
|
|
|
- List<Long> fids = getMyFrientIds(appUserId, familyId);
|
|
|
+ List<Long> fids = getMyFrientIds(appUserId);
|
|
|
|
|
|
// 图片列表
|
|
|
List<TbPublishImg> publishImgs = imgService.list(new LambdaQueryWrapper<TbPublishImg>()
|
|
@@ -339,7 +328,7 @@ public class TbMyPublishServiceImpl extends ServiceImpl<TbMyPublishMapper, TbMyP
|
|
|
ids.add(item.getId());
|
|
|
});
|
|
|
// 只能看好友和族友的点赞、评论
|
|
|
- List<Long> fids = getMyFrientIds(appUserId, familyId);
|
|
|
+ List<Long> fids = getMyFrientIds(appUserId);
|
|
|
|
|
|
// 族友圈中放入图片列表 点赞列表 评论列表
|
|
|
List<TbPublishImg> imgList = imgService.list(new LambdaQueryWrapper<TbPublishImg>()
|
|
@@ -385,11 +374,10 @@ public class TbMyPublishServiceImpl extends ServiceImpl<TbMyPublishMapper, TbMyP
|
|
|
/**
|
|
|
* 获取好友、族友的id
|
|
|
* @param appUserId
|
|
|
- * @param familyId
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<Long> getMyFrientIds(Long appUserId, Long familyId){
|
|
|
+ public List<Long> getMyFrientIds(Long appUserId){
|
|
|
List<Long> fids = new ArrayList<>();
|
|
|
if (appUserId != null) {
|
|
|
// 好友列表
|
|
@@ -403,16 +391,15 @@ public class TbMyPublishServiceImpl extends ServiceImpl<TbMyPublishMapper, TbMyP
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- if (familyId != null) {
|
|
|
- // 族友列表
|
|
|
- AppMemberVo memberVo = new AppMemberVo();
|
|
|
- memberVo.setFamilyId(familyId);
|
|
|
- List<AppMemberVo> memberList = memberService.selectFamilyMember(memberVo);
|
|
|
- if (memberList.size() > 0) {
|
|
|
- memberList.forEach(item -> {
|
|
|
- fids.add(item.getUserId());
|
|
|
- });
|
|
|
- }
|
|
|
+ // 族友列表
|
|
|
+ List<AppMemberVo> memberList = memberService.myMemberList(new LambdaQueryWrapper<AppMemberVo>()
|
|
|
+ .eq(AppMemberVo::getUserId, appUserId)
|
|
|
+ .eq(AppMemberVo::getStatus, "2")
|
|
|
+ );
|
|
|
+ if (memberList.size() > 0) {
|
|
|
+ memberList.forEach(item -> {
|
|
|
+ fids.add(item.getUserId());
|
|
|
+ });
|
|
|
}
|
|
|
return fids;
|
|
|
}
|