| | |
| | | } |
| | | public static InterfaceLogService interfaceLogService = null; |
| | | private static void saveInterfaceLog(String s, String result,Map<String, String> path) { |
| | | // InterfaceLogService bean = SpringContextUtil.getBean(InterfaceLogService.class); |
| | | try { |
| | | if(interfaceLogService !=null){ |
| | | InterfaceLog hkMonitoryLogDO=new InterfaceLog(); |
| | | hkMonitoryLogDO.setType(0); |
| | |
| | | hkMonitoryLogDO.setName(path.get(HKConstants.https)); |
| | | hkMonitoryLogDO.setUrl(HKConstants.https + ArtemisConfig.host+path.get(HKConstants.https)); |
| | | interfaceLogService.create(hkMonitoryLogDO); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | /** |
| | |
| | | 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; |
| | | } |
| | | /** |