增加新登录渠道

master
DESKTOP-C3M45P4\dengdan 2025-11-12 18:30:53 +08:00
parent 02dbf356c5
commit 763ade31c9
3 changed files with 47 additions and 1 deletions

View File

@ -100,6 +100,8 @@ public class GetUserController extends HttpServlet {
serviceMap.put("LZZB02", new QuickLzZb2VerifyService("LZZB02"));
//西游tap
serviceMap.put("XYTAP", new QuickXyTapVerifyService("XYTAP"));
//西游专服1
serviceMap.put("XY_ZF", new QuickXyZfVerifyService("XY_ZF"));
}

View File

@ -13,7 +13,7 @@ import java.util.Map;
* 西tap
*/
public class QuickXyTapVerifyService extends QuickVerifyService {
private static final Logger LOGGER = LoggerFactory.getLogger(QuickLzZb1VerifyService.class);
private static final Logger LOGGER = LoggerFactory.getLogger(QuickXyTapVerifyService.class);
public final static String product_code = "71802631450421385077360243608056";
public QuickXyTapVerifyService(String sign) {

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;
/**
* 西tap
*/
public class QuickXyZfVerifyService extends QuickVerifyService {
private static final Logger LOGGER = LoggerFactory.getLogger(QuickXyZfVerifyService.class);
public final static String product_code = "61698690117277703918386244037573";
public QuickXyZfVerifyService(String sign) {
super(sign);
}
@Override
boolean doVerify(VerifyParams params) {
LOGGER.info("quick 西游专服1 登录验证-->{}",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 西游专服1 请求结果:{}",r);
if (r != null && r.equals("1")) {
result = true;
}
}catch (IOException e){
LOGGER.info("quick 西游专服1 验证失败,IOException:{}",e.getMessage());
return false;
}
return result;
}
}