generated from root/miduo_server
增加龙珠直播渠道
parent
2ac87f0e06
commit
30c05371d7
|
@ -95,6 +95,9 @@ public class GetUserController extends HttpServlet {
|
|||
serviceMap.put("DNA01", new Dna01VerifyService("DNA01"));
|
||||
//太初行QuickDNA01
|
||||
serviceMap.put("QKDNA01", new QuickDna01VerifyService("QKDNA01"));
|
||||
//龙珠渠道
|
||||
serviceMap.put("LZZB01", new QuickLzZb1VerifyService("LZZB01"));
|
||||
serviceMap.put("LZZB02", new QuickLzZb2VerifyService("LZZB02"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.io.IOException;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
public class Dna01VerifyService extends AbstractVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickVerifyService.class);
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(Dna01VerifyService.class);
|
||||
public static int isTestLan=0;
|
||||
public final static String adAppId = "3";
|
||||
public final static String adAppKey = "915c3274597aa3edc802a52315ffc48f";
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
package com.ljsd.service;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 龙珠quick专服1直播渠道
|
||||
*/
|
||||
public class QuickLzZb1VerifyService extends QuickVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickLzZb1VerifyService.class);
|
||||
public final static String product_code = "02948588147217597211215670864515";
|
||||
|
||||
public QuickLzZb1VerifyService(String sign) {
|
||||
super(sign);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean doVerify(VerifyParams params) {
|
||||
LOGGER.info("quick 龙珠直播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 龙珠直播1 请求结果:{}",r);
|
||||
if (r != null && r.equals("1")) {
|
||||
result = true;
|
||||
}
|
||||
}catch (IOException e){
|
||||
LOGGER.info("quick 龙珠直播1 验证失败,IOException:{}",e.getMessage());
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package com.ljsd.service;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 龙珠quick专服2直播渠道
|
||||
*/
|
||||
public class QuickLzZb2VerifyService extends QuickVerifyService {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickLzZb2VerifyService.class);
|
||||
public final static String product_code = "82145589039064344576864338305244";
|
||||
|
||||
public QuickLzZb2VerifyService(String sign) {
|
||||
super(sign);
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean doVerify(VerifyParams params) {
|
||||
LOGGER.info("quick 龙珠直播2 登录验证-->{}",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 龙珠直播2 请求结果:{}",r);
|
||||
if (r != null && r.equals("1")) {
|
||||
result = true;
|
||||
}
|
||||
}catch (IOException e){
|
||||
LOGGER.info("quick 龙珠直播2 验证失败,IOException:{}",e.getMessage());
|
||||
return false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ljsd.pojo.VerifyParams;
|
||||
import com.ljsd.util.AppConstans;
|
||||
|
@ -216,30 +217,45 @@ public class Tcx027VerifyService extends AbstractVerifyService {
|
|||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String url = "http://47.98.116.221:9991/delivery/Hb027Tcx2Callback";
|
||||
Map<String,String> parms = new HashMap<>();
|
||||
String appId = "2f89c8ab1866fbd990006df560e887ba";
|
||||
String userId = "500360687";
|
||||
String orderNum = "BR66e29cd1bf679710915266575";
|
||||
String money = "6.00";
|
||||
String serverId = "20001";
|
||||
String roleId = "10000001";
|
||||
String roleName = "夏侯以亦";
|
||||
String extInfo = "11101";
|
||||
String status = "1";
|
||||
String sign = "1d6dad51d450fd3d7df7c8852981de5bsign2=95c0091eec699f377680754780f68d3d&sign3=61cbc93711ff5e41f80853eea9279fe0";
|
||||
parms.put("appId",appId);
|
||||
parms.put("userId",userId);
|
||||
parms.put("orderNum",orderNum);
|
||||
parms.put("money",money);
|
||||
parms.put("serverId",serverId);
|
||||
parms.put("roleId",roleId);
|
||||
parms.put("roleName",roleName);
|
||||
parms.put("extInfo",extInfo);
|
||||
parms.put("status",status);
|
||||
parms.put("sign",sign);
|
||||
String r = HttpUtils.doPost(url, parms);
|
||||
System.out.print("------------------" + r);
|
||||
getForecRank();
|
||||
// String url = "http://47.98.116.221:9991/delivery/Hb027Tcx2Callback";
|
||||
// Map<String,String> parms = new HashMap<>();
|
||||
// String appId = "2f89c8ab1866fbd990006df560e887ba";
|
||||
// String userId = "500360687";
|
||||
// String orderNum = "BR66e29cd1bf679710915266575";
|
||||
// String money = "6.00";
|
||||
// String serverId = "20001";
|
||||
// String roleId = "10000001";
|
||||
// String roleName = "夏侯以亦";
|
||||
// String extInfo = "11101";
|
||||
// String status = "1";
|
||||
// String sign = "1d6dad51d450fd3d7df7c8852981de5bsign2=95c0091eec699f377680754780f68d3d&sign3=61cbc93711ff5e41f80853eea9279fe0";
|
||||
// parms.put("appId",appId);
|
||||
// parms.put("userId",userId);
|
||||
// parms.put("orderNum",orderNum);
|
||||
// parms.put("money",money);
|
||||
// parms.put("serverId",serverId);
|
||||
// parms.put("roleId",roleId);
|
||||
// parms.put("roleName",roleName);
|
||||
// parms.put("extInfo",extInfo);
|
||||
// parms.put("status",status);
|
||||
// parms.put("sign",sign);
|
||||
// String r = HttpUtils.doPost(url, parms);
|
||||
// System.out.print("------------------" + r);
|
||||
}
|
||||
|
||||
public static void getForecRank(){
|
||||
String url = "http://47.236.255.71:8888/gamotaGetForceRank";
|
||||
int limit = 10;
|
||||
String hash = "test";
|
||||
for(int i=1;i<=1;i++){
|
||||
int serverId = 10000 + i;
|
||||
String req = url + "?server_id=" + serverId + "&limit=" + limit + "&hash=" + hash;
|
||||
String resp = HttpUtils.httpGetRequest(req);
|
||||
JSONObject jobj = JSONObject.parseObject(resp);
|
||||
JSONArray arr = jobj.getJSONArray("data");
|
||||
System.out.println(arr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue