mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 02:46:50 +08:00
提交查询慢问题
This commit is contained in:
@@ -35,7 +35,7 @@ public class ThirdApi {
|
||||
public List<UserInfoList> getAllUserList(UserListParam userListParam, String token) {
|
||||
log.info("获取用户");
|
||||
String resp = Optional.ofNullable(HttpRequest.post(searchUserListUrl).body(JSONUtil.toJsonStr(userListParam)).header("token", token).execute().body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
System.out.println(resp);
|
||||
log.info("获取用户返回值 {}",resp);
|
||||
return Opt.ofBlankAble(resp).map(t -> JSONUtil.toBean(resp, UserInfoListRootBean.class).success())
|
||||
.map(UserInfoListRootBean::getResult)
|
||||
.map(result -> Opt.ofEmptyAble(result.getUserInfoList()).peek(t -> nextPage(userListParam, token, t, result)).orElse(ListUtil.toList()))
|
||||
@@ -45,7 +45,7 @@ public class ThirdApi {
|
||||
private void getAllUserList(UserListParam userListParam, String token, List<UserInfoList> userInfoLists) {
|
||||
log.info("获取用户2");
|
||||
String resp = Optional.ofNullable(HttpRequest.post(searchUserListUrl).body(JSONUtil.toJsonStr(userListParam)).header("token", token).execute().body()).orElseThrow(() -> new RuntimeException("token校验失败"));
|
||||
System.out.println(resp);
|
||||
log.info("获取用户返回值 {}",resp);
|
||||
Opt.ofBlankAble(resp).map(t -> JSONUtil.toBean(t, UserInfoListRootBean.class).success()).map(UserInfoListRootBean::getResult).map(UserInfoListRootBean.ResultData::getUserInfoList).stream().flatMap(Collection::stream).forEach(userInfoLists::add);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user