tapdb上报修改

back_recharge
lvxinran 2020-07-22 10:49:36 +08:00
parent 4eca4ad61d
commit 93020b9205
4 changed files with 15 additions and 13 deletions

View File

@ -89,6 +89,8 @@ public class GameLogicService implements IService {
//初始化邮件
MailingSystemManager.init();
HttpPool.init();
//线程池管理器
ThreadManager threadManager = ThreadManager.getInstance();
threadManager.init();
@ -96,7 +98,7 @@ public class GameLogicService implements IService {
MapLogic.getInstance().init();
MongoKeys.initmongoKey();
SensitivewordFilter.init();
HttpPool.init();
KeyGenUtils.setMachineNum(GameApplication.serverProperties.getNum());
ActivityLogic.getInstance().checkActiviyStatus();
//初始化cdk

View File

@ -64,7 +64,7 @@ public class DataMessageUtils {
if (!sendDataList.isEmpty()) {
KTSendBody sendBody = new KTSendBody(sendDataList);
HttpPool.sendPost(sendUrl, gson.toJson(sendBody));
HttpPool.sendPost(sendUrl, gson.toJson(sendBody),"application/json");
}
if (!sendData37List.isEmpty() && GameApplication.serverProperties.isSendlog37()) {
@ -124,7 +124,7 @@ public class DataMessageUtils {
str = m.replaceAll("");
}
try {
return HttpPool.sendPost(sendToTapDBURL,urlEncode(str));
return HttpPool.sendPost(sendToTapDBURL,urlEncode(str),"text/plain");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
@ -134,7 +134,7 @@ public class DataMessageUtils {
String str = gson.toJson(info);
return HttpPool.sendPost(sendOnlineURL,str);
return HttpPool.sendPost(sendOnlineURL,str,"application/json");
}

View File

@ -11,13 +11,13 @@ public class OnlineProp {
private int online;
private long timeStamp;
private long timestamp;
public OnlineProp(String server, int online, long timeStamp) {
public OnlineProp(String server, int online, long timestamp) {
this.server = server;
this.online = online;
this.timeStamp = timeStamp;
this.timestamp = timestamp;
}
public String getServer() {
@ -37,10 +37,10 @@ public class OnlineProp {
}
public long getTimeStamp() {
return timeStamp;
return timestamp;
}
public void setTimeStamp(long timeStamp) {
this.timeStamp = timeStamp;
public void setTimeStamp(long timestamp) {
this.timestamp = timestamp;
}
}

View File

@ -78,7 +78,7 @@ public class HttpPool {
return null;
}
public static String sendPost(String url, String info) {
public static String sendPost(String url, String info,String content_type) {
HttpPost httpPost = new HttpPost(url);
HttpResponse httpResponse;
int sendTimes = 0;
@ -89,7 +89,7 @@ public class HttpPool {
httpPost.setEntity(stringEntity);
httpPost.setConfig(getRequestConfig());
httpPost.setHeader("Content-Type","application/json;charset=utf-8");
httpPost.setHeader("Content-Type",content_type);
httpResponse = httpclient.execute(httpPost);
HttpEntity responseEntity = httpResponse.getEntity();
@ -132,6 +132,6 @@ public class HttpPool {
String send ="{\"param_data\":{\"app_id_s\":\"jl_test\",\"category_s\":\"event_role\",\"platform_s\":\"ADR\",\"region_s\":\"60215\",\"server_s\":\"60215\",\"channel_s\":\"#\",\"data_unix\":1578542089},\"param_environment\":{\"idfa_s\":\"\",\"imei_s\":\"\",\"app_device_id_s\":\"\",\"brand_s\":\"\",\"dpi_s\":\"\",\"operator_s\":\"\",\"os_version_s\":\"\",\"wifi_b\":false},\"param_user\":{\"user_id_s\":\"w7ww\",\"account_id_s\":\"10040506\"},\"param_role\":{\"role_id_s\":\"10040506\",\"role_name_s\":\"10040506\",\"level_i\":\"100\",\"vip_level_i\":0,\"currency_1_d\":\"9899\",\"currency_2_d\":\"41464\",\"eco_force_11_a\":\"[315870,250891,0,0,0,0,0,0,0,0,0]\"},\"param_event\":{\"event_s\":[\"login_1\",\"LOGOUT\"]}}";
init();
KTSendBody sendBody = gson.fromJson(send, KTSendBody.class);
sendPost("https://gskuld.receiver.extranet.kt007.com:8081/skuld/game/common/",send);
// sendPost("https://gskuld.receiver.extranet.kt007.com:8081/skuld/game/common/",send);
}
}