From b0ea50dd24a7ed5ada38dc6c8209f78fc09f0441 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 21 六月 2024 17:45:33 +0800
Subject: [PATCH] 修复bug

---
 server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java |   29 ++++++++++++++++-------------
 1 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
index 383da4e..f6b12c8 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java
+++ b/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;
 	}
 	/**

--
Gitblit v1.9.3