Commit 868a1b54 authored by 廖旭伟's avatar 廖旭伟

门户用户登录时返回站点树

parent 4a242acf
...@@ -111,13 +111,13 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi ...@@ -111,13 +111,13 @@ public class LoginController extends BaseCRUDJsonBodyMappingController<UserServi
SitePdu sitePdu = new SitePdu(); SitePdu sitePdu = new SitePdu();
List<String> areaCodeList = Arrays.asList(userEntity.getAreaCodes().split(",")); List<String> areaCodeList = Arrays.asList(userEntity.getAreaCodes().split(","));
sitePdu.setAreaCodeList(areaCodeList); sitePdu.setAreaCodeList(areaCodeList);
String resp = apiModelFeign.getSitesByQuery(sitePdu); String resp = apiModelFeign.siteTree(token);
ApiResp<JSONObject> apiResp = JSON.parseObject(resp, ApiResp.class); ApiResp<JSONObject> apiResp = JSON.parseObject(resp, ApiResp.class);
if (apiResp.getCode() != YesNoEnum.YES.getValue()) { if (apiResp.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException("获取用户站点列表树数据失败:" + apiResp.getMsg()); throw new AppException("获取用户站点列表树数据失败:" + apiResp.getMsg());
} }
if (apiResp.getData().get("data") != null) { if (apiResp.getData().get("siteTree") != null) {
data.put("siteList", apiResp.getData().get("data")); data.put("siteList", apiResp.getData().get("siteTree"));
} else { } else {
data.put("siteList", Collections.emptyList()); data.put("siteList", Collections.emptyList());
} }
......
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 to comment