|
@@ -13,6 +13,7 @@ import com.fdkankan.redis.util.RedisUtil;
|
|
|
import com.fdkankan.scene.entity.JyUser;
|
|
|
import com.fdkankan.scene.entity.SceneCooperation;
|
|
|
import com.fdkankan.scene.entity.ScenePlus;
|
|
|
+import com.fdkankan.scene.httpclient.MyClient;
|
|
|
import com.fdkankan.scene.service.IJySceneUserAuthService;
|
|
|
import com.fdkankan.scene.service.IJyUserService;
|
|
|
import com.fdkankan.scene.service.ISceneCooperationService;
|
|
@@ -59,6 +60,8 @@ public class CheckPermitAspect {
|
|
|
private IJySceneUserAuthService jySceneUserAuthService;
|
|
|
@Autowired
|
|
|
private IJyUserService jyUserService;
|
|
|
+ @Autowired
|
|
|
+ private MyClient myClient;
|
|
|
|
|
|
|
|
|
@Pointcut("@annotation(com.fdkankan.scene.annotation.CheckPermit)")
|
|
@@ -107,10 +110,9 @@ public class CheckPermitAspect {
|
|
|
|
|
|
//当前用户与场景用户id相同,则拥有最高权限,可以编辑
|
|
|
String url = host.concat("/service/manage/inner/checkNumAuth/").concat(num);
|
|
|
- String body = HttpUtil.createGet(url).header("token", request.getHeader("token")).execute().body();
|
|
|
- log.info("checkNumAuth:{}", body);
|
|
|
- ResultData resultData = JSON.parseObject(body, ResultData.class);
|
|
|
- CheckNumAuthVo data = (CheckNumAuthVo) resultData.getData();
|
|
|
+ ResultData<CheckNumAuthVo> checkNumAuth = myClient.checkNumAuth(url, request.getHeader("token"));
|
|
|
+ log.info("checkNumAuth:{}", JSON.toJSONString(checkNumAuth));
|
|
|
+ CheckNumAuthVo data = checkNumAuth.getData();
|
|
|
if(!data.isEditAuth()){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5014);
|
|
|
}
|