jiangping
2024-07-10 0ad53b755fb839f3275940530229d4705824e7e0
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -115,7 +115,7 @@
        }catch (Exception e) {
            log.error("【海康门禁事件推送】========失败=======:\n" + e.getMessage());
        }finally {
            saveInterfaceLog(param,"/business/hksync/push/acs",result);
            saveInterfaceLog(param,"/business/hksync/push/acs",result,false);//不计日志
        }
        return  null;
@@ -306,7 +306,7 @@
            log.error("【海康访客事件推送】========失败=======:\n"+e.getMessage());
        }
        saveInterfaceLog(param,"/business/hksync/push/visit",result);
        saveInterfaceLog(param,"/business/hksync/push/visit",result,true);
        return  null;
    }
@@ -478,7 +478,7 @@
            log.error("【海康停车场事件推送】========失败=======:\n"+e.getMessage());
        }
        saveInterfaceLog(param,"/business/hksync/push/parks",result);
        saveInterfaceLog(param,"/business/hksync/push/parks",result,false);
        return  null;
    }
@@ -586,18 +586,26 @@
        return retention;
    }
    private void saveInterfaceLog(Object param, String path,String result) {
        InterfaceLog hkMonitoryLogDO=new InterfaceLog();
        hkMonitoryLogDO.setType(1);
        hkMonitoryLogDO.setCreateDate(new Date());
        hkMonitoryLogDO.setIsdeleted(0);
        if(param!=null){
            hkMonitoryLogDO.setRequest(JSONObject.toJSONString(param));
    private void saveInterfaceLog(Object param, String path,String result,boolean need) {
        if(!need){
            return;
        }
        hkMonitoryLogDO.setRepose(result);
        hkMonitoryLogDO.setName(path);
        hkMonitoryLogDO.setUrl(path);
        interfaceLogMapper.insert(hkMonitoryLogDO);
        try {
            InterfaceLog hkMonitoryLogDO=new InterfaceLog();
            hkMonitoryLogDO.setType(1);
            hkMonitoryLogDO.setCreateDate(new Date());
            hkMonitoryLogDO.setIsdeleted(0);
            if(param!=null){
                hkMonitoryLogDO.setRequest(JSONObject.toJSONString(param));
            }
            hkMonitoryLogDO.setRepose(result);
            hkMonitoryLogDO.setName(path);
            hkMonitoryLogDO.setUrl(path);
            interfaceLogMapper.insert(hkMonitoryLogDO);
        }catch (Exception e){
        }
    }