|
@@ -28,7 +28,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
|
|
|
@Log4j2
|
|
|
@Aspect
|
|
|
@Component
|
|
|
-@Order(2)
|
|
|
+@Order(101)
|
|
|
public class CheckCooperationPermitAspect {
|
|
|
|
|
|
@Autowired
|
|
@@ -68,11 +68,11 @@ public class CheckCooperationPermitAspect {
|
|
|
}
|
|
|
|
|
|
//如果不是用户自己的场景,判断是否有协作权限
|
|
|
- String username = redisUtil.hget(RedisKey.SCENE_COOPERATION_NUM_USERNAME, num);
|
|
|
- if(StrUtil.isEmpty(username)){
|
|
|
+ String userId = redisUtil.hget(RedisKey.SCENE_COOPERATION_NUM_USERNAME, num);
|
|
|
+ if(StrUtil.isEmpty(userId)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
}
|
|
|
- if(!username.equals(user.getUserName())){
|
|
|
+ if(!userId.equals(String.valueOf(user.getId()))){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
}
|
|
|
}
|