Commit 582cba34 authored by diaoruifeng's avatar diaoruifeng

服务列表树功能优化

parent 8875e5a3
......@@ -194,18 +194,24 @@ public class ApiBasicManagementController {
return apiBasicManagementService.getBaseByGroupCode(ApiBaseReq);
}
@ApiOperation("服务树一级")
/* @ApiOperation("服务树一级")
@GetMapping("/apiBaseTree")
public ResponseVO<List<OcpApiGroup>> apiBaseTree(String apiGroupCompanyCode, Integer apiGroupPromotionType) {
List<OcpApiGroup> apiTreeGroupDtos = apiBasicManagementService.apiBaseTreeOther(apiGroupCompanyCode,null,apiGroupPromotionType);
return ResponseVO.ok(apiTreeGroupDtos);
}
}*/
@ApiOperation("服务层级")
@ApiOperation("服务分类层级")
@GetMapping("/apiBaseTreeOther")
public ResponseVO<List<OcpApiGroup>> apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupCode, Integer apiGroupPromotionType) {
List<OcpApiGroup> apiTreeGroupDtos = apiBasicManagementService.apiBaseTreeOther(apiGroupCompanyCode,apiGroupCode,apiGroupPromotionType);
return ResponseVO.ok(apiTreeGroupDtos);
}
@ApiOperation("服务树列表")
@GetMapping("/apiBaseTreeList")
public ResponseVO<List<OcpApiBase>> apiBaseTreeList(String apiGroupCompanyCode, String apiGroupCode) {
List<OcpApiBase> apiBaseList = apiBasicManagementService.apiBaseTreeApiList(apiGroupCompanyCode, apiGroupCode);
return ResponseVO.ok(apiBaseList);
}
}
......@@ -24,8 +24,8 @@ public class ApiDetailsController {
@ApiOperation("服务库服务详情-查询")
@GetMapping("/query")
public ResponseVO<OcpApiBase> getApiDetails(String objId) {
return apiDetailsService.getApiDetails(objId);
public ResponseVO<OcpApiBase> getApiDetails(String code) {
return apiDetailsService.getApiDetails(code);
}
}
......@@ -11,6 +11,5 @@ import java.util.List;
@Mapper
public interface ApiDetailsMapper extends BaseMapper<OcpApiBase> {
OcpApiBaseVo selectByCode(String code);
}
......@@ -12,10 +12,10 @@ import java.util.List;
public interface ApiDetailsService{
/**
*
* @param objId
* @param code
* @return
*/
ResponseVO getApiDetails(String objId);
ResponseVO getApiDetails(String code);
}
......@@ -192,7 +192,7 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl<ApiBasicManagemen
@Override
public ResponseVO<PageInfo<OcpApiBaseVo>> getBaseByGroupCode(ApiBaseDto apiBaseReq) {
if (apiBaseReq.getPageNum() == null || apiBaseReq.getPageSize() == null) {
ResponseVO.error("分页参数不能为空");
return ResponseVO.error("分页参数不能为空");
}
apiGroupCode.add(apiBaseReq.getApiGroupCode());
setGroupIdValue(apiBaseReq.getApiGroupCompanyCode() ,apiBaseReq.getApiGroupCode(),apiBaseReq.getApiPromotion());
......
......@@ -38,8 +38,8 @@ public class ApiDetailsServiceImpl implements ApiDetailsService {
@Override
public ResponseVO getApiDetails(String objId) {
OcpApiBase ocpApiBase = apiDetailsMapper.selectById(objId);
public ResponseVO getApiDetails(String code) {
OcpApiBaseVo ocpApiBase = apiDetailsMapper.selectByCode(code);
return ResponseVO.ok(ocpApiBase);
}
......
......@@ -2,6 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pms.ocp.mapper.ApiDetailsMapper">
<select id="oneTenantGroup" resultType="com.pms.ocp.model.vo.OcpApiBaseVo">
</mapper>
\ No newline at end of file
select
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
LEFT JOIN ocp_api_extent oae
on oab.api_code = oae.api_code
where oab.is_delete = 0
<if test="code !=null and code!=''">
and oab.api_group_code = #{code}
</if>
</select>
</mapper>
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