自动化立体仓库 - WMS系统
pang.jiabao
4 天以前 d18505cc87fa30a5b202057bbcc4236986efc80a
src/main/java/com/zy/asrs/service/impl/ApiLogServiceImpl.java
@@ -33,7 +33,32 @@
                request,    // 请求内容
                response,
                null,    // 异常内容
                success?1:0 ,    // 结果
                success ? 1 : 0,    // 结果
                1,    // 状态
                now,    // 添加时间
                null,    // 修改时间
                null    // 备注
        );
        if (!this.insert(apiLog)) {
            log.error("接口调用日志保存失败!");
        }
    }
    @Async
    @Override
    public void save(String namespace, String url, String appkey, String ip, String request, String response, boolean success,String error) {
        Date now = new Date();
        ApiLog apiLog = new ApiLog(
                String.valueOf(snowflakeIdWorker.nextId()),    // 日志编号
                namespace,    // 名称空间
                url,    // 接口地址
                appkey,    // 平台密钥
                String.valueOf(now.getTime()),    // 时间戳
                ip,    // 客户端IP
                request,    // 请求内容
                response,
                error,    // 异常内容
                success ? 1 : 0,    // 结果
                1,    // 状态
                now,    // 添加时间
                null,    // 修改时间