Commit 2b9d589b authored by zhaochengming's avatar zhaochengming

服务bug修改

parent 09a5b916
...@@ -41,5 +41,5 @@ public interface OcpApiTreeMapper extends BaseMapper<OcpApiGroup> { ...@@ -41,5 +41,5 @@ public interface OcpApiTreeMapper extends BaseMapper<OcpApiGroup> {
OcpApiGroup selectCode(String code); OcpApiGroup selectCode(String code);
//根据code查询是否含有下级服务 //根据code查询是否含有下级服务
List<OcpApiGroup> selectGrpPcode(); List<OcpApiGroup> selectGroupPcode(String apiGroupCode);
} }
...@@ -145,7 +145,7 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -145,7 +145,7 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
queryWrapper.eq(OcpApiGroup::getApiGroupPcode, ocpApiGroup.getApiGroupCode()); queryWrapper.eq(OcpApiGroup::getApiGroupPcode, ocpApiGroup.getApiGroupCode());
String objId = ocpApiGroup.getObjId(); String objId = ocpApiGroup.getObjId();
List<OcpApiGroup> list = mapper.selectGrpPcode(); List<OcpApiGroup> list = mapper.selectGroupPcode(ocpApiGroup.getApiGroupCode());
if (list.size() >= 1) { if (list.size() >= 1) {
flag = false; flag = false;
} }
...@@ -185,10 +185,17 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -185,10 +185,17 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
} }
} else if (StringUtils.isNotBlank(pageGroupDto.getKeyword())) { } else if (StringUtils.isNotBlank(pageGroupDto.getKeyword())) {
if (StringUtils.isBlank(pageGroupDto.getApiGroupCode())){
LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword()))
.and(c->c.eq(OcpApiGroup::getApiGroupPromotionType,pageGroupDto.getApiGroupPromotionType()));
mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper);
}else if (StringUtils.isNotBlank(pageGroupDto.getApiGroupCode())) {
LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword())) LambdaQueryWrapper<OcpApiGroup> ocpTenantGroupLambdaQueryWrapper = qw.and(c -> c.like(OcpApiGroup::getApiGroupName, pageGroupDto.getKeyword()))
.and(c -> c.eq(OcpApiGroup::getApiGroupPcode, pageGroupDto.getApiGroupCode())); .and(c -> c.eq(OcpApiGroup::getApiGroupPcode, pageGroupDto.getApiGroupCode()));
mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper); mapper.selectPage(pageInfo, ocpTenantGroupLambdaQueryWrapper);
} }
}
return pageInfo; return pageInfo;
......
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