海贼,四个新渠道登陆sdk

master
grimm 2024-07-17 10:49:55 +08:00
parent ee786b61e9
commit fd329f565a
5 changed files with 175 additions and 3 deletions

View File

@ -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"));
}

View File

@ -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<String,String> 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;
}
}

View File

@ -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<String,String> 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;
}
}

View File

@ -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<String,String> 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;
}
}

View File

@ -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<String,String> 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;
}
}