generated from root/miduo_server
增加新登录渠道
parent
02dbf356c5
commit
763ade31c9
|
|
@ -100,6 +100,8 @@ public class GetUserController extends HttpServlet {
|
||||||
serviceMap.put("LZZB02", new QuickLzZb2VerifyService("LZZB02"));
|
serviceMap.put("LZZB02", new QuickLzZb2VerifyService("LZZB02"));
|
||||||
//西游tap
|
//西游tap
|
||||||
serviceMap.put("XYTAP", new QuickXyTapVerifyService("XYTAP"));
|
serviceMap.put("XYTAP", new QuickXyTapVerifyService("XYTAP"));
|
||||||
|
//西游专服1
|
||||||
|
serviceMap.put("XY_ZF", new QuickXyZfVerifyService("XY_ZF"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import java.util.Map;
|
||||||
* 西游tap渠道
|
* 西游tap渠道
|
||||||
*/
|
*/
|
||||||
public class QuickXyTapVerifyService extends QuickVerifyService {
|
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 final static String product_code = "71802631450421385077360243608056";
|
||||||
|
|
||||||
public QuickXyTapVerifyService(String sign) {
|
public QuickXyTapVerifyService(String sign) {
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue