Commit 7983ab50 authored by 赵啸非's avatar 赵啸非

添加设备上线和下线的业务日志记录

parent dd5a553f
...@@ -226,6 +226,8 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si ...@@ -226,6 +226,8 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si
public String getSiteTree(Context context) { public String getSiteTree(Context context) {
if (platFormType.equalsIgnoreCase(PlatformTypeEnum.CLOUD.getValue())) { if (platFormType.equalsIgnoreCase(PlatformTypeEnum.CLOUD.getValue())) {
String token = context.getUser().getToken(); String token = context.getUser().getToken();
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
if (!ObjectUtils.isEmpty(token)) { if (!ObjectUtils.isEmpty(token)) {
String resp = siteFeign.siteTree(token); String resp = siteFeign.siteTree(token);
Rest<String> rest = JSON.parseObject(resp, new TypeReference<Rest<String>>() { Rest<String> rest = JSON.parseObject(resp, new TypeReference<Rest<String>>() {
...@@ -241,10 +243,15 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si ...@@ -241,10 +243,15 @@ public class SitestatServiceImpl extends AbstractCRUDServiceImpl<SitestatDao, Si
SiteTreeSelect siteTreeSelect = JSON.parseObject(item.toString(), SiteTreeSelect.class); SiteTreeSelect siteTreeSelect = JSON.parseObject(item.toString(), SiteTreeSelect.class);
return siteTreeSelect; return siteTreeSelect;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
model.put("siteTree", JSON.toJSONString(collect));
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
return jsonObject.toJSONString();
} }
jsonObject.put(KEY_RESULT_DATA, model);
return resp; jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
return jsonObject.toJSONString();
} }
} else { } else {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
......
...@@ -54,3 +54,6 @@ Accept: application/json ...@@ -54,3 +54,6 @@ Accept: application/json
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