Commit 72cc6d70 authored by 廖旭伟's avatar 廖旭伟

修改站点树接口返回值结构

parent bacc03ac
......@@ -153,6 +153,38 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
Map<String, Object> model = new HashMap();
String busiDesc = "查询用户站点列表";
int code = 1;
try {
String resp = iSiteFeign.siteTree(authorization);
ApiResp<JSONObject> apiResp = JSON.parseObject(resp, ApiResp.class);
if (apiResp.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException("获取用户站点列表树数据失败:" + apiResp.getMsg());
}
if (apiResp.getData().get("siteTree") != null) {
model.put("data", apiResp.getData().get("siteTree"));
} else {
model.put("data", Collections.emptyList());
}
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
ret.setCode(code);
ret.setData(model);
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}
@PostMapping({"site/newSiteTree"})
public Rest<Object> newSiteTree(@RequestHeader("Authorization") String authorization) {
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
String busiDesc = "查询用户站点列表";
int code = 1;
try {
String resp = iSiteFeign.siteTree(authorization);
......
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