123333
This commit is contained in:
@@ -24,6 +24,8 @@ public class UserInfoVo {
|
||||
private String usercode;
|
||||
@Schema(description = "昵称")
|
||||
private String nickname;
|
||||
@Schema(description = "性别")
|
||||
private Integer gender;
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
@Schema(description = "城市")
|
||||
@@ -57,6 +59,9 @@ public class UserInfoVo {
|
||||
@Schema(description = "是否关注")
|
||||
private Boolean star;
|
||||
|
||||
@Schema(description = "是否拉黑该用户")
|
||||
private Boolean black;
|
||||
|
||||
@Schema(description = "用户状态")
|
||||
private OnlineStatusVo onlineStatus;
|
||||
|
||||
|
||||
@@ -23,4 +23,6 @@ public interface UserBlacklistService extends IService<UserBlacklist> {
|
||||
boolean black(Long userId, Long blackUserId,Integer actionType);
|
||||
|
||||
Page<UserListVo> pageApp(PageQuery pageQuery, Long userId);
|
||||
|
||||
Boolean checkBlack(Long userId, Long blackUid);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.ruoyi.cai.mapper.UserBlacklistMapper;
|
||||
import com.ruoyi.cai.service.UserBlacklistService;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.sun.deploy.util.BlackList;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -49,4 +50,11 @@ public class UserBlacklistServiceImpl extends ServiceImpl<UserBlacklistMapper, U
|
||||
public Page<UserListVo> pageApp(PageQuery pageQuery, Long userId) {
|
||||
return baseMapper.pageApp(pageQuery.build(),userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean checkBlack(Long userId, Long blackUid) {
|
||||
return this.exists(Wrappers.lambdaQuery(UserBlacklist.class)
|
||||
.eq(UserBlacklist::getUserId,userId)
|
||||
.eq(UserBlacklist::getBlackUid, blackUid));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
private RoomService roomService;
|
||||
@Autowired
|
||||
private CaiLoginManager caiLoginManager;
|
||||
@Autowired
|
||||
private UserBlacklistService userBlacklistService;
|
||||
|
||||
@Override
|
||||
public User getByUsername(String username) {
|
||||
@@ -144,6 +146,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
vo.setUsercode(user.getUsercode());
|
||||
vo.setNickname(user.getNickname());
|
||||
vo.setAvatar(user.getAvatar());
|
||||
vo.setGender(user.getGender());
|
||||
vo.setPrice(0L);
|
||||
vo.setServiceCount(0L);
|
||||
vo.setAge(user.getAge());
|
||||
@@ -161,6 +164,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
vo.setCityId(user.getCityId());
|
||||
vo.setFansNum(userFollowService.getFansNumByUserId(userId));
|
||||
vo.setStar(userFollowService.checkStar(currentUserId, userId));
|
||||
vo.setBlack(userBlacklistService.checkBlack(currentUserId,userId));
|
||||
vo.setAlbumList(userAlbumService.getUserAlbumSuccess(userId, user.getIsAnchor()));
|
||||
// 在线状态
|
||||
OnlineStatusVo onlineStatusVo;
|
||||
|
||||
Reference in New Issue
Block a user