src/main/java/org/edgegallery/appstore/interfaces/app/facade/AppServiceFacade.java
public ResponseEntity<Page<AppDto>> queryAppsByCondV2(QueryAppReqDto queryAppReqDto) {
        Map<String, Object> params = new HashMap<>();
        params.put("showType", queryAppReqDto.getShowType());
        params.put("status", queryAppReqDto.getQueryCtrl().getStatus());
        params.put("userId", queryAppReqDto.getUserId());
        params.put("industry", queryAppReqDto.getIndustry());
        params.put("affinity", queryAppReqDto.getAffinity());
        params.put("workloadType", queryAppReqDto.getWorkloadType());
        params.put("queryCtrl", queryAppReqDto.getQueryCtrl());
        params.put("type", queryAppReqDto.getTypes());
        params.put("limit", queryAppReqDto.getQueryCtrl().getLimit());
        params.put("offset", queryAppReqDto.getQueryCtrl().getOffset());
        params.put("appName", queryAppReqDto.getQueryCtrl().getAppName());
        Stream<AppDto> appStream = appRepository.queryV2(params).stream().map(AppDto::of).collect(Collectors.toList())
            .stream();
        long total = appRepository.countTotalV2(params);
        return ResponseEntity
            .ok(new Page<>(appStream.collect(Collectors.toList()), queryAppReqDto.getQueryCtrl().getLimit(),
                queryAppReqDto.getQueryCtrl().getOffset(), total));
    }
/**
     * Query app list by parameters follows.
     *
     * @param queryAppReqDto query condition.
     * @return List<AppDto></AppDto>
     */
Query app list by parameters follows.
@param queryAppReqDto query condition.
@return List
Query app list by parameters follows . @param queryAppReqDto query condition . @return List
public ResponseEntity<Page<AppDto>> queryAppsByCondV2(QueryAppReqDto queryAppReqDto) {
        Map<String, Object> params = new HashMap<>();
        params.put("showType", queryAppReqDto.getShowType());
        params.put("status", queryAppReqDto.getQueryCtrl().getStatus());
        params.put("userId", queryAppReqDto.getUserId());
        params.put("industry", queryAppReqDto.getIndustry());
        params.put("affinity", queryAppReqDto.getAffinity());
        params.put("workloadType", queryAppReqDto.getWorkloadType());
        params.put("queryCtrl", queryAppReqDto.getQueryCtrl());
        params.put("type", queryAppReqDto.getTypes());
        params.put("limit", queryAppReqDto.getQueryCtrl().getLimit());
        params.put("offset", queryAppReqDto.getQueryCtrl().getOffset());
        params.put("appName", queryAppReqDto.getQueryCtrl().getAppName());
        Stream<AppDto> appStream = appRepository.queryV2(params).stream().map(AppDto::of).collect(Collectors.toList())
            .stream();
        long total = appRepository.countTotalV2(params);
        return ResponseEntity
            .ok(new Page<>(appStream.collect(Collectors.toList()), queryAppReqDto.getQueryCtrl().getLimit(),
                queryAppReqDto.getQueryCtrl().getOffset(), total));
    }
public ResponseEntity < Page < AppDto > > queryAppsByCondV2 ( QueryAppReqDto queryAppReqDto ) { Map < String , Object > params = new HashMap < > ( ) ; params . put ( "showType" , queryAppReqDto . getShowType ( ) ) ; params . put ( "status" , queryAppReqDto . getQueryCtrl ( ) . getStatus ( ) ) ; params . put ( "userId" , queryAppReqDto . getUserId ( ) ) ; params . put ( "industry" , queryAppReqDto . getIndustry ( ) ) ; params . put ( "affinity" , queryAppReqDto . getAffinity ( ) ) ; params . put ( "workloadType" , queryAppReqDto . getWorkloadType ( ) ) ; params . put ( "queryCtrl" , queryAppReqDto . getQueryCtrl ( ) ) ; params . put ( "type" , queryAppReqDto . getTypes ( ) ) ; params . put ( "limit" , queryAppReqDto . getQueryCtrl ( ) . getLimit ( ) ) ; params . put ( "offset" , queryAppReqDto . getQueryCtrl ( ) . getOffset ( ) ) ; params . put ( "appName" , queryAppReqDto . getQueryCtrl ( ) . getAppName ( ) ) ; Stream < AppDto > appStream = appRepository . queryV2 ( params ) . stream ( ) . map ( AppDto :: of ) . collect ( Collectors . toList ( ) ) . stream ( ) ; long total = appRepository . countTotalV2 ( params ) ; return ResponseEntity . ok ( new Page < > ( appStream . collect ( Collectors . toList ( ) ) , queryAppReqDto . getQueryCtrl ( ) . getLimit ( ) , queryAppReqDto . getQueryCtrl ( ) . getOffset ( ) , total ) ) ; }
Query app list by parameters follows.
Query app list by parameters follows .