代码优化

This commit is contained in:
egzosn
2018-11-21 14:32:30 +08:00
parent 5760fbd334
commit 0b68cc5cca
4 changed files with 6 additions and 9 deletions

View File

@@ -433,12 +433,9 @@ public class UnionPayService extends BasePayService<UnionPayConfigStorage> {
sf.append("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=" + payConfigStorage.getInputCharset() + "\"/></head><body>");
sf.append("<form id = \"pay_form\" action=\"" + getFrontTransUrl() + "\" method=\"post\">");
if (null != orderInfo && 0 != orderInfo.size()) {
Set<Map.Entry<String, Object>> set = orderInfo.entrySet();
Iterator<Map.Entry<String, Object>> it = set.iterator();
while (it.hasNext()) {
Map.Entry<String, Object> ey = it.next();
String key = ey.getKey();
Object value = ey.getValue();
for ( Map.Entry<String, Object> entry: orderInfo.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
sf.append("<input type=\"hidden\" name=\"" + key + "\" id=\"" + key + "\" value=\"" + value + "\"/>");
}
}