jiangping
2024-06-21 b0ea50dd24a7ed5ada38dc6c8209f78fc09f0441
server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
@@ -61,17 +61,20 @@
   }
   public static InterfaceLogService interfaceLogService = null;
   private static void saveInterfaceLog(String s, String result,Map<String, String> path) {
//      InterfaceLogService bean = SpringContextUtil.getBean(InterfaceLogService.class);
      if(interfaceLogService !=null){
         InterfaceLog hkMonitoryLogDO=new InterfaceLog();
         hkMonitoryLogDO.setType(0);
         hkMonitoryLogDO.setCreateDate(new Date());
         hkMonitoryLogDO.setIsdeleted(0);
         hkMonitoryLogDO.setRequest(s);
         hkMonitoryLogDO.setRepose(result);
         hkMonitoryLogDO.setName(path.get(HKConstants.https));
         hkMonitoryLogDO.setUrl(HKConstants.https + ArtemisConfig.host+path.get(HKConstants.https));
         interfaceLogService.create(hkMonitoryLogDO);
      try {
         if(interfaceLogService !=null){
            InterfaceLog hkMonitoryLogDO=new InterfaceLog();
            hkMonitoryLogDO.setType(0);
            hkMonitoryLogDO.setCreateDate(new Date());
            hkMonitoryLogDO.setIsdeleted(0);
            hkMonitoryLogDO.setRequest(s);
            hkMonitoryLogDO.setRepose(result);
            hkMonitoryLogDO.setName(path.get(HKConstants.https));
            hkMonitoryLogDO.setUrl(HKConstants.https + ArtemisConfig.host+path.get(HKConstants.https));
            interfaceLogService.create(hkMonitoryLogDO);
         }
      }catch (Exception e){
         e.printStackTrace();
      }
   }
@@ -188,7 +191,7 @@
   public static String addFace(String body) {
      Map<String, String> path = getPath(HKConstants.InterfacePath.addFace);
      String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请求application/json类型参数
      saveInterfaceLog(body,result,path);
      saveInterfaceLog(null,result,path);
      return  result;
   }
   /**
@@ -199,7 +202,7 @@
   public static String editFace(String body) {
      Map<String, String> path = getPath(HKConstants.InterfacePath.editFace);
      String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请求application/json类型参数
      saveInterfaceLog(body,result,path);
      saveInterfaceLog(null,result,path);
      return  result;
   }
   /**