generated from root/miduo_server
日志修改
parent
e77d1240e9
commit
57ed34a385
|
@ -35,6 +35,7 @@ public class GetUserController extends HttpServlet {
|
|||
//草花
|
||||
serviceMap.put("CH",new CaohuaVerifyService("CH"));
|
||||
serviceMap.put("QUICK", new QuickVerifyService("QUICK"));
|
||||
serviceMap.put("QIANYOU", new QiYouVerifyService("huangjiayl&qypay"));
|
||||
serviceMap.put("YX", new YxylVerifyService("YX"));
|
||||
serviceMap.put("DY", new V3367VerifyService("DY"));
|
||||
serviceMap.put("QUICK2", new QuickVerifyService2("QUICK2"));
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
public class DuoYouVerifyService extends AbstractVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractVerifyService.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DuoYouVerifyService.class);
|
||||
public static int isTestLan=0;
|
||||
|
||||
public DuoYouVerifyService(String sign) {
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
package com.ljsd.service;
|
||||
|
||||
import com.ljsd.pojo.VerifyParams;
|
||||
import com.ljsd.util.AppConstans;
|
||||
import com.ljsd.util.MD5Util;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 乾游登录验证
|
||||
*/
|
||||
public class QiYouVerifyService extends AbstractVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QiYouVerifyService.class);
|
||||
public static int isTestLan=0;
|
||||
|
||||
public QiYouVerifyService(String sign) {
|
||||
super(sign);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean verify(HttpServletResponse response, HttpServletRequest request, String admin, String platform, String pid, String openId, String token){
|
||||
//如果是自己人不需要验证了
|
||||
if(AppConstans.appsecret.equals(admin)) {
|
||||
return true;
|
||||
}
|
||||
String userId = request.getParameter("userId");
|
||||
String platformId = request.getParameter("platformId");
|
||||
String timestamp = request.getParameter("timestamp");
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append(userId).append(platformId).append(timestamp);
|
||||
String sign = request.getParameter("sign");
|
||||
String mySign = MD5Util.encrypByMd5(stringBuilder.toString());
|
||||
if (mySign.equals(sign)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyTest(VerifyParams params) {
|
||||
return doVerify(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean verifyFormat(VerifyParams params) {
|
||||
return doVerify(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean doVerify(VerifyParams params) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VerifyParams getTestParam(VerifyParams params, HttpServletRequest request, String openId, String token) {
|
||||
params.setChannel("YouGu");
|
||||
params.setToken(token);
|
||||
params.setOpenId(openId);
|
||||
return params;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VerifyParams getFormatParam(VerifyParams params, HttpServletRequest request, String openId, String token) {
|
||||
params.setChannel("YouGu");
|
||||
params.setToken(token);
|
||||
params.setOpenId(openId);
|
||||
return params;
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ import java.util.Map;
|
|||
import java.util.Properties;
|
||||
|
||||
public class QuickVerifyService extends AbstractVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractVerifyService.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickVerifyService.class);
|
||||
public static int isTestLan=0;
|
||||
private final static String product_code = "98413963499457078085779851192112";
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
public class QuickVerifyService2 extends AbstractVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractVerifyService.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickVerifyService2.class);
|
||||
public static int isTestLan=0;
|
||||
private final static String product_code = "63148872713623581002117103205092";
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
|
||||
public class YouGuVerifyService extends AbstractVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractVerifyService.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(YouGuVerifyService.class);
|
||||
public static int isTestLan=0;
|
||||
|
||||
public YouGuVerifyService(String sign) {
|
||||
|
|
Loading…
Reference in New Issue