西游直播

master
grimm 2024-07-25 18:01:24 +08:00
parent fd329f565a
commit 3bb33d3ea0
2 changed files with 45 additions and 0 deletions

View File

@ -61,6 +61,7 @@ public class GetUserController extends HttpServlet {
serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ")); serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ"));
serviceMap.put("GOHU", new GonghuiVerifyService("GOHU")); serviceMap.put("GOHU", new GonghuiVerifyService("GOHU"));
serviceMap.put("XYZB", new QuickxyzbVerifyService("XYZB"));
serviceMap.put("WYDDS", new EightUVerifyService("WYDDS")); serviceMap.put("WYDDS", new EightUVerifyService("WYDDS"));
serviceMap.put("U1GAME", new U1GameVerifyService("U1GAME")); serviceMap.put("U1GAME", new U1GameVerifyService("U1GAME"));
serviceMap.put("FENGTI", new FengTiVerifyService("FENGTI")); serviceMap.put("FENGTI", new FengTiVerifyService("FENGTI"));

View File

@ -0,0 +1,44 @@
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 QuickxyzbVerifyService extends QuickVerifyService {
private static final Logger LOGGER = LoggerFactory.getLogger(QuickxyzbVerifyService.class);
public final static String product_code = "00833088207297065014897963119679";
public QuickxyzbVerifyService(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;
}
}