|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.manage.service.impl;
|
|
|
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.manage.common.PageInfo;
|
|
@@ -134,4 +135,26 @@ public class JySceneUserAuthServiceImpl extends ServiceImpl<IJySceneUserAuthMapp
|
|
|
}
|
|
|
return this.getByNumAndJyUserId(jyUser.getId(),num);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Object checkAuthOther(JySceneUserAuth param) {
|
|
|
+ if(StringUtils.isBlank(param.getNum())){
|
|
|
+ throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
|
|
|
+ }
|
|
|
+ ScenePro pro = sceneProService.getByNum(param.getNum());
|
|
|
+ ScenePlus plus = scenePlusService.getByNum(param.getNum());
|
|
|
+ if(pro == null && plus == null){
|
|
|
+ throw new BusinessException(ResultCode.SCENE_NOT_EXITS);
|
|
|
+ }
|
|
|
+ Object loginId = StpUtil.getLoginId();
|
|
|
+ JyUser jyUser = jyUserService.getBySysId(loginId);
|
|
|
+ if(pro != null && jyUser.getUserId().equals(pro.getUserId())){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if(plus != null && jyUser.getUserId().equals(plus.getUserId())){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|