Commit e766a73b authored by diaoruifeng's avatar diaoruifeng

优化

parent fc391f81
...@@ -51,7 +51,10 @@ public class OcpApiBaseVo implements Serializable { ...@@ -51,7 +51,10 @@ public class OcpApiBaseVo implements Serializable {
private String apiUnit; private String apiUnit;
@ApiModelProperty(value = "出参入参") @ApiModelProperty(value = "出参入参")
private List<OcpApiParam> apiParams; private List<OcpApiParam> apiParams;
@ApiModelProperty(value = "出参集合")
private List<OcpApiParam> apiOutParams;
@ApiModelProperty(value = "入参集合")
private List<OcpApiParam> apiINParams;
@ApiModelProperty("服务分类代码") @ApiModelProperty("服务分类代码")
private String apiGroupCode; private String apiGroupCode;
...@@ -148,6 +151,22 @@ public class OcpApiBaseVo implements Serializable { ...@@ -148,6 +151,22 @@ public class OcpApiBaseVo implements Serializable {
return apiGroupCode; return apiGroupCode;
} }
public List<OcpApiParam> getApiOutParams() {
return apiOutParams;
}
public void setApiOutParams(List<OcpApiParam> apiOutParams) {
this.apiOutParams = apiOutParams;
}
public List<OcpApiParam> getApiINParams() {
return apiINParams;
}
public void setApiINParams(List<OcpApiParam> apiINParams) {
this.apiINParams = apiINParams;
}
public void setApiGroupCode(String apiGroupCode) { public void setApiGroupCode(String apiGroupCode) {
this.apiGroupCode = apiGroupCode; this.apiGroupCode = apiGroupCode;
} }
......
...@@ -46,8 +46,14 @@ public class ApiDetailsServiceImpl implements ApiDetailsService { ...@@ -46,8 +46,14 @@ public class ApiDetailsServiceImpl implements ApiDetailsService {
//查询请求字段表 //查询请求字段表
QueryWrapper<OcpApiParam> wrapper = new QueryWrapper<>(); QueryWrapper<OcpApiParam> wrapper = new QueryWrapper<>();
wrapper.lambda().eq(OcpApiParam::getApiCode, apiCode); wrapper.lambda().eq(OcpApiParam::getApiCode, apiCode);
List<OcpApiParam> ocpApiParams = apiParamMapper.selectList(wrapper); wrapper.lambda().eq(OcpApiParam::getApiParamClassification, "out");
ocpApiBase.setApiParams(ocpApiParams); List<OcpApiParam> ocpApiOutParams = apiParamMapper.selectList(wrapper);
QueryWrapper<OcpApiParam> wrappers = new QueryWrapper<>();
wrappers.lambda().eq(OcpApiParam::getApiCode, apiCode);
wrappers.lambda().eq(OcpApiParam::getApiParamClassification, "in");
List<OcpApiParam> ocpApiInParams = apiParamMapper.selectList(wrappers);
ocpApiBase.setApiOutParams(ocpApiOutParams);
ocpApiBase.setApiINParams(ocpApiInParams);
return ResponseVO.ok(ocpApiBase); return ResponseVO.ok(ocpApiBase);
} }
......
...@@ -2,11 +2,11 @@ spring: ...@@ -2,11 +2,11 @@ spring:
datasource: datasource:
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
username: postgres username: postgres
password: 1234 password: 123456
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
# jdbc-url: jdbc:postgresql://192.168.43.20:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true # jdbc-url: jdbc:postgresql://192.168.43.20:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
# jdbc-url: jdbc:postgresql://172.20.10.9:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true # jdbc-url: jdbc:postgresql://172.20.10.9:33072/pms3?currentSchema=public&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
url: jdbc:postgresql://localhost:5432/pms_accept?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true url: jdbc:postgresql://localhost:5432/test?currentSchema=operating_platform&stringtype=unspecified&TimeZone=Asia/Shanghai&useAffectedRows=true
knife4j: knife4j:
enable: true enable: true
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
select select
oab.obj_id,oab.api_code,oae.api_code,oab.api_name,oae.cluster_name, oab.obj_id,oab.api_code,oae.api_code,oab.api_name,oae.cluster_name,
oae.space_name,oab.api_url,oae.api_state ,oab.api_unit ,oab.api_ctime from ocp_api_base oab oae.space_name,oab.api_url,oae.api_state ,oab.api_unit ,oab.api_ctime,oab.api_req,oab.api_resp from ocp_api_base oab
LEFT JOIN ocp_api_extent oae LEFT JOIN ocp_api_extent oae
on oab.api_code = oae.api_code on oab.api_code = oae.api_code
where oab.is_delete = 0 where oab.is_delete = 0
......
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