generated from root/miduo_server
测试log
parent
e6ea389c7b
commit
69701121ab
|
@ -36,7 +36,7 @@ public class HaoGameRechargeController {
|
||||||
|
|
||||||
@RequestMapping(value = "/haoGameCallback")
|
@RequestMapping(value = "/haoGameCallback")
|
||||||
public String haoGameCallback(HttpServletRequest request) throws Exception {
|
public String haoGameCallback(HttpServletRequest request) throws Exception {
|
||||||
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMapOld(request);
|
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMapYX(request);
|
||||||
if (parameterMap.isEmpty()) {
|
if (parameterMap.isEmpty()) {
|
||||||
LOGGER.info("data is null");
|
LOGGER.info("data is null");
|
||||||
return "data is null";
|
return "data is null";
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.jmfy.util;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.jmfy.controller.RechargeController;
|
import com.jmfy.controller.RechargeController;
|
||||||
import com.jmfy.redisProperties.RedisUserKey;
|
import com.jmfy.redisProperties.RedisUserKey;
|
||||||
|
import org.json.JSONObject;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -13,10 +14,7 @@ import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Enumeration;
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
public class JsonUtil {
|
public class JsonUtil {
|
||||||
|
|
||||||
|
@ -70,11 +68,22 @@ public class JsonUtil {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap<String, String> getParameterMapOld(HttpServletRequest request) {
|
public HashMap<String, String> getParameterMapYX(HttpServletRequest request) {
|
||||||
HashMap<String, String> map = new HashMap();
|
HashMap<String, String> map = new HashMap();
|
||||||
Enumeration paramNames = request.getParameterNames();
|
Enumeration paramNames = request.getParameterNames();
|
||||||
while (paramNames.hasMoreElements()) {
|
while (paramNames.hasMoreElements()) {
|
||||||
String paramName = (String) paramNames.nextElement();
|
String paramName = (String) paramNames.nextElement();
|
||||||
|
JSONObject data = new JSONObject(paramName);
|
||||||
|
Set<String> strings = data.keySet();
|
||||||
|
for (String string : strings) {
|
||||||
|
LOGGER.info("getParameterMapYX =================> {} ", string);
|
||||||
|
}
|
||||||
|
|
||||||
|
// String serverID = data.getString("districtid");// 区服id
|
||||||
|
// String productID = data.getString("productId");
|
||||||
|
// String ccId = data.getString("ccId");
|
||||||
|
// String platform = data.getString("platform");
|
||||||
|
|
||||||
String[] paramValues = request.getParameterValues(paramName);
|
String[] paramValues = request.getParameterValues(paramName);
|
||||||
String paramValue = paramValues[0];
|
String paramValue = paramValues[0];
|
||||||
map.put(paramName, paramValue);
|
map.put(paramName, paramValue);
|
||||||
|
|
Loading…
Reference in New Issue