新增西游冲破难关渠道

master
DESKTOP-C3M45P4\dengdan 2025-12-25 18:02:41 +08:00
parent 180a9714ee
commit e65bed8fbe
2 changed files with 46 additions and 0 deletions

View File

@ -103,6 +103,8 @@ public class GetUserController extends HttpServlet {
serviceMap.put("XYTAP", new QuickXyTapVerifyService("XYTAP"));
//西游专服1
serviceMap.put("XY_ZF", new QuickXyZfVerifyService("XY_ZF"));
//西游冲破难关
serviceMap.put("XY_CHONGPO", new QuickXyChongPoVerifyService("XY_CHONGPO"));
}

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 QuickXyChongPoVerifyService extends QuickVerifyService{
private static final Logger LOGGER = LoggerFactory.getLogger(QuickXyChongPoVerifyService.class);
public final static String product_code = "33602346988280151246402575247720";
public QuickXyChongPoVerifyService(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;
}
}