diff --git a/src/main/java/com/ljsd/controller/GetUserController.java b/src/main/java/com/ljsd/controller/GetUserController.java index 9df4bca..102f4ef 100644 --- a/src/main/java/com/ljsd/controller/GetUserController.java +++ b/src/main/java/com/ljsd/controller/GetUserController.java @@ -39,13 +39,18 @@ public class GetUserController extends HttpServlet { // serviceMap.put("AIWAN", new AiWanVerifyService("AIWAN")); // serviceMap.put("HF", new HFVerifyService("HF")); // serviceMap.put("QUICK3", new QuickVerifyService3("QUICK3")); + // QUICK渠道 serviceMap.put("QUICK", new QuickVerifyService("QUICK")); + // 海贼 serviceMap.put("ONEPIECE01", new QuickOnePiece01VerifyService("ONEPIECE01")); - serviceMap.put("XQDC", new XiaoqiDiscountVerifyService("XQDC")); + serviceMap.put("OPXQ", new QuickopxqVerifyService("OPXQ")); + serviceMap.put("OPAZ", new QuickopazVerifyService("OPAZ")); + serviceMap.put("OPAQ", new QuickopaqVerifyService("OPAQ")); + serviceMap.put("OPYY", new QuickopyyVerifyService("OPYY")); + // 悠谷 serviceMap.put("YOUGU", new YouGuVerifyService("YG")); + serviceMap.put("XQDC", new XiaoqiDiscountVerifyService("XQDC")); serviceMap.put("YGDC", new YouguDiscountVerifyService("YGDC")); - serviceMap.put("FENGTI", new FengTiVerifyService("FENGTI")); - serviceMap.put("U1GAME", new U1GameVerifyService("U1GAME")); serviceMap.put("XQOT", new XqTenthVerifyService("XQOT")); serviceMap.put("AIQU", new AiquVerifyService("AIQU")); serviceMap.put("XQFP", new XqfpVerifyService("XQFP")); @@ -55,7 +60,10 @@ public class GetUserController extends HttpServlet { serviceMap.put("AQLM", new AQLMVerifyService("AQLM")); serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ")); serviceMap.put("GOHU", new GonghuiVerifyService("GOHU")); + serviceMap.put("WYDDS", new EightUVerifyService("WYDDS")); + serviceMap.put("U1GAME", new U1GameVerifyService("U1GAME")); + serviceMap.put("FENGTI", new FengTiVerifyService("FENGTI")); } diff --git a/src/main/java/com/ljsd/service/QuickopaqVerifyService.java b/src/main/java/com/ljsd/service/QuickopaqVerifyService.java new file mode 100644 index 0000000..df2beb4 --- /dev/null +++ b/src/main/java/com/ljsd/service/QuickopaqVerifyService.java @@ -0,0 +1,41 @@ +package com.ljsd.service; + +import com.ljsd.pojo.VerifyParams; +import com.ljsd.util.HttpUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class QuickopaqVerifyService extends QuickVerifyService { + private static final Logger LOGGER = LoggerFactory.getLogger(QuickopaqVerifyService.class); + public final static String product_code = "60888309115597980240283037382218"; + + public QuickopaqVerifyService(String sign) { + super(sign); + } + + @Override + boolean doVerify(VerifyParams params) { + LOGGER.info("quick 海贼 爱趣 登录验证-->{}",params.getOpenId()); + String url = "http://checkuser.quickapi.net/v2/checkUserInfo"; + Map parms = new HashMap<>(); + parms.put("token",params.getToken()); + parms.put("product_code", product_code); + parms.put("uid",params.getOpenId()); + boolean result = false; + try { + String r = HttpUtils.doPost(url, parms); + LOGGER.info("quick 海贼 爱趣 请求结果:{}",r); + if (r != null && r.equals("1")) { + result = true; + } + }catch (IOException e){ + LOGGER.info("quick 海贼 爱趣 验证失败,IOException:{}",e.getMessage()); + return false; + } + return result; + } +} diff --git a/src/main/java/com/ljsd/service/QuickopazVerifyService.java b/src/main/java/com/ljsd/service/QuickopazVerifyService.java new file mode 100644 index 0000000..e7a1ed3 --- /dev/null +++ b/src/main/java/com/ljsd/service/QuickopazVerifyService.java @@ -0,0 +1,41 @@ +package com.ljsd.service; + +import com.ljsd.pojo.VerifyParams; +import com.ljsd.util.HttpUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class QuickopazVerifyService extends QuickVerifyService { + private static final Logger LOGGER = LoggerFactory.getLogger(QuickopazVerifyService.class); + public final static String product_code = "83982581031944856480581367091990"; + + public QuickopazVerifyService(String sign) { + super(sign); + } + + @Override + boolean doVerify(VerifyParams params) { + LOGGER.info("quick 海贼 A组 登录验证-->{}",params.getOpenId()); + String url = "http://checkuser.quickapi.net/v2/checkUserInfo"; + Map parms = new HashMap<>(); + parms.put("token",params.getToken()); + parms.put("product_code", product_code); + parms.put("uid",params.getOpenId()); + boolean result = false; + try { + String r = HttpUtils.doPost(url, parms); + LOGGER.info("quick 海贼 A组 请求结果:{}",r); + if (r != null && r.equals("1")) { + result = true; + } + }catch (IOException e){ + LOGGER.info("quick 海贼 A组 验证失败,IOException:{}",e.getMessage()); + return false; + } + return result; + } +} diff --git a/src/main/java/com/ljsd/service/QuickopxqVerifyService.java b/src/main/java/com/ljsd/service/QuickopxqVerifyService.java new file mode 100644 index 0000000..aef4d5d --- /dev/null +++ b/src/main/java/com/ljsd/service/QuickopxqVerifyService.java @@ -0,0 +1,41 @@ +package com.ljsd.service; + +import com.ljsd.pojo.VerifyParams; +import com.ljsd.util.HttpUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class QuickopxqVerifyService extends QuickVerifyService { + private static final Logger LOGGER = LoggerFactory.getLogger(QuickopxqVerifyService.class); + public final static String product_code = "71167839002524314386235124470158"; + + public QuickopxqVerifyService(String sign) { + super(sign); + } + + @Override + boolean doVerify(VerifyParams params) { + LOGGER.info("quick 海贼 小七 登录验证-->{}",params.getOpenId()); + String url = "http://checkuser.quickapi.net/v2/checkUserInfo"; + Map parms = new HashMap<>(); + parms.put("token",params.getToken()); + parms.put("product_code", product_code); + parms.put("uid",params.getOpenId()); + boolean result = false; + try { + String r = HttpUtils.doPost(url, parms); + LOGGER.info("quick 海贼 小七 请求结果:{}",r); + if (r != null && r.equals("1")) { + result = true; + } + }catch (IOException e){ + LOGGER.info("quick 海贼 小七 验证失败,IOException:{}",e.getMessage()); + return false; + } + return result; + } +} diff --git a/src/main/java/com/ljsd/service/QuickopyyVerifyService.java b/src/main/java/com/ljsd/service/QuickopyyVerifyService.java new file mode 100644 index 0000000..f459824 --- /dev/null +++ b/src/main/java/com/ljsd/service/QuickopyyVerifyService.java @@ -0,0 +1,41 @@ +package com.ljsd.service; + +import com.ljsd.pojo.VerifyParams; +import com.ljsd.util.HttpUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +public class QuickopyyVerifyService extends QuickVerifyService { + private static final Logger LOGGER = LoggerFactory.getLogger(QuickopyyVerifyService.class); + public final static String product_code = "75440088323809460365033239701829"; + + public QuickopyyVerifyService(String sign) { + super(sign); + } + + @Override + boolean doVerify(VerifyParams params) { + LOGGER.info("quick 海贼 一元 登录验证-->{}",params.getOpenId()); + String url = "http://checkuser.quickapi.net/v2/checkUserInfo"; + Map parms = new HashMap<>(); + parms.put("token",params.getToken()); + parms.put("product_code", product_code); + parms.put("uid",params.getOpenId()); + boolean result = false; + try { + String r = HttpUtils.doPost(url, parms); + LOGGER.info("quick 海贼 一元 请求结果:{}",r); + if (r != null && r.equals("1")) { + result = true; + } + }catch (IOException e){ + LOGGER.info("quick 海贼 一元 验证失败,IOException:{}",e.getMessage()); + return false; + } + return result; + } +}