|
|
@@ -152,20 +152,19 @@ public class AppIrsManage { |
|
|
|
public ApiApplySearchResult searchApp(ApiApplyDTO apply) throws NoSuchAlgorithmException { |
|
|
|
long timestamp = System.currentTimeMillis(); |
|
|
|
String appCode = apply.getAppId(); |
|
|
|
String areaCode = RegionContant.LS_SC_CODE; |
|
|
|
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret); |
|
|
|
String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); |
|
|
|
String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + |
|
|
|
"&appKey=" + searchAppKey + "&" + |
|
|
|
"pageSize=10&pageNum=1&appCode=" + appCode + |
|
|
|
"&areaCode=" + areaCode + "&deptCode=&name="; |
|
|
|
"&areaCode=&deptCode=&name="; |
|
|
|
log.info("url : {}",url); |
|
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
|
ResponseEntity<ApiDTO> forEntity = restTemplate.getForEntity(url, ApiDTO.class); |
|
|
|
|
|
|
|
log.info("查询应用目录 : {}",JSON.toJSONString(forEntity)); |
|
|
|
|
|
|
|
if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getData()) |
|
|
|
if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getDatas()) |
|
|
|
&& CollUtil.isNotEmpty(forEntity.getBody().getDatas().getApiApplySearchResult())){ |
|
|
|
return forEntity.getBody().getDatas().getApiApplySearchResult().get(0); |
|
|
|
} |
|
|
@@ -174,19 +173,20 @@ public class AppIrsManage { |
|
|
|
|
|
|
|
public List<ApiApplySearchResult> searchApps(ApiApplyDTO apply) throws NoSuchAlgorithmException { |
|
|
|
long timestamp = System.currentTimeMillis(); |
|
|
|
String areaCode = RegionContant.LS_SC_CODE; |
|
|
|
String areaCode = StringUtils.isNotBlank(apply.getAreaCode()) ? |
|
|
|
apply.getAreaCode() : null; |
|
|
|
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret); |
|
|
|
String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); |
|
|
|
String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + |
|
|
|
"&appKey=" + searchAppKey + "&" + |
|
|
|
"pageSize=100&pageNum=1&areaCode=" + areaCode + |
|
|
|
"&appKey=" + searchAppKey + "&pageSize=1000&" + |
|
|
|
"pageNum=1&areaCode=" + areaCode + |
|
|
|
"&deptCode=&name="; |
|
|
|
RestTemplate restTemplate = new RestTemplate(); |
|
|
|
ResponseEntity<ApiDTO> forEntity = restTemplate.getForEntity(url, ApiDTO.class); |
|
|
|
|
|
|
|
log.info("查询应用目录 : {}",JSON.toJSONString(forEntity)); |
|
|
|
|
|
|
|
if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getData()) |
|
|
|
if(Objects.nonNull(forEntity.getBody()) && Objects.nonNull(forEntity.getBody().getDatas()) |
|
|
|
&& CollUtil.isNotEmpty(forEntity.getBody().getDatas().getApiApplySearchResult())){ |
|
|
|
return forEntity.getBody().getDatas().getApiApplySearchResult(); |
|
|
|
} |
|
|
|