Commit cc25ba7c by renyizhao

api应用上下架无效问题

parent fd8d753c
......@@ -99,6 +99,8 @@ public class AppApiController {
@Operation(summary = "获得API信息分页")
@PermitAll
public CommonResult<PageResult<AppApiRespVO>> getApiPage(@Valid ApiPageReqVO pageReqVO) {
// 用户端仅展示已上架应用
pageReqVO.setStatus(1);
PageResult<ApiRespVO> pageResult = apiService.getApiPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, AppApiRespVO.class));
}
......
......@@ -46,6 +46,7 @@ public interface ApiMapper extends BaseMapperX<ApiDO> {
.selectAll(ApiDO.class)
.selectAs(ApiCategoryDO :: getName, ApiRespVO :: getCategoryName)
.leftJoin(ApiCategoryDO.class, ApiCategoryDO::getId, ApiDO::getCategoryId)
.eqIfPresent(ApiDO::getStatus, reqVO.getStatus())
.eq(!ObjectUtil.isEmpty(reqVO.getCategoryId()), ApiCategoryDO::getId, reqVO.getCategoryId() )
.like(!StringUtils.isEmpty(reqVO.getSearchQuery()), ApiCategoryDO::getName, reqVO.getSearchQuery())
.or(!StringUtils.isEmpty(reqVO.getSearchQuery()))
......
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 sign in to comment