|
@@ -14,6 +14,7 @@ import com.fdkankan.manage.mapper.IJySceneUserAuthMapper;
|
|
import com.fdkankan.manage.service.*;
|
|
import com.fdkankan.manage.service.*;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
import com.fdkankan.manage.vo.request.SceneParam;
|
|
|
|
+import com.fdkankan.manage.vo.response.CheckOtherVo;
|
|
import com.fdkankan.manage.vo.response.ManageLoginResponse;
|
|
import com.fdkankan.manage.vo.response.ManageLoginResponse;
|
|
import com.fdkankan.manage.vo.response.SceneAuthVo;
|
|
import com.fdkankan.manage.vo.response.SceneAuthVo;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
@@ -197,16 +198,24 @@ public class JySceneUserAuthServiceImpl extends ServiceImpl<IJySceneUserAuthMapp
|
|
if(pro == null && plus == null){
|
|
if(pro == null && plus == null){
|
|
throw new BusinessException(ResultCode.SCENE_NOT_EXITS);
|
|
throw new BusinessException(ResultCode.SCENE_NOT_EXITS);
|
|
}
|
|
}
|
|
|
|
+ Long sceneUserId = pro == null ? plus.getUserId() :pro.getUserId();
|
|
|
|
+ CheckOtherVo vo = new CheckOtherVo();
|
|
SysUser byId = sysUserService.getById(Long.valueOf(StpUtil.getLoginId().toString()));
|
|
SysUser byId = sysUserService.getById(Long.valueOf(StpUtil.getLoginId().toString()));
|
|
JyUser jyUser = jyUserService.getBySysId(byId.getId());
|
|
JyUser jyUser = jyUserService.getBySysId(byId.getId());
|
|
- if( byId.getRoleId() == 1L || byId.getRoleId() ==45L || (pro != null && jyUser.getUserId().equals(pro.getUserId()))){
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- if(byId.getRoleId() == 1L || byId.getRoleId() ==45L || (plus != null && jyUser.getUserId().equals(plus.getUserId()))){
|
|
|
|
- return true;
|
|
|
|
|
|
+ if( byId.getRoleId() == 1L || byId.getRoleId() ==45L || jyUser.getUserId().equals(sceneUserId)){
|
|
|
|
+ vo.setIsAuthor(1);
|
|
|
|
+ vo.setEditAuth(1);
|
|
|
|
+ vo.setLookAuth(1);
|
|
|
|
+ }else {
|
|
|
|
+ JySceneUserAuth auth = jySceneUserAuthService.getByNumAndJyUserId(jyUser.getId(), param.getNum());
|
|
|
|
+ if(auth !=null){
|
|
|
|
+ vo.setLookAuth(auth.getLookAuth());
|
|
|
|
+ vo.setLookEndTime(auth.getLookEndTime());
|
|
|
|
+ vo.setEditAuth(auth.getEditAuth());
|
|
|
|
+ vo.setEditEndTime(auth.getEditEndTime());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
- return false;
|
|
|
|
|
|
+ return vo;
|
|
}
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|