generated from root/miduo_server
海贼0.1折登陆
parent
1951c5bb3f
commit
e9346bf5d8
|
|
@ -43,6 +43,7 @@ public class GetUserController extends HttpServlet {
|
|||
// serviceMap.put("HF", new HFVerifyService("HF"));
|
||||
// serviceMap.put("QUICK3", new QuickVerifyService3("QUICK3"));
|
||||
serviceMap.put("QUICK", new QuickVerifyService("QUICK"));
|
||||
serviceMap.put("HAIZEI01", new QuickHaiZeiVerifyService("HAIZEI01"));
|
||||
serviceMap.put("XQDC", new XiaoqiDiscountVerifyService("XQDC"));
|
||||
serviceMap.put("YOUGU", new YouGuVerifyService("YG"));
|
||||
serviceMap.put("YGDC", new YouguDiscountVerifyService("YGDC"));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.ljsd.service;
|
||||
|
||||
import com.ljsd.pojo.VerifyParams;
|
||||
import com.ljsd.util.AppConstans;
|
||||
import com.ljsd.util.HttpUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class QuickHaiZeiVerifyService extends QuickVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickHaiZeiVerifyService.class);
|
||||
public final static String product_code = "83982581031944856480581367091990";
|
||||
|
||||
public QuickHaiZeiVerifyService(String sign) {
|
||||
super(sign);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean doVerify(VerifyParams params) {
|
||||
LOGGER.info("quick 海贼0.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 海贼0.1折 请求结果:{}",r);
|
||||
if (r != null && r.equals("1")) {
|
||||
result = true;
|
||||
}
|
||||
}catch (IOException e){
|
||||
LOGGER.info("quick 海贼0.1折 验证失败,IOException:{}",e.getMessage());
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue