From 349d4f392918501b4dd7a220f1e31d1836d583ce Mon Sep 17 00:00:00 2001 From: "DESKTOP-C3M45P4\\dengdan" Date: Thu, 5 Mar 2026 17:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A5=BF=E6=B8=B8=E9=95=BF?= =?UTF-8?q?=E5=B0=BE=E6=B8=A0=E9=81=93quick=E7=9A=84channel=5Fcode?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GetServerListController.java | 4 ++ .../ljsd/controller/GetUserController.java | 2 + .../com/ljsd/service/QuickVerifyService.java | 10 +++- .../QuickXyChongPoCwVerifyService.java | 49 +++++++++++++++++++ 4 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/ljsd/service/QuickXyChongPoCwVerifyService.java diff --git a/src/main/java/com/ljsd/controller/GetServerListController.java b/src/main/java/com/ljsd/controller/GetServerListController.java index e40d0ad..0796e4b 100644 --- a/src/main/java/com/ljsd/controller/GetServerListController.java +++ b/src/main/java/com/ljsd/controller/GetServerListController.java @@ -65,6 +65,10 @@ public class GetServerListController extends HttpServlet { if("QKDNA01".equals(channel)){ channel = "DNA01"; } + //冲破难关长尾和官服混服 + if("XY_CHONGPO_CW".equals(channel)){ + channel = "XY_CHONGPO"; + } DBObject req = new BasicDBObject(); req.put("channel", channel); req.put("sub_channel", sub_channel); diff --git a/src/main/java/com/ljsd/controller/GetUserController.java b/src/main/java/com/ljsd/controller/GetUserController.java index 864055a..eb08868 100644 --- a/src/main/java/com/ljsd/controller/GetUserController.java +++ b/src/main/java/com/ljsd/controller/GetUserController.java @@ -105,6 +105,8 @@ public class GetUserController extends HttpServlet { serviceMap.put("XY_ZF", new QuickXyZfVerifyService("XY_ZF")); //西游冲破难关 serviceMap.put("XY_CHONGPO", new QuickXyChongPoVerifyService("XY_CHONGPO")); + //西游冲破难关长尾 + serviceMap.put("XY_CHONGPO_CW", new QuickXyChongPoCwVerifyService("XY_CHONGPO_CW")); } diff --git a/src/main/java/com/ljsd/service/QuickVerifyService.java b/src/main/java/com/ljsd/service/QuickVerifyService.java index 3a37a40..24d35eb 100644 --- a/src/main/java/com/ljsd/service/QuickVerifyService.java +++ b/src/main/java/com/ljsd/service/QuickVerifyService.java @@ -49,7 +49,7 @@ public class QuickVerifyService extends AbstractVerifyService { //正式服appId VerifyParams params = new VerifyParams(); params.setProductCode(product_code); - VerifyParams formatParam = getFormatParam(params,request, openId, token); + VerifyParams formatParam = getQuickFormatParam(params,request, openId, token,platform); result = verifyFormat(formatParam); } } @@ -113,4 +113,12 @@ public class QuickVerifyService extends AbstractVerifyService { params.setOpenId(openId); return params; } + + protected VerifyParams getQuickFormatParam(VerifyParams params, HttpServletRequest request, String openId, String token,String platform) { + params.setChannel("QUICK"); + params.setToken(token); + params.setOpenId(openId); + params.setPlatformId(platform); + return params; + } } diff --git a/src/main/java/com/ljsd/service/QuickXyChongPoCwVerifyService.java b/src/main/java/com/ljsd/service/QuickXyChongPoCwVerifyService.java new file mode 100644 index 0000000..bbf632c --- /dev/null +++ b/src/main/java/com/ljsd/service/QuickXyChongPoCwVerifyService.java @@ -0,0 +1,49 @@ +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 QuickXyChongPoCwVerifyService extends QuickVerifyService{ + private static final Logger LOGGER = LoggerFactory.getLogger(QuickXyChongPoCwVerifyService.class); + public final static String product_code = "60622923697840927348536316650486"; + + public QuickXyChongPoCwVerifyService(String sign) { + super(sign); + } + + @Override + boolean doVerify(VerifyParams params) { + LOGGER.info("quick 西游冲破难关长尾 登录验证-->{}",params.getOpenId()); + String url = "https://checkuser.gamedachen.com/v2/checkUserInfo"; + Map parms = new HashMap<>(); + parms.put("token",params.getToken()); + parms.put("product_code", product_code); + parms.put("uid",params.getOpenId()); + String channel_code = params.getPlatformId(); + if(channel_code == null){ + channel_code = ""; + } + parms.put("channel_code",channel_code); + 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; + } +}