From 0ad53b755fb839f3275940530229d4705824e7e0 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 10 七月 2024 14:16:35 +0800
Subject: [PATCH] 修复bug
---
server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java | 52 +++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 39 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 e1227e3..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;
}
/**
@@ -641,6 +644,17 @@
return result;
}
/**
+ * 鑾峰彇鍏ㄩ噺鐢ㄦ埛鍒楄〃2(鏍规嵁鏉′欢鍒嗛〉鏌ヨ锛�
+ * @param body
+ * @return
+ */
+ public static String personList(String body) {
+ Map<String, String> path = getPath(HKConstants.InterfacePath.personList);
+ String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post璇锋眰application/json绫诲瀷鍙傛暟
+ saveInterfaceLog(body,result,path);
+ return result;
+ }
+ /**
* 澧為噺鑾峰彇缁勭粐鍒楄〃
* @param body
* @return
@@ -719,4 +733,16 @@
return result;
}
+ /**
+ * 鏌ヨ鍦哄唴杞﹀仠杞︿俊鎭�
+ * @param body
+ * @return
+ */
+ public static String tempCarInRecords(String body) {
+ Map<String, String> path = getPath(HKConstants.InterfacePath.tempCarInRecords);
+ String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post璇锋眰application/json绫诲瀷鍙傛暟
+ saveInterfaceLog(body,result,path);
+ return result;
+ }
+
}
--
Gitblit v1.9.3