generated from root/miduo_server
增加西游长尾渠道quick的channel_code验证
parent
e65bed8fbe
commit
349d4f3929
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<String,String> 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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue