Procházet zdrojové kódy

增加分页数据

tags/24080901
WendyYang před 1 rokem
rodič
revize
c043181fc8
2 změnil soubory, kde provedl 5 přidání a 5 odebrání
  1. +3
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/ApplicationController.java
  2. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java

+ 3
- 3
pmapi/src/main/java/com/ningdatech/pmapi/irs/controller/ApplicationController.java Zobrazit soubor

@@ -44,9 +44,9 @@ public class ApplicationController {
return appIrsManage.searchApps(apply);
}

@GetMapping("/digitalResourcesIndicators/{appCode}")
public JSONObject getDigitalResourcesIndicators(@PathVariable String appCode) {
return appIrsManage.getDigitalResourceIndicatorsByAppCode(appCode);
@GetMapping("/digitalResourcesIndicators/{appCode}/{pageSize}")
public JSONObject getDigitalResourcesIndicators(@PathVariable String appCode,@PathVariable Integer pageSize) {
return appIrsManage.getDigitalResourceIndicatorsByAppCode(appCode, pageSize);
}

}

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/irs/manage/AppIrsManage.java Zobrazit soubor

@@ -360,7 +360,7 @@ public class AppIrsManage {
return forEntity.getBody();
}

public JSONObject getDigitalResourceIndicatorsByAppCode(String appCode) {
public JSONObject getDigitalResourceIndicatorsByAppCode(String appCode, Integer pageSize) {
long timestamp = System.currentTimeMillis();
String appSecret = driAppSecret;
String appKey = driAppKey;
@@ -379,7 +379,7 @@ public class AppIrsManage {

String url = driUrl + "?" +
"requestTime=" + timestamp + "&sign=" + sign +
"&appKey=" + appKey + "&appCode=" + appCode;
"&appKey=" + appKey + "&appCode=" + appCode + "&pageIndex=1&pageSize=" + pageSize;
log.info("url :{}", url);
ResponseEntity<JSONObject> forEntity = restTemplate.getForEntity(url, JSONObject.class);
log.info(Objects.requireNonNull(forEntity.getBody()).toJSONString());


Načítá se…
Zrušit
Uložit