From 17efddc6a667670dca682bf36b51a43e99615e6d Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期三, 16 十月 2024 15:59:38 +0800 Subject: [PATCH] 代码初始化 --- server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java | 52 ++++++++++++++++++++++++---------------------------- 1 files changed, 24 insertions(+), 28 deletions(-) diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java index 0d7e426..6a26848 100644 --- a/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java +++ b/server/visits/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKTools.java @@ -234,26 +234,15 @@ Map<String, String> path = getPath(HKConstants.InterfacePath.facePicture[0]); //鍙傛暟鏍规嵁鎺ュ彛瀹為檯鎯呭喌璁剧疆 - log.error("=========================ArtemisConfig.host***********************************"+ ArtemisConfig.host); - log.error("=========================ArtemisConfig.key********************************"+ArtemisConfig.appKey); - try { - log.error("-------------------------ArtemisConfig.host***********************************"+ ArtemisConfig.host); - log.error("-------------------------ArtemisConfig.key********************************"+ArtemisConfig.appKey); - HttpResponse resp = ArtemisHttpUtil.doPostStringImgArtemis( path, body, null, null,"application/json",null); - if (200==resp.getStatusLine().getStatusCode()) { - HttpEntity entity = resp.getEntity(); - InputStream in = entity.getContent(); - return in; - }else{ - log.error("浜鸿劯涓嬭浇鍑洪敊"); - throw new Exception("浜鸿劯涓嬭浇鍑洪敊"); - } - }catch (Exception e){ - e.printStackTrace(); + HttpResponse resp = ArtemisHttpUtil.doPostStringImgArtemis( path, body, null, null,"application/json",null); + if (200==resp.getStatusLine().getStatusCode()) { + HttpEntity entity = resp.getEntity(); + InputStream in = entity.getContent(); + return in; + }else{ + log.error("浜鸿劯涓嬭浇鍑洪敊"); + throw new Exception("浜鸿劯涓嬭浇鍑洪敊"); } - log.error("+++++++++++++++++++++++++ArtemisConfig.host***********************************"+ ArtemisConfig.host); - log.error("+++++++++++++++++++++++++ArtemisConfig.key********************************"+ArtemisConfig.appKey); - return null; } /** * 鑾峰彇璁垮璁板綍涓殑鍥剧墖 @@ -308,6 +297,14 @@ }else{ throw new Exception("鏌ヨ杞﹁締鎶撴媿鍥剧墖涓嬭浇鍑洪敊"); } + } + /** + * 鍒嗛〉鑾峰彇寰呭姙鍒楄〃 + * @param body + * @return + */ + public static String getTodoListPage(Map<String, String> body) throws Exception{ + return startDoGetStringArtemis(HKConstants.InterfacePath.getTodoListPage,body); } /** * 鑾峰彇闂ㄧ鐐瑰垪琛� @@ -375,15 +372,7 @@ return startDoPostStringArtemis(HKConstants.InterfacePath.visitCancel,body); } - public static String startDoGetStringArtemis(String[] pathStr,Map<String,String> body ){ - Map<String, String> path = getPath(pathStr[0]); - Map<String, String> header = new HashMap<>(); - header.put("tagId", UUID.randomUUID().toString().replace("-", "")); - String result = ArtemisHttpUtil.doGetArtemis(path, body, null, "application/json", header);// post璇锋眰application/json绫诲瀷鍙傛暟 - saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]); - return result; - } public static String startDoPostStringArtemis(String[] pathStr,String body ){ Map<String, String> path = getPath(pathStr[0]); Map<String, String> header = new HashMap<>(); @@ -391,7 +380,14 @@ String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post璇锋眰application/json绫诲瀷鍙傛暟 saveInterfaceLog(body,result,path,pathStr[1]); return result; - + } + public static String startDoGetStringArtemis(String[] pathStr,Map<String,String> body ){ + Map<String, String> path = getPath(pathStr[0]); + Map<String, String> header = new HashMap<>(); + header.put("tagId", UUID.randomUUID().toString().replace("-", "")); + String result = ArtemisHttpUtil.doGetArtemis(path, body, null, null, header); + saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]); + return result; } public static String startDoPostStringArtemis(String[] pathStr,String param,String body ){ Map<String, String> path = getPath(pathStr[0]+StringUtils.defaultString(param,"")); -- Gitblit v1.9.3