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

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

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