diff --git a/src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java b/src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java index 94789f62b295d86fc73676cc8549507dfcfd0a6d..54822197e50f8d8d22a93561f98c546b85daedfa 100644 --- a/src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java +++ b/src/main/java/com/pms/ocp/controller/ApiBasicManagementController.java @@ -19,6 +19,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.omg.PortableInterceptor.Interceptor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -201,8 +202,8 @@ public class ApiBasicManagementController { @ApiOperation("服务树层级") @GetMapping("/apiBaseTreeOther") - public ResponseVO> apiBaseTreeOther(String apiGroupCompanyCode,String apiGroupPcode) { - List apiTreeGroupDtos = apiBasicManagementService.apiBaseTreeOther(apiGroupCompanyCode,apiGroupPcode); + public ResponseVO> apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode, Integer apiGroupPromotionType) { + List apiTreeGroupDtos = apiBasicManagementService.apiBaseTreeOther(apiGroupCompanyCode,apiGroupPcode,apiGroupPromotionType); return ResponseVO.ok(apiTreeGroupDtos); } @ApiOperation("服务列表树最低级") diff --git a/src/main/java/com/pms/ocp/mapper/OcpApiGroupMapper.java b/src/main/java/com/pms/ocp/mapper/OcpApiGroupMapper.java index 217f961194b683326559ebbbe59d7f1679319456..aba423024d8cd7129fa06a212db96254bb621183 100644 --- a/src/main/java/com/pms/ocp/mapper/OcpApiGroupMapper.java +++ b/src/main/java/com/pms/ocp/mapper/OcpApiGroupMapper.java @@ -12,7 +12,7 @@ public interface OcpApiGroupMapper extends BaseMapper { List selectTreeList(String apiGroupCompanyCode); - List apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode); + List apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode,Integer apiGroupPromotionType); List selectByPcode(String code); diff --git a/src/main/java/com/pms/ocp/model/dto/ApiBaseDto.java b/src/main/java/com/pms/ocp/model/dto/ApiBaseDto.java index dc55cc9e06d6ab6b803856452bb9040ef5525fde..a26de1760399e310b2f67e13c4bb68808d69346e 100644 --- a/src/main/java/com/pms/ocp/model/dto/ApiBaseDto.java +++ b/src/main/java/com/pms/ocp/model/dto/ApiBaseDto.java @@ -27,7 +27,7 @@ public class ApiBaseDto implements Serializable { private String apiGroupCompanyCode; @ApiModelProperty("推广类型0:统建;1:自建") - private String apiPromotion; + private Integer apiPromotion; @ApiModelProperty("注册时段-开始") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @@ -54,11 +54,11 @@ public class ApiBaseDto implements Serializable { @ApiModelProperty("每页条数") private Integer pageSize; - public String getApiPromotion() { + public Integer getApiPromotion() { return apiPromotion; } - public void setApiPromotion(String apiPromotion) { + public void setApiPromotion(Integer apiPromotion) { this.apiPromotion = apiPromotion; } diff --git a/src/main/java/com/pms/ocp/service/ApiBasicManagementService.java b/src/main/java/com/pms/ocp/service/ApiBasicManagementService.java index 058d4aa51e9444c45933a54aa43d3f48e4cbd106..52b63669fefac06bd0d3758de6bfb694e199755a 100644 --- a/src/main/java/com/pms/ocp/service/ApiBasicManagementService.java +++ b/src/main/java/com/pms/ocp/service/ApiBasicManagementService.java @@ -71,7 +71,7 @@ public interface ApiBasicManagementService extends IService { * @param apiGroupPcode * @return */ - List apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode); + List apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode,Integer apiGroupPromotionType); /** * 根据分组code获取列表 diff --git a/src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java b/src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java index 17ee59b0fbc1a9ea9260fe16cd9efca574166d2a..cbfb3e290b8a301d932386a2a340103b4e24c79c 100644 --- a/src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java +++ b/src/main/java/com/pms/ocp/service/impl/ApiBasicManagementServiceImpl.java @@ -181,8 +181,8 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode) { - List ocpApiGroups = ocpApiGroupMapper.apiBaseTreeOther(apiGroupCompanyCode,apiGroupPcode); + public List apiBaseTreeOther(String apiGroupCompanyCode, String apiGroupPcode,Integer apiGroupPromotionType) { + List ocpApiGroups = ocpApiGroupMapper.apiBaseTreeOther(apiGroupCompanyCode,apiGroupPcode,apiGroupPromotionType); return ocpApiGroups; } @@ -194,7 +194,7 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl codes = getIdsByPIdPub(apiGroupCompanyCode,code); + private void setGroupIdValue(String apiGroupCompanyCode ,String code,Integer apiGroupPromotionType) { + List codes = getIdsByPIdPub(apiGroupCompanyCode,code,apiGroupPromotionType); if(codes.size()>0){ for (String cod : codes ){ - setGroupIdValue(apiGroupCompanyCode,cod); + setGroupIdValue(apiGroupCompanyCode,cod,apiGroupPromotionType); apiGroupCode.add(cod); }; } @@ -260,8 +260,8 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl getIdsByPIdPub(String apiGroupCompanyCode,String code) { - List ocpApiGroups = ocpApiGroupMapper.apiBaseTreeOther(apiGroupCompanyCode, code); + public List getIdsByPIdPub(String apiGroupCompanyCode,String code,Integer apiGroupPromotionType) { + List ocpApiGroups = ocpApiGroupMapper.apiBaseTreeOther(apiGroupCompanyCode, code,apiGroupPromotionType); return ocpApiGroups.stream().map(OcpApiGroup::getApiGroupCode).collect(Collectors.toList()); } diff --git a/src/main/resources/mapper/OcpApiGroupMapper.xml b/src/main/resources/mapper/OcpApiGroupMapper.xml index 28b72d6553c95e49acecf9e1c1b3ccea0d6bccd7..bd55a8c9bd184a317b39349ba31b98717a2516ab 100644 --- a/src/main/resources/mapper/OcpApiGroupMapper.xml +++ b/src/main/resources/mapper/OcpApiGroupMapper.xml @@ -33,14 +33,20 @@