公用回调接口

master
erzhongxmu 2023-02-24 16:44:48 +08:00
parent 4a7a83fda7
commit 2902b235f6
1 changed files with 24 additions and 2 deletions

View File

@ -457,8 +457,30 @@ public class ApiController {
public AjaxJson callback( HttpServletRequest request, HttpServletResponse response) { public AjaxJson callback( HttpServletRequest request, HttpServletResponse response) {
AjaxJson j = new AjaxJson(); AjaxJson j = new AjaxJson();
String code=request.getParameter("code"); try{
System.out.println(code+"************"); String code=request.getParameter("code");
System.out.println(code+"************");
}catch (Exception e){
e.printStackTrace();
}
Map map = new HashMap();
Enumeration paramNames = request.getParameterNames();
while (paramNames.hasMoreElements()) {
String paramName = (String) paramNames.nextElement();
String[] paramValues = request.getParameterValues(paramName);
if (paramValues.length == 1) {
String paramValue = paramValues[0];
if (paramValue.length() != 0) {
System.out.println("参数:" + paramName + "=" + paramValue);
map.put(paramName, paramValue);
}
}
}
return j; return j;
} }
} }