自动化立体仓库 - WMS系统
pang.jiabao
3 天以前 74863c38a407b1e0f36250dfa0c63e5da7fe5f66
src/main/java/com/zy/common/config/ControllerResAdvice.java
@@ -1,6 +1,7 @@
package com.zy.common.config;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.asrs.entity.mes.MesReturn;
@@ -75,6 +76,20 @@
                            String.valueOf(mesReturn.getSuccess()).equalsIgnoreCase("1")
                    );
                }
                if (o instanceof JSONObject) {
                    String appkey = request.getHeader("appkey");
                    Object reqCache = request.getAttribute("cache");
                        // 保存接口日志
                        apiLogService.save(
                                String.valueOf(appAuth),
                                request.getRequestURI(),
                                appkey,
                                IpTools.gainRealIp(request),
                                reqCache==null?"": JSON.toJSONString(reqCache),
                                JSON.toJSONString(o),
                                String.valueOf(((JSONObject) o).get("Success")).equalsIgnoreCase("1")
                        );
                }
            }
        }
        return o;