Commit f44149b1 by guojuxing

资源详情接口

parent bafa60de
......@@ -125,7 +125,7 @@ public class UnionEnterpriseAuthController {
* @return
*/
@RequestMapping("create-union-enterprise")
public RestResponse resetPasswordByAuthCode(String authCode, Integer authCodeId, String enterpriseName) {
public RestResponse createUnionEnterprise(String authCode, Integer authCodeId, String enterpriseName) {
ServiceResponse authCodeResult = authCodeApiService.validateAuthCode(authCodeId, authCode);
if (!authCodeResult.isSuccess()) {
return RestResponse.failure(authCodeResult.getCode(), authCodeResult.getMessage());
......@@ -187,7 +187,7 @@ public class UnionEnterpriseAuthController {
* @return
*/
@RequestMapping("auth-resource")
public RestResponse authResource(@RequestBody UnionEnterpriseAuthResQO unionEnterpriseAuthResQO) {
public RestResponse authResource(UnionEnterpriseAuthResQO unionEnterpriseAuthResQO) {
//资源授权
UnionEnterpriseAuthResDTO dto = EntityUtil.changeEntityNew(UnionEnterpriseAuthResDTO.class, unionEnterpriseAuthResQO);
dto.setOwnEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
......@@ -200,8 +200,14 @@ public class UnionEnterpriseAuthController {
@RequestMapping("get-resource-detail")
public RestResponse getResourceDetail(Integer enterpriseId) {
//todo starrynight
return RestResponse.success(new UnionEnterpriseResourceDetailVO());
ServiceResponse<UnionEnterpriseAuthDTO> response = unionEnterpriseAuthApiService
.getUnionEnterpriseAuth(UserDetailUtils.getUserDetail().getEnterpriseId(), enterpriseId);
if (response.isSuccess()) {
if (response.getResult().getResourceGroupId() == null) {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "还未资源联合");
}
}
return ResultControllerUtils.commonResultOne(response, UnionEnterpriseResourceDetailVO.class);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment