|
@@ -104,26 +104,26 @@ public class SceneServiceImpl extends ServiceImpl<ISceneMapper, Scene> implement
|
|
|
if (ssoUser == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_3004);
|
|
|
}
|
|
|
- List<UserRole> list = userRoleService.list(new LambdaQueryWrapper<UserRole>().eq(UserRole::getUserId, ssoUser.getId()));
|
|
|
- Set<Long> roleIdSet = null;
|
|
|
- if(CollUtil.isNotEmpty(list)){
|
|
|
- roleIdSet = list.stream().map(ur -> ur.getRoleId()).collect(Collectors.toSet());
|
|
|
- }
|
|
|
- if(!roleIdSet.contains(5)){
|
|
|
- ScenePro sceneProEntity = sceneProService.findBySceneNum(num);
|
|
|
- if(!sceneProEntity.getUserId().equals(ssoUser.getId())){
|
|
|
- if(!ssoUser.getRoleSet().contains("6")){
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
- }
|
|
|
- User userEntity = iUserService.getById(sceneProEntity.getUserId());
|
|
|
- User tokenUser = iUserService.getById(ssoUser.getId());
|
|
|
- if(Objects.isNull(userEntity) || Objects.isNull(userEntity.getCompanyId())
|
|
|
- || Objects.isNull(tokenUser) || Objects.isNull(tokenUser.getCompanyId())
|
|
|
- || !userEntity.getCompanyId().equals(tokenUser.getCompanyId())){
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+// List<UserRole> list = userRoleService.list(new LambdaQueryWrapper<UserRole>().eq(UserRole::getUserId, ssoUser.getId()));
|
|
|
+// Set<Long> roleIdSet = null;
|
|
|
+// if(CollUtil.isNotEmpty(list)){
|
|
|
+// roleIdSet = list.stream().map(ur -> ur.getRoleId()).collect(Collectors.toSet());
|
|
|
+// }
|
|
|
+// if(!roleIdSet.contains(5)){
|
|
|
+// ScenePro sceneProEntity = sceneProService.findBySceneNum(num);
|
|
|
+// if(!sceneProEntity.getUserId().equals(ssoUser.getId())){
|
|
|
+// if(!ssoUser.getRoleSet().contains("6")){
|
|
|
+// throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
+// }
|
|
|
+// User userEntity = iUserService.getById(sceneProEntity.getUserId());
|
|
|
+// User tokenUser = iUserService.getById(ssoUser.getId());
|
|
|
+// if(Objects.isNull(userEntity) || Objects.isNull(userEntity.getCompanyId())
|
|
|
+// || Objects.isNull(tokenUser) || Objects.isNull(tokenUser.getCompanyId())
|
|
|
+// || !userEntity.getCompanyId().equals(tokenUser.getCompanyId())){
|
|
|
+// throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
//判断该场景是否属于增值权益
|
|
|
JSONObject jsonObject = new JSONObject();
|