ohayoo增加安卓登陆

master
duhui 2022-07-28 13:52:27 +08:00
parent 548baca680
commit 7dd9ac2238
1 changed files with 16 additions and 11 deletions

View File

@ -16,14 +16,15 @@ import java.util.HashMap;
import java.util.Map;
/**
*
* ohayoo
*/
public class QuickVerifyService3 extends AbstractVerifyService {
private static final Logger LOGGER = LoggerFactory.getLogger(AbstractVerifyService.class);
public static int isTestLan=0;
private final static String product_code = "59089882210126220068309806520046";
private final static String quick_appId = "59089882210126220068309806520046";
private final static String iosAppId = "6485653972429833";
private final static String android_appId = "6485653971822594";
private final static String ios_appId = "6485653972429833";
public QuickVerifyService3(String sign) {
super(sign);
@ -46,7 +47,7 @@ public class QuickVerifyService3 extends AbstractVerifyService {
return true;
}
// 正式 安卓
// 渠道 登陆
if ("1".equals(platform) ) {
String sub_channel = request.getParameter("sub_channel");
boolean result = false;
@ -54,13 +55,13 @@ public class QuickVerifyService3 extends AbstractVerifyService {
if (sub_channel.equals("1000")) {
//测试服构建参数
VerifyParams params = new VerifyParams();
params.setProductCode(product_code);
params.setProductCode(quick_appId);
VerifyParams testParam = getTestParam(params,request, openId, token);
result = verifyTest(testParam);
} else {
//正式服appId
VerifyParams params = new VerifyParams();
params.setProductCode(product_code);
params.setProductCode(quick_appId);
VerifyParams formatParam = getFormatParam(params,request, openId, token);
result = verifyFormat(formatParam);
}
@ -73,12 +74,17 @@ public class QuickVerifyService3 extends AbstractVerifyService {
}
// 正式 ios
if ("2".equals(platform) ) {
if ("2".equals(platform) || "3".equals(platform)) {
String sub_channel = request.getParameter("sub_channel");
boolean result = false;
if (sub_channel != null && !sub_channel.equals("")) {
VerifyParams params = new VerifyParams();
params.setProductCode(iosAppId);
if ("2".equals(platform)){
params.setProductCode(ios_appId);
}
if ("3".equals(platform)){
params.setProductCode(android_appId);
}
VerifyParams param;
// 1000是测试服
if (sub_channel.equals("1000")) {
@ -88,11 +94,10 @@ public class QuickVerifyService3 extends AbstractVerifyService {
param = getFormatParam(params,request, openId, token);
result = verifyFormatIos(param);
}
}
if (!result) {
response.sendError(400, "ios verify fail");
LOGGER.error("ios verify fail");
response.sendError(400, "ohayoo verify fail");
LOGGER.error("ohayoo verify fail");
return false;
}
}