|
@@ -5,10 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
-import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
@@ -25,7 +22,7 @@ public class CallbackController {
|
|
return e.getMessage();
|
|
return e.getMessage();
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/kuaishou")
|
|
|
|
|
|
+ @RequestMapping(value = "/kuaishou", method = RequestMethod.GET)
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String kuaishou(HttpServletRequest request, HttpServletResponse response, @RequestParam("auth_code") String authCode, @RequestParam("state") String state) {
|
|
public String kuaishou(HttpServletRequest request, HttpServletResponse response, @RequestParam("auth_code") String authCode, @RequestParam("state") String state) {
|
|
String result = null;
|
|
String result = null;
|
|
@@ -38,9 +35,9 @@ public class CallbackController {
|
|
map.put("auth_code", authCode);
|
|
map.put("auth_code", authCode);
|
|
map.put("state", state);
|
|
map.put("state", state);
|
|
String channelType = json.getString("channelType");
|
|
String channelType = json.getString("channelType");
|
|
- if(channelType == null || channelType == ""){
|
|
|
|
|
|
+ if (channelType == null || channelType == "") {
|
|
result = HttpUtils.httpGet("http://139.186.27.96:8804/jeecg-boot/kuaishou", map, null);
|
|
result = HttpUtils.httpGet("http://139.186.27.96:8804/jeecg-boot/kuaishou", map, null);
|
|
- } else if(channelType.equals("jiaoyang")){
|
|
|
|
|
|
+ } else if (channelType.equals("jiaoyang")) {
|
|
logger.info("骄阳回调开始");
|
|
logger.info("骄阳回调开始");
|
|
result = HttpUtils.httpGet("http://118.24.244.213:8805/jeecg-boot/kuaishou", map, null);
|
|
result = HttpUtils.httpGet("http://118.24.244.213:8805/jeecg-boot/kuaishou", map, null);
|
|
}
|
|
}
|