自在修仙 小七渠道

master
grimm 2024-06-24 10:51:59 +08:00
parent 57abd4c45d
commit f93d79afae
2 changed files with 44 additions and 0 deletions

View File

@ -50,6 +50,7 @@ public class GetUserController extends HttpServlet {
serviceMap.put("AIQU", new AiquVerifyService("AIQU")); serviceMap.put("AIQU", new AiquVerifyService("AIQU"));
serviceMap.put("XQFP", new XqfpVerifyService("XQFP")); serviceMap.put("XQFP", new XqfpVerifyService("XQFP"));
serviceMap.put("ZZXX", new ZzxxVerifyService("ZZXX")); serviceMap.put("ZZXX", new ZzxxVerifyService("ZZXX"));
serviceMap.put("ZZXXXQ", new ZzxxxqVerifyService("ZZXXXQ"));
serviceMap.put("AQLM", new AQLMVerifyService("AQLM")); serviceMap.put("AQLM", new AQLMVerifyService("AQLM"));
serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ")); serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ"));
serviceMap.put("GOHU", new GonghuiVerifyService("GOHU")); serviceMap.put("GOHU", new GonghuiVerifyService("GOHU"));

View File

@ -0,0 +1,43 @@
package com.ljsd.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
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 ZzxxxqVerifyService extends YouGuVerifyService {
private static final Logger LOGGER = LoggerFactory.getLogger(ZzxxxqVerifyService.class);
public ZzxxxqVerifyService(String sign) {
super(sign);
}
@Override
boolean doVerify(VerifyParams params) {
String loginUrl = "http://smi.648sy.com/zzxxbt1xqzf/auth";
LOGGER.info("自在修仙bt1 小七渠道登录验证-->{}",params.getOpenId());
Map<String,String> parms = new HashMap<>();
parms.put("token",params.getToken());
parms.put("uid",params.getOpenId());
boolean result = false;
try {
String r = HttpUtils.doPost(loginUrl, parms);
JSONObject jsonObject = JSON.parseObject(r);
int errno = jsonObject.getIntValue("errno");
LOGGER.info("自在修仙bt1 小七渠道登录验证请求结果:{}",r);
if(errno == 0){
result = true;
}
}catch (IOException e){
LOGGER.info("自在修仙bt1 小七渠道登录验证验证失败,{}",e.getMessage());
return false;
}
return result;
}
}