Commit 89b83256 authored by zhaochengming's avatar zhaochengming

服务--模糊查询

parent a4f327df
...@@ -156,13 +156,13 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG ...@@ -156,13 +156,13 @@ public class OcpApiTreeServiceImpl extends ServiceImpl<OcpApiTreeMapper, OcpApiG
public Page<OcpApiGroup> getOnePages(PageGroupDto pageGroupDto) { public Page<OcpApiGroup> getOnePages(PageGroupDto pageGroupDto) {
Page pageInfo = new Page(pageGroupDto.getPageNum(), pageGroupDto.getPageSize()); Page pageInfo = new Page(pageGroupDto.getPageNum(), pageGroupDto.getPageSize());
LambdaQueryWrapper<OcpApiGroup> qw = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OcpApiGroup> qw = new LambdaQueryWrapper<>();
if ("".equals(pageGroupDto.getKeyword())) { if (StringUtils.isBlank(pageGroupDto.getKeyword())) {
if (StringUtils.isBlank(pageGroupDto.getApiGroupLevel())) { if (StringUtils.isBlank(pageGroupDto.getApiGroupPcode())) {
qw.eq(OcpApiGroup::getApiGroupPromotionType, pageGroupDto.getApiGroupPromotionType()); qw.eq(OcpApiGroup::getApiGroupPromotionType, pageGroupDto.getApiGroupPromotionType());
mapper.selectPage(pageInfo, qw); mapper.selectPage(pageInfo, qw);
} else if ("Middleground".equals(pageGroupDto.getApiGroupLevel()) || "sys_center".equals(pageGroupDto.getApiGroupLevel()) || "api_group".equals(pageGroupDto.getApiGroupLevel())) { } else{
List<OcpApiGroup> ocpApiGroups = mapper.selectLists(pageGroupDto.getApiGroupPromotionType(), pageGroupDto.getApiGroupCode()); List<OcpApiGroup> ocpApiGroups = mapper.selectLists(pageGroupDto.getApiGroupPromotionType(), pageGroupDto.getApiGroupCode());
pageInfo.setRecords(ocpApiGroups); pageInfo.setRecords(ocpApiGroups);
pageInfo.setTotal(ocpApiGroups.size()); pageInfo.setTotal(ocpApiGroups.size());
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</select> </select>
<!--服务树 -查询--> <!--服务树 -查询-->
<select id="selectLists" resultType="com.pms.ocp.model.entity.OcpApiGroup"> <select id="selectLists" resultType="com.pms.ocp.model.entity.OcpApiGroup">
SELECT * FROM ocp_api_group WHERE api_group_promotion_type = #{apiGroupPromotionType} and api_group_pcode = #{apiGroupCode}; SELECT * FROM ocp_api_group WHERE api_group_promotion_type = #{apiGroupPromotionType} and api_group_pcode = #{apiGroupcode};
</select> </select>
......
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