自在修仙【0.1折】(小七专服)

master
grimm 2024-07-15 16:30:47 +08:00
parent f93d79afae
commit 8768305372
2 changed files with 44 additions and 0 deletions

View File

@ -51,6 +51,7 @@ public class GetUserController extends HttpServlet {
serviceMap.put("XQFP", new XqfpVerifyService("XQFP"));
serviceMap.put("ZZXX", new ZzxxVerifyService("ZZXX"));
serviceMap.put("ZZXXXQ", new ZzxxxqVerifyService("ZZXXXQ"));
serviceMap.put("ZXXQ01", new ZzxxxqVerifyService("ZXXQ01"));
serviceMap.put("AQLM", new AQLMVerifyService("AQLM"));
serviceMap.put("AQLMYJ", new YgAqlmYjVerifyService("AQLMYJ"));
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 Zzxxxq01VerifyService extends YouGuVerifyService {
private static final Logger LOGGER = LoggerFactory.getLogger(Zzxxxq01VerifyService.class);
public Zzxxxq01VerifyService(String sign) {
super(sign);
}
@Override
boolean doVerify(VerifyParams params) {
String loginUrl = "http://smi.648sy.com/zzxxldyzxqzf/auth";
LOGGER.info("自在修仙0.1折 小七渠道登录验证-->{}",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("自在修仙0.1折 小七渠道登录验证请求结果:{}",r);
if(errno == 0){
result = true;
}
}catch (IOException e){
LOGGER.info("自在修仙0.1折 小七渠道登录验证验证失败,{}",e.getMessage());
return false;
}
return result;
}
}