|
|
|
@@ -241,7 +241,7 @@ public class HaiKangWeiShiUtil { |
|
|
|
throw new MallinkException(errStatus,"haikang useCoupon error.["+result.getString("error")+"]"+result.getString("message")); |
|
|
|
} |
|
|
|
|
|
|
|
if (!result.getString("code").equals("200") ) { |
|
|
|
if (!result.getString("code").equals("0") ) { |
|
|
|
String message = result.getString("msg"); |
|
|
|
throw new MallinkException(result.getInteger("code"), "haikang useCoupon error."+message); |
|
|
|
} |
|
|
|
@@ -327,10 +327,14 @@ public class HaiKangWeiShiUtil { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
long currentTime = System.currentTimeMillis(); |
|
|
|
StringBuffer requestlog = new StringBuffer(); |
|
|
|
if (null != pairs) { |
|
|
|
log.info("haikangweishi httpRequest:[url]"+url+"[params]"+JSON.toJSONString(pairs)); |
|
|
|
requestlog.append("haikangweishi httpRequest:[url]").append(url).append("[params]").append(JSON.toJSONString(pairs)); |
|
|
|
}else { |
|
|
|
log.info("haikangweishi httpRequest:[url]"+url); |
|
|
|
requestlog.append("haikangweishi httpRequest:[url]").append(url); |
|
|
|
} |
|
|
|
HttpResponse response = null; |
|
|
|
try { |
|
|
|
@@ -338,7 +342,7 @@ public class HaiKangWeiShiUtil { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(e.getLocalizedMessage(),e); |
|
|
|
} |
|
|
|
|
|
|
|
long responseCostTime = (System.currentTimeMillis()-currentTime)/1000; |
|
|
|
String result = null; |
|
|
|
|
|
|
|
//打印StatusLine |
|
|
|
@@ -347,7 +351,8 @@ public class HaiKangWeiShiUtil { |
|
|
|
//获取实体 |
|
|
|
HttpEntity httpEntity= response.getEntity(); |
|
|
|
result = EntityUtils.toString(httpEntity, "UTF-8"); |
|
|
|
log.debug(result); |
|
|
|
requestlog.append("[response]").append(result).append("[costTime(seconds)]").append(responseCostTime); |
|
|
|
log.debug(requestlog.toString()); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(e.getLocalizedMessage(),e); |
|
|
|
} |
|
|
|
|