generated from root/miduo_server
西游直播
parent
fd329f565a
commit
3bb33d3ea0
|
@ -61,6 +61,7 @@ public class GetUserController extends HttpServlet {
|
|||
serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ"));
|
||||
serviceMap.put("GOHU", new GonghuiVerifyService("GOHU"));
|
||||
|
||||
serviceMap.put("XYZB", new QuickxyzbVerifyService("XYZB"));
|
||||
serviceMap.put("WYDDS", new EightUVerifyService("WYDDS"));
|
||||
serviceMap.put("U1GAME", new U1GameVerifyService("U1GAME"));
|
||||
serviceMap.put("FENGTI", new FengTiVerifyService("FENGTI"));
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue