Commit fc8a4cfc authored by 郭凡凡's avatar 郭凡凡

更新

parent 9f5574b8
...@@ -209,8 +209,8 @@ public class ApiBasicManagementController { ...@@ -209,8 +209,8 @@ public class ApiBasicManagementController {
@ApiOperation("省侧-应用接入申请-的模糊查询") @ApiOperation("省侧-应用接入申请-的模糊查询")
@GetMapping("/selectByCondition") @GetMapping("/selectByCondition")
public ResponseVO<PageInfo<OcpApiBaseVo>> selectByCondition(ApiBaseDto ApiBaseReq) { public ResponseVO<PageInfo<OcpApiBase>> selectByCondition(ApiBaseDto apiBaseReq) {
return apiBasicManagementService.getBaseByGroupCode(ApiBaseReq); return apiBasicManagementService.selectByCondition(apiBaseReq);
} }
......
package com.pms.ocp.mapper; package com.pms.ocp.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pms.ocp.model.dto.ApiBaseDto;
import com.pms.ocp.model.dto.OcpApiBaseDto; import com.pms.ocp.model.dto.OcpApiBaseDto;
import com.pms.ocp.model.entity.OcpApiBase; import com.pms.ocp.model.entity.OcpApiBase;
import com.pms.ocp.model.vo.OcpApiBaseVo; import com.pms.ocp.model.vo.OcpApiBaseVo;
...@@ -18,5 +19,5 @@ public interface ApiBasicManagementMapper extends BaseMapper<OcpApiBase> { ...@@ -18,5 +19,5 @@ public interface ApiBasicManagementMapper extends BaseMapper<OcpApiBase> {
List<OcpApiBase> selectByCondition(@Param("apiCode") String apiCode, @Param("apiName") String apiName, @Param("apiCenterCode") String apiCenterCode,@Param("apiGroupCode") String apiGroupCode); List<OcpApiBase> selectByCondition(ApiBaseDto apiBaseReq);
} }
...@@ -57,6 +57,9 @@ public class ApiBaseDto implements Serializable { ...@@ -57,6 +57,9 @@ public class ApiBaseDto implements Serializable {
@ApiModelProperty("当前页") @ApiModelProperty("当前页")
private Integer pageNum; private Integer pageNum;
//不同接口区分
@ApiModelProperty("当前页2")
private Integer currentPage;
@ApiModelProperty("每页条数") @ApiModelProperty("每页条数")
private Integer pageSize; private Integer pageSize;
......
...@@ -83,15 +83,9 @@ public interface ApiBasicManagementService extends IService<OcpApiBase> { ...@@ -83,15 +83,9 @@ public interface ApiBasicManagementService extends IService<OcpApiBase> {
/** /**
* 省侧-应用接入申请-的模糊查询 * 省侧-应用接入申请-的模糊查询
* @param apiCode
* @param apiName
* @param apiCenterCode
* @param currentPage
* @param pageSize
* @param apiGroupCode
* @return * @return
*/ */
ResponseVO<PageInfo<OcpApiBase>> selectByCondition(String apiCode, String apiName, String apiCenterCode,Integer currentPage,Integer pageSize,String apiGroupCode); ResponseVO<PageInfo<OcpApiBase>> selectByCondition(ApiBaseDto apiBaseReq);
/** /**
* 省侧-应用接入申请-查询组中所有中心 * 省侧-应用接入申请-查询组中所有中心
......
...@@ -258,23 +258,31 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl<ApiBasicManagemen ...@@ -258,23 +258,31 @@ public class ApiBasicManagementServiceImpl extends ServiceImpl<ApiBasicManagemen
/** /**
* 省侧-应用接入申请-的模糊查询 * 省侧-应用接入申请-的模糊查询
* @param apiCode
* @param apiName
* @param apiCenterCode
* @param apiGroupCode
* @param currentPage
* @param pageSize
* @return * @return
*/ */
public ResponseVO<PageInfo<OcpApiBase>> selectByCondition(String apiCode, String apiName,String apiCenterCode ,Integer currentPage, Integer pageSize, String apiGroupCode) { public ResponseVO<PageInfo<OcpApiBase>> selectByCondition(ApiBaseDto apiBaseReq) {
if (currentPage == null || pageSize == null) { if (apiBaseReq.getCurrentPage() == null || apiBaseReq.getPageSize() == null) {
return ResponseVO.error("分页参数不能为空"); return ResponseVO.error("分页参数不能为空");
} }
PageHelper.startPage(currentPage, pageSize); apiGroupCode.add(apiBaseReq.getApiGroupCode());
List<OcpApiBase> list = apiBasicManagementMapper.selectByCondition(apiCode, apiName, apiCenterCode,apiGroupCode); setGroupIdValue(apiBaseReq.getApiGroupCompanyCode(), apiBaseReq.getApiGroupCode(), apiBaseReq.getApiPromotion());
PageHelper.startPage(apiBaseReq.getCurrentPage(), apiBaseReq.getPageSize());
apiBaseReq.setApiGroupCodeList(apiGroupCode);
// List<OcpApiBaseVo> ocpApiBaseVos = ocpApiGroupMapper.selectPageLists(apiBaseReq);
List<OcpApiBase> list = apiBasicManagementMapper.selectByCondition(apiBaseReq);
apiGroupCode.clear();
PageInfo<OcpApiBase> pageInfo = new PageInfo<>(list); PageInfo<OcpApiBase> pageInfo = new PageInfo<>(list);
return ResponseVO.ok(pageInfo); return ResponseVO.ok(pageInfo);
//
// if (currentPage == null || pageSize == null) {
// return ResponseVO.error("分页参数不能为空");
// }
// PageHelper.startPage(currentPage, pageSize);
// List<OcpApiBase> list = apiBasicManagementMapper.selectByCondition(apiCode, apiName, apiCenterCode,apiGroupCode);
// PageInfo<OcpApiBase> pageInfo = new PageInfo<>(list);
// return ResponseVO.ok(pageInfo);
} }
/** /**
......
...@@ -27,7 +27,44 @@ ...@@ -27,7 +27,44 @@
</select> </select>
<!-- <select id="queryOcpApiBaseDto" resultMap="oabMap">--> <select id="selectByCondition" resultType="com.pms.ocp.model.entity.OcpApiBase">
select * from ocp_api_base
<where>
<if test="apiGroupCodeList !=null ">
and api_group_code in
<foreach item="apiGroupCode" collection="apiGroupCodeList" open="(" separator=","
close=")">
#{apiGroupCode}
</foreach>
</if>
<if test="apiUnit !=null and apiUnit!=''">
and api_unit = #{apiUnit}
</if>
<if test="apiName !=null and apiName!=''">
and api_name = #{apiName}
</if>
<if test="apiCode !=null and apiCode!=''">
and api_code = #{apiCode}
</if>
<if test="apiPromotion !=null and apiPromotion!=''">
and api_promotion = #{apiPromotion}
</if>
<if test="startCTime !=null ">
<![CDATA[
and api_ctime >= #{startCTime}
]]>
</if>
<if test="endCTime !=null ">
<![CDATA[
and api_ctime <= #{endCTime}
]]>
</if>
<if test="keyword !=null and keyword != '' ">
and api_name like CONCAT('%', #{keyword}::text,'%')
</if>
</where>
</select>
<!-- <select id="queryOcpApiBaseDto" resultMap="oabMap">-->
<!-- select--> <!-- select-->
<!-- oab.obj_id,--> <!-- oab.obj_id,-->
<!-- oab.api_code,oae.api_code,oab.api_name,oae.cluster_name,--> <!-- oab.api_code,oae.api_code,oab.api_name,oae.cluster_name,-->
...@@ -70,23 +107,5 @@ ...@@ -70,23 +107,5 @@
<!-- </select>--> <!-- </select>-->
<select id="selectByCondition" resultType="com.pms.ocp.model.entity.OcpApiBase">
select api_name,api_code,api_version,owner_company_code,api_description ,api_center_code from ocp_api_base
<where>
<if test="apiCode!=null and apiCode!=''">
and api_code=#{apiCode}
</if>
<if test="apiName!=null and apiName!=''">
and api_name=#{apiName}
</if>
<if test="apiCenterCode!=null and apiCenterCode!=''">
and api_center_code=#{apiCenterCode}
</if>
<if test="apiGroupCode!=null and apiGroupCode!=''">
and api_group_code=#{apiGroupCode}
</if>
</where>
</select>
</mapper> </mapper>
\ No newline at end of file
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