generated from root/miduo_server
爱趣联盟渠道
parent
0b01c34cca
commit
0f1d33aa9a
|
@ -50,7 +50,8 @@ public class GetUserController extends HttpServlet {
|
||||||
serviceMap.put("XQOT", new XqTenthVerifyService("XQOT"));
|
serviceMap.put("XQOT", new XqTenthVerifyService("XQOT"));
|
||||||
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 XqfpVerifyService("ZZXX"));
|
serviceMap.put("ZZXX", new ZzxxVerifyService("ZZXX"));
|
||||||
|
serviceMap.put("AQLM", new AQLMVerifyService("AQLM"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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 AQLMVerifyService extends YouGuVerifyService {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(AQLMVerifyService.class);
|
||||||
|
|
||||||
|
public AQLMVerifyService(String sign) {
|
||||||
|
super(sign);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
boolean doVerify(VerifyParams params) {
|
||||||
|
String loginUrl = "http://smi.648sy.com/tcxldlwzaqlmzf/auth";
|
||||||
|
LOGGER.info("爱趣联盟渠道登录验证-->{}",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("爱趣联盟渠道登录验证请求结果:{}",r);
|
||||||
|
if(errno == 0){
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}catch (IOException e){
|
||||||
|
LOGGER.info("爱趣联盟渠道登录验证验证失败,{}",e.getMessage());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,7 +42,7 @@ public class YouGuVerifyService extends AbstractVerifyService {
|
||||||
if (!"3".equals(platform) ) {//正式 切不是pc
|
if (!"3".equals(platform) ) {//正式 切不是pc
|
||||||
String sub_channel = request.getParameter("sub_channel");
|
String sub_channel = request.getParameter("sub_channel");
|
||||||
boolean result = false;
|
boolean result = false;
|
||||||
if (sub_channel != null && !sub_channel.equals("")) {
|
if (sub_channel != null && !sub_channel.isEmpty()) {
|
||||||
if (sub_channel.equals("1000")) {
|
if (sub_channel.equals("1000")) {
|
||||||
//测试服构建参数
|
//测试服构建参数
|
||||||
VerifyParams params = new VerifyParams();
|
VerifyParams params = new VerifyParams();
|
||||||
|
|
Loading…
Reference in New Issue