This commit is contained in:
huangzj
2023-08-23 10:20:45 +08:00
parent 510d1cdaf8
commit 079d07b951

View File

@@ -96,14 +96,14 @@ public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper,
userRole=strings.get(0); userRole=strings.get(0);
//分享只能给vip用户分享 //分享只能给vip用户分享
if( if(
Objects.equals(userRole, AppRoleEnum.APP_VIP_USER.getCode()) !Objects.equals(userRole, AppRoleEnum.APP_VIP_USER.getCode())
){ ){
throw new BusinessException(AlgorithmResponseEnum.UNKNOW_ROLE); throw new BusinessException(AlgorithmResponseEnum.UNKNOW_ROLE);
} }
CsDeviceUserPO one = this.lambdaQuery().eq(CsDeviceUserPO::getDeviceId, id).eq(CsDeviceUserPO::getStatus,"1" ).eq(CsDeviceUserPO::getSubUserId,userIndex).one(); CsDeviceUserPO one = this.lambdaQuery().eq(CsDeviceUserPO::getDeviceId, id).eq(CsDeviceUserPO::getStatus,"1" ).eq(CsDeviceUserPO::getSubUserId,userIndex).one();
if(!isNull(one)){ if(!isNull(one)){
throw new BusinessException(AlgorithmResponseEnum.REPEAT_SHARE); return;
} }
CsDeviceUserPO csDeviceUserPO = list.get(0); CsDeviceUserPO csDeviceUserPO = list.get(0);
csDeviceUserPO.setSubUserId(userIndex); csDeviceUserPO.setSubUserId(userIndex);