public String strBuffParams(Map<String, String> params){
// 构建请求参数
String strSub=null;
StringBuffer sb = new StringBuffer();
if (params != null) {
for (Entry<String, String> e : params.entrySet()) {
if(StringUtils.isNotEmpty(e.getValue())){
sb.append(e.getKey());
sb.append("=");
sb.append(e.getValue());
sb.append("&"); }
}
strSub= sb.substring(0, sb.length() - 1);
}
return strSub;
}
时间: 2024-10-24 02:45:16