|
|
@ -16,6 +16,7 @@ import com.epmet.dto.CustomerAgencyDTO; |
|
|
|
import com.epmet.dto.GovStaffRoleDTO; |
|
|
|
import com.epmet.dto.form.GetSQLFilterFormDTO; |
|
|
|
import com.epmet.dto.form.StaffRoleFormDTO; |
|
|
|
import com.epmet.dto.result.LoginUserDetailsResultDTO; |
|
|
|
import com.epmet.dto.result.RoleOpeScopeResultDTO; |
|
|
|
import com.epmet.feign.EpmetUserFeignClient; |
|
|
|
import com.epmet.feign.GovOrgFeignClient; |
|
|
@ -90,8 +91,8 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public GovTokenDto getUserDetails(String app, String client, String staffId) { |
|
|
|
return cpUserDetailRedis.get(app, client, staffId, GovTokenDto.class); |
|
|
|
public LoginUserDetailsResultDTO getLoginUserDetails(String app, String client, String staffId) { |
|
|
|
return cpUserDetailRedis.get(app, client, staffId, LoginUserDetailsResultDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -132,7 +133,7 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
GovTokenDto userDetails = getUserDetails(app, client, userId); |
|
|
|
LoginUserDetailsResultDTO userDetails = getLoginUserDetails(app, client, userId); |
|
|
|
if (userDetails == null) { |
|
|
|
return false; |
|
|
|
} |
|
|
@ -157,7 +158,7 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
@Override |
|
|
|
public String getSqlFilterSegment(GetSQLFilterFormDTO form) { |
|
|
|
hasConditions.set(false); |
|
|
|
GovTokenDto userDetails = getUserDetails(form.getApp(), form.getClient(), form.getUserId()); |
|
|
|
LoginUserDetailsResultDTO userDetails = getLoginUserDetails(form.getApp(), form.getClient(), form.getUserId()); |
|
|
|
if (userDetails == null) { |
|
|
|
logger.error("查询SQL过滤脚本:没有找到用户的登陆信息:app: {}, client: {}, userId:{}", form.getApp(), form.getClient(), form.getUserId()); |
|
|
|
throw new RenException(EpmetErrorCode.ERR10006.getCode()); |
|
|
@ -453,7 +454,7 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
@Override |
|
|
|
public Set<String> listOperationPermissions(String staffId, String currAgencyId) { |
|
|
|
|
|
|
|
GovTokenDto userDetails = getUserDetails(loginUserUtil.getLoginUserApp(), loginUserUtil.getLoginUserClient(), loginUserUtil.getLoginUserId()); |
|
|
|
LoginUserDetailsResultDTO userDetails = getLoginUserDetails(loginUserUtil.getLoginUserApp(), loginUserUtil.getLoginUserClient(), loginUserUtil.getLoginUserId()); |
|
|
|
if (userDetails == null) { |
|
|
|
throw new RenException(EpmetErrorCode.ERR10006.getCode(), EpmetErrorCode.ERR10006.getMsg()); |
|
|
|
} |
|
|
|