This commit is contained in:
张良(004796)
2024-04-23 20:16:04 +08:00
parent a5f9adfb3c
commit 0b977925f9
10 changed files with 62 additions and 39 deletions

View File

@@ -116,11 +116,9 @@ public class CurrentUserManager {
vo.setAlreadyAuthNum(userAuth.getAlreadyAuthNum());
List<UserPictures> userPictures = userPicturesService.listByUserIdAuditingAndSuccess(user.getId());
vo.setUserPicturesList(BeanConvertUtil.convertListTo(userPictures, UserPicturesDTO::new));
UserVip userVip = userVipService.getByUserVipMaster(userId);
if(userVip != null){
vo.setOpenVip(true);
vo.setVipType(userVip.getVipType());
vo.setVipTimeout(userVip.getVipTimeout());
if(user.getOpenVip() != null){
vo.setOpenVip(user.getOpenVip());
// vo.setVipType();
}
UserExtend userExtend = userExtendService.getByUserId(userId);
vo.setIncomeCoin(userExtend.getIncomeCoin());

View File

@@ -75,8 +75,7 @@ public class ImManager {
throw new ServiceException("不能给自己发送哦!");
}
// 判断VIP 只有VIP才可以发送消息
UserVip userVip = userVipService.getByUserVipMaster(fromUserId);
if(userVip == null){
if(!fromUser.getOpenVip()){
throw new ServiceException(ErrorEnum.VIP_AUTH);
}
// 检查拉黑