generated from root/miduo_server
44 lines
1.5 KiB
Java
44 lines
1.5 KiB
Java
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 ZzxxQd501VerifyService extends YouGuVerifyService {
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(ZzxxQd501VerifyService.class);
|
|
|
|
public ZzxxQd501VerifyService(String sign) {
|
|
super(sign);
|
|
}
|
|
|
|
@Override
|
|
boolean doVerify(VerifyParams params) {
|
|
String loginUrl = "http://smi.648sy.com/zzxxldyzqd1zf/auth";
|
|
LOGGER.info("自在修仙0.1折 渠道5专服登录验证-->{}",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折 渠道5专服登录验证请求结果:{}",r);
|
|
if(errno == 0){
|
|
result = true;
|
|
}
|
|
}catch (IOException e){
|
|
LOGGER.info("自在修仙0.1折 渠道5专服登录验证验证失败,{}",e.getMessage());
|
|
return false;
|
|
}
|
|
return result;
|
|
}
|
|
}
|