Ver Fonte

调整回调

yumeng há 4 anos atrás
pai
commit
568f44a4ce

+ 13 - 3
src/main/java/cn/com/ctop/callback/controller/CallbackController.java

@@ -5,7 +5,10 @@ import com.alibaba.fastjson.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.*;
+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 javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -35,14 +38,21 @@ public class CallbackController {
             map.put("auth_code", authCode);
             map.put("state", state);
             String channelType = json.getString("channelType");
-            if (channelType.equals("jiaoyang")) {
+            if(channelType == null ||  channelType == ""){
+                result = HttpUtils.httpGet("http://139.186.27.96:8804/jeecg-boot/kuaishou", map, null);
+            } else if(channelType.equals("jiaoyang")){
+                logger.info("骄阳回调开始");
+                result = HttpUtils.httpGet("http://118.24.244.213:8805/jeecg-boot/kuaishou", map, null);
+            }
+
+          /*  if (channelType.equals("jiaoyang")) {
                 logger.info("骄阳回调开始");
                 result = HttpUtils.httpGet("http://118.24.244.213:8805/jeecg-boot/kuaishou", map, null);
 
             } else {
                 logger.info("有腾回调开始");
                 result = HttpUtils.httpGet("http://129.28.197.250:8804/jeecg-boot/kuaishou", map, null);
-            }
+            }*/
         } catch (Exception e) {
             e.printStackTrace();
             result = e.getMessage();