|
@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.fdkankan.common.constant.ServerCode;
|
|
|
import com.fdkankan.manage.common.CacheUtil;
|
|
|
+import com.fdkankan.manage.common.ResultData;
|
|
|
import com.fdkankan.manage.config.SaTokenConfigure;
|
|
|
import com.fdkankan.manage.entity.IncrementUseType;
|
|
|
import com.fdkankan.manage.entity.OperLog;
|
|
@@ -93,7 +94,6 @@ public class VisitLogInterceptor {
|
|
|
JSONObject jsonObject = JSON.parseObject(resultStr);
|
|
|
if(jsonObject.getInteger("code")== null || jsonObject.getInteger("code").equals(ServerCode.SUCCESS.code())){
|
|
|
msg = "操作成功";
|
|
|
- result = updateResult(jsonObject);
|
|
|
}
|
|
|
}
|
|
|
//获取用户信息 如果已登录,从token中获取用户信息,如果是登录接口,查询数据库获取用户信息
|
|
@@ -217,28 +217,5 @@ public class VisitLogInterceptor {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- private Object updateResult(JSONObject jsonObject) {
|
|
|
- try {
|
|
|
-
|
|
|
-
|
|
|
- JSONObject data = jsonObject.getJSONObject("data");
|
|
|
- if(data != null && data.getJSONArray("list")!=null && !data.getJSONArray("list").isEmpty()){
|
|
|
- JSONArray list = data.getJSONArray("list");
|
|
|
- for (Object object : list) {
|
|
|
- JSONObject obj = (JSONObject) object;
|
|
|
- if(obj.containsKey("useType") && obj.getInteger("useType")!=null ){
|
|
|
- obj.put("useTypeStr", CacheUtil.useTypeMap.get(obj.getInteger("useType")).getName());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }catch (Exception e){
|
|
|
- log.info("updateResult-error:{}",e);
|
|
|
- }
|
|
|
- return jsonObject;
|
|
|
-
|
|
|
- }
|
|
|
}
|
|
|
|