Merge branch 'master' into master_test
commit
8de9d6ad8d
|
@ -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
|
||||
|
|
|
@ -19,8 +19,11 @@ import org.apache.http.message.BasicNameValuePair;
|
|||
import util.StringUtil;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class DataMessageUtils {
|
||||
|
||||
|
@ -36,6 +39,10 @@ public class DataMessageUtils {
|
|||
private static final String sendRoleUrl37 = "http://pvt.api.m.37.com/report/roleChangeReport/";
|
||||
|
||||
private static final String sendChatContent37 = "http://cm3.api.37.com.cn/Content/_checkContent/";
|
||||
|
||||
private static final String sendToTapDBURL = "https://e.tapdb.net/event";
|
||||
|
||||
private static final String sendOnlineURL = "https://se.tapdb.net/tapdb/online";
|
||||
//入队列
|
||||
public static void addLogQueue(Object info) {
|
||||
if(!GameLogicService.isServiceShutdown()){
|
||||
|
@ -57,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()) {
|
||||
|
@ -108,18 +115,43 @@ public class DataMessageUtils {
|
|||
}
|
||||
|
||||
}
|
||||
public static JSONObject immediateSendPost(Object info){
|
||||
String s = gson.toJson(info);
|
||||
JSONObject jsonObject = null;
|
||||
if(info instanceof Report37CheckChat){
|
||||
Report37CheckChat info1 = (Report37CheckChat) info;
|
||||
List<BasicNameValuePair> pairList = info1.getPairList();
|
||||
try {
|
||||
jsonObject = HttpPool.sendPostForm(sendChatContent37, new UrlEncodedFormEntity(pairList, "utf-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
public static String sendRechargePost(Object info){
|
||||
String str = gson.toJson(info);
|
||||
|
||||
if (str!=null) {
|
||||
Pattern p = Pattern.compile("\\s*|\t|\r|\n");
|
||||
Matcher m = p.matcher(str);
|
||||
str = m.replaceAll("");
|
||||
}
|
||||
try {
|
||||
return HttpPool.sendPost(sendToTapDBURL,urlEncode(str),"text/plain");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static String sendOnlinePost(Object info){
|
||||
String str = gson.toJson(info);
|
||||
|
||||
|
||||
return HttpPool.sendPost(sendOnlineURL,str,"application/json");
|
||||
|
||||
}
|
||||
|
||||
private static String urlEncode(String url) throws UnsupportedEncodingException {
|
||||
if(url == null) {
|
||||
return null;
|
||||
}
|
||||
final String reserved_char = ";/?:@=&";
|
||||
String ret = "";
|
||||
for(int i=0; i < url.length(); i++) {
|
||||
String cs = String.valueOf( url.charAt(i) );
|
||||
if(reserved_char.contains(cs)){
|
||||
ret += cs;
|
||||
}else{
|
||||
ret += URLEncoder.encode(cs, "utf-8");
|
||||
}
|
||||
}
|
||||
return jsonObject;
|
||||
}
|
||||
return ret.replace("+", "%20");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -251,10 +251,10 @@ public class Report37CheckChat implements Report37Param{
|
|||
report37CheckChat.setSign(MD5Util.encrypByMd5(signSt));
|
||||
String s = gson.toJson(report37CheckChat);
|
||||
System.out.println(s);
|
||||
JSONObject jsonObject = DataMessageUtils.immediateSendPost(report37CheckChat);
|
||||
Report37Response report37Response = jsonObject.toJavaObject(Report37Response.class);
|
||||
|
||||
System.out.println(report37Response);
|
||||
// JSONObject jsonObject = DataMessageUtils.immediateSendPost(report37CheckChat);
|
||||
// Report37Response report37Response = jsonObject.toJavaObject(Report37Response.class);
|
||||
//
|
||||
// System.out.println(report37Response);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -55,37 +55,37 @@ public class Repot37EventUtil {
|
|||
break;
|
||||
}
|
||||
}
|
||||
public static <T> T hadResReport(Class<T> clazz,User user, Report37EventType eventType, Object... parm){
|
||||
switch (eventType) {
|
||||
case CHECK_CHAT_CONTENT:
|
||||
Report37CheckChat report37CheckChat = new Report37CheckChat();
|
||||
report37CheckChat.setTime((int)(TimeUtils.now()/1000));
|
||||
report37CheckChat.setChat_time(String.valueOf(TimeUtils.now()/1000));
|
||||
report37CheckChat.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));//uid
|
||||
report37CheckChat.setActor_name(user.getPlayerInfoManager().getNickName());
|
||||
report37CheckChat.setActor_id(String.valueOf(user.getId()));
|
||||
report37CheckChat.setGid(SDK37Constans.gid);
|
||||
report37CheckChat.setPid(SDK37Constans.pid);
|
||||
report37CheckChat.setDsid(String.valueOf(GameApplication.serverId));
|
||||
report37CheckChat.setType(parm[0].toString());//类型
|
||||
report37CheckChat.setContent(parm[1].toString());//内容
|
||||
report37CheckChat.setActor_level(String.valueOf(user.getPlayerInfoManager().getLevel()));
|
||||
report37CheckChat.setActor_recharge_gold(String.valueOf(0));//充值数
|
||||
if(parm.length>2){
|
||||
report37CheckChat.setTo_uid(String.valueOf(parm[2]));
|
||||
}
|
||||
if(parm.length>3){
|
||||
report37CheckChat.setTo_actor_name(String.valueOf(parm[3]));
|
||||
}
|
||||
String signChat =SDK37Constans.chatKey+report37CheckChat.getUid()+report37CheckChat.getGid()+report37CheckChat.getDsid()+report37CheckChat.getTime()+report37CheckChat.getType();
|
||||
report37CheckChat.setSign(MD5Util.encrypByMd5(signChat));
|
||||
// System.out.println(gson.toJson(report37CheckChat));
|
||||
JSONObject jsonObject = DataMessageUtils.immediateSendPost(report37CheckChat);
|
||||
T t = jsonObject.toJavaObject(clazz);
|
||||
return t;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// public static <T> T hadResReport(Class<T> clazz,User user, Report37EventType eventType, Object... parm){
|
||||
// switch (eventType) {
|
||||
// case CHECK_CHAT_CONTENT:
|
||||
// Report37CheckChat report37CheckChat = new Report37CheckChat();
|
||||
// report37CheckChat.setTime((int)(TimeUtils.now()/1000));
|
||||
// report37CheckChat.setChat_time(String.valueOf(TimeUtils.now()/1000));
|
||||
// report37CheckChat.setUid(String.valueOf(user.getPlayerInfoManager().getOpenId()));//uid
|
||||
// report37CheckChat.setActor_name(user.getPlayerInfoManager().getNickName());
|
||||
// report37CheckChat.setActor_id(String.valueOf(user.getId()));
|
||||
// report37CheckChat.setGid(SDK37Constans.gid);
|
||||
// report37CheckChat.setPid(SDK37Constans.pid);
|
||||
// report37CheckChat.setDsid(String.valueOf(GameApplication.serverId));
|
||||
// report37CheckChat.setType(parm[0].toString());//类型
|
||||
// report37CheckChat.setContent(parm[1].toString());//内容
|
||||
// report37CheckChat.setActor_level(String.valueOf(user.getPlayerInfoManager().getLevel()));
|
||||
// report37CheckChat.setActor_recharge_gold(String.valueOf(0));//充值数
|
||||
// if(parm.length>2){
|
||||
// report37CheckChat.setTo_uid(String.valueOf(parm[2]));
|
||||
// }
|
||||
// if(parm.length>3){
|
||||
// report37CheckChat.setTo_actor_name(String.valueOf(parm[3]));
|
||||
// }
|
||||
// String signChat =SDK37Constans.chatKey+report37CheckChat.getUid()+report37CheckChat.getGid()+report37CheckChat.getDsid()+report37CheckChat.getTime()+report37CheckChat.getType();
|
||||
// report37CheckChat.setSign(MD5Util.encrypByMd5(signChat));
|
||||
//// System.out.println(gson.toJson(report37CheckChat));
|
||||
// JSONObject jsonObject = DataMessageUtils.immediateSendPost(report37CheckChat);
|
||||
// T t = jsonObject.toJavaObject(clazz);
|
||||
// return t;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
public static boolean Report37Chat(User user,Object... parm){
|
||||
|
|
|
@ -117,11 +117,13 @@ public class GMRequestHandler extends BaseHandler{
|
|||
hero.setStarBreakId(scHeroRankUpConfig.getId());
|
||||
|
||||
scHeroRankUpConfigByType = STableManager.getFigureConfig(HeroStaticConfig.class).getScHeroRankUpConfigByShow(GlobalsDef.BREAK_TYPE,scHero.getStar());
|
||||
int breakId = 0;
|
||||
for(SCHeroRankUpConfig scHeroRankUpConfigBreak :scHeroRankUpConfigByType.values()){
|
||||
if(hero.getLevel()>scHeroRankUpConfigBreak.getLimitLevel()){
|
||||
hero.setBreakId(scHeroRankUpConfigBreak.getId());
|
||||
breakId++;
|
||||
}
|
||||
}
|
||||
hero.setBreakId(breakId);
|
||||
}
|
||||
CommonProto.Hero finalHeroProto = CBean2Proto.getHero(hero);
|
||||
gmBuilder.setDrop(CommonProto.Drop.newBuilder().addHero(finalHeroProto).build());
|
||||
|
|
|
@ -48,40 +48,40 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
|
|||
return;
|
||||
}
|
||||
ReportUtil.saveBaseInfo(userId,loginRequest);
|
||||
ParamEnvironmentBean paramEnvironmentBean = new ParamEnvironmentBean();
|
||||
paramEnvironmentBean.setDevice_id_s(loginRequest.getDeviceIdS());
|
||||
paramEnvironmentBean.setIp_s(loginRequest.getIpS());
|
||||
ParamEnvironmentSimpleBean paramEnvironmentSimpleBean = new ParamEnvironmentSimpleBean("",
|
||||
"",
|
||||
loginRequest.getDeviceIdS(),
|
||||
loginRequest.getBrandS(),
|
||||
loginRequest.getDpiS(),
|
||||
loginRequest.getOperatorS(),
|
||||
loginRequest.getOsVersionS(),
|
||||
LoginParamType.NETWORK_WIFI.equals(loginRequest.getNetworkS()));
|
||||
switch (loginRequest.getPlatformS()){
|
||||
case LoginParamType.PLATFORM_ANDRIOD:
|
||||
paramEnvironmentSimpleBean.setImei_s(loginRequest.getIdfaSOrImeiS());
|
||||
break;
|
||||
case LoginParamType.PLATFORM_IOS:
|
||||
paramEnvironmentSimpleBean.setIdfa_s(loginRequest.getIdfaSOrImeiS());
|
||||
break;
|
||||
case LoginParamType.PLATFORM_IOS_YY:
|
||||
paramEnvironmentSimpleBean.setIdfa_s(loginRequest.getIdfaSOrImeiS());
|
||||
break;
|
||||
case LoginParamType.PLATFORM_PC:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
ParamDataBean paramDataBean = new ParamDataBean();
|
||||
paramDataBean.setChannel_s(loginRequest.getChannelS());
|
||||
KTDataUtil.addUserDataInfo(userId,paramDataBean);
|
||||
|
||||
// ParamEnvironmentBean paramEnvironmentBean = new ParamEnvironmentBean();
|
||||
// paramEnvironmentBean.setDevice_id_s(loginRequest.getDeviceIdS());
|
||||
// paramEnvironmentBean.setIp_s(loginRequest.getIpS());
|
||||
// ParamEnvironmentSimpleBean paramEnvironmentSimpleBean = new ParamEnvironmentSimpleBean("",
|
||||
// "",
|
||||
// loginRequest.getDeviceIdS(),
|
||||
// loginRequest.getBrandS(),
|
||||
// loginRequest.getDpiS(),
|
||||
// loginRequest.getOperatorS(),
|
||||
// loginRequest.getOsVersionS(),
|
||||
// LoginParamType.NETWORK_WIFI.equals(loginRequest.getNetworkS()));
|
||||
// switch (loginRequest.getPlatformS()){
|
||||
// case LoginParamType.PLATFORM_ANDRIOD:
|
||||
// paramEnvironmentSimpleBean.setImei_s(loginRequest.getIdfaSOrImeiS());
|
||||
// break;
|
||||
// case LoginParamType.PLATFORM_IOS:
|
||||
// paramEnvironmentSimpleBean.setIdfa_s(loginRequest.getIdfaSOrImeiS());
|
||||
// break;
|
||||
// case LoginParamType.PLATFORM_IOS_YY:
|
||||
// paramEnvironmentSimpleBean.setIdfa_s(loginRequest.getIdfaSOrImeiS());
|
||||
// break;
|
||||
// case LoginParamType.PLATFORM_PC:
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
//
|
||||
// }
|
||||
// ParamDataBean paramDataBean = new ParamDataBean();
|
||||
// paramDataBean.setChannel_s(loginRequest.getChannelS());
|
||||
// KTDataUtil.addUserDataInfo(userId,paramDataBean);
|
||||
//
|
||||
//// KTEnvironmentUtil.addUserEnviromentInfo(userId,paramEnvironmentBean);
|
||||
// KTEnvironmentUtil.addUserSimpleEnviromentInfo(userId,paramEnvironmentSimpleBean);
|
||||
// KTEnvironmentUtil.addUserEnviromentInfo(userId,paramEnvironmentBean);
|
||||
KTEnvironmentUtil.addUserSimpleEnviromentInfo(userId,paramEnvironmentSimpleBean);
|
||||
KTEnvironmentUtil.addUserEnviromentInfo(userId,paramEnvironmentBean);
|
||||
|
||||
int pid = 0;
|
||||
int gid = 0;
|
||||
|
@ -101,19 +101,19 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
|
|||
}
|
||||
|
||||
//临时代码 等前端出新包后删除2019 11 29
|
||||
if(gid==0){
|
||||
try {
|
||||
String value =( (String) RedisUtil.getInstence().get(RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId)))).replace("\"", "");
|
||||
LOGGER.info("the value={}",value);
|
||||
String[] splitvalue = value.split("#");
|
||||
if (splitvalue.length==2){
|
||||
pid = Integer.valueOf(splitvalue[0]);
|
||||
gid = Integer.valueOf(splitvalue[1]);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.getMessage();
|
||||
}
|
||||
}
|
||||
// if(gid==0){
|
||||
// try {
|
||||
// String value =( (String) RedisUtil.getInstence().get(RedisUtil.getInstence().getKey(RedisKey.PIDGIDTEMP, Integer.toString(userId)))).replace("\"", "");
|
||||
// LOGGER.info("the value={}",value);
|
||||
// String[] splitvalue = value.split("#");
|
||||
// if (splitvalue.length==2){
|
||||
// pid = Integer.valueOf(splitvalue[0]);
|
||||
// gid = Integer.valueOf(splitvalue[1]);
|
||||
// }
|
||||
// }catch (Exception e){
|
||||
// e.getMessage();
|
||||
// }
|
||||
// }
|
||||
|
||||
LOGGER.info("the uid={},the pid={},the gid={},",userId,pid,gid);
|
||||
//登陆注册入内存
|
||||
|
|
|
@ -2057,6 +2057,7 @@ public class MapLogic {
|
|||
.setTowerUseTime((int)(mapManager.getCurrTowerTime()/1000))
|
||||
.setKillCount(mapManager.getTrialInfo().getKillCount())
|
||||
.addAllTrialRewardInfo(mapManager.getTrialInfo().getTowerReceivedReward())
|
||||
.setBombUsed(mapManager.getTrialInfo().getBombUseTimes())
|
||||
.build();
|
||||
builder.setTowerCopyInfo(towerCopyInfo);
|
||||
builder.addAllPlayedGenMapId(mapManager.getPlayGenMaps());
|
||||
|
@ -2375,6 +2376,7 @@ public class MapLogic {
|
|||
int[] bombReward = rewardResult.stream().mapToInt(Integer::valueOf).toArray();
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, bombReward, 1,1,BIReason.BOMB_REWARD);
|
||||
|
||||
mapManager.updateBombUseCount(mapManager.getTrialInfo().getBombUseTimes()+1);
|
||||
|
||||
mapManager.setTrialEnergy(100);
|
||||
MapInfoProto.MapTowerUseBombResponse.Builder response = MapInfoProto.MapTowerUseBombResponse.newBuilder();
|
||||
|
@ -2885,6 +2887,7 @@ public class MapLogic {
|
|||
trialInfo.setBuffIds(initBuff);
|
||||
trialInfo.setFloor(trialInfo.getFloor()-7>1?trialInfo.getFloor()-7:1);
|
||||
trialInfo.setKillCount(0);
|
||||
trialInfo.setBombUseTimes(0);
|
||||
trialInfo.setTowerReceivedReward(new HashSet<>());
|
||||
if(mapManager.getCurMapId()!=0){
|
||||
if(MapLogic.getInstance().getMap(user) instanceof TowerMap){
|
||||
|
|
|
@ -817,6 +817,10 @@ public class MapManager extends MongoBase {
|
|||
trialInfo.setMapGameInfo(info);
|
||||
updateString("trialInfo.mapGameInfo",info);
|
||||
}
|
||||
public void updateBombUseCount(int bombUseCount){
|
||||
trialInfo.setBombUseTimes(bombUseCount);
|
||||
updateString("trialInfo.bombUseTimes",bombUseCount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@ public class TrialInfo {
|
|||
|
||||
private MapGameInfo mapGameInfo = new MapGameInfo();
|
||||
|
||||
private int bombUseTimes;
|
||||
|
||||
public Set<Integer> getTowerReceivedReward() {
|
||||
return towerReceivedReward;
|
||||
}
|
||||
|
@ -138,4 +140,12 @@ public class TrialInfo {
|
|||
public void setMapGameInfo(MapGameInfo mapGameInfo) {
|
||||
this.mapGameInfo = mapGameInfo;
|
||||
}
|
||||
|
||||
public int getBombUseTimes() {
|
||||
return bombUseTimes;
|
||||
}
|
||||
|
||||
public void setBombUseTimes(int bombUseTimes) {
|
||||
this.bombUseTimes = bombUseTimes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,95 +41,95 @@ public class KtEventUtils {
|
|||
|
||||
|
||||
public static void onKtEvent(User user,int eventType,Object ...parm){
|
||||
ParamEventBean paramEventBean = new ParamEventBean(eventType);
|
||||
switch (eventType){
|
||||
case ParamEventBean.UserActivityEvent:
|
||||
int activityId = (int)parm[0];
|
||||
SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||
paramEventBean.add(sGlobalActivity.getSesc());
|
||||
paramEventBean.add(sGlobalActivity.getSesc());
|
||||
paramEventBean.add(parm[1].toString());
|
||||
paramEventBean.add("COMPLETE");
|
||||
break;
|
||||
case ParamEventBean.UserItemEvent:
|
||||
case ParamEventBean.UserCurrencyEvent:
|
||||
int useReson = (int)parm[0];
|
||||
int useType = (int)parm[1];
|
||||
int itemId = (int)parm[2];
|
||||
int itemNum = (int)parm[3];
|
||||
int itemTotalNum = (int)parm[4];
|
||||
paramEventBean.add(itemUseType[useType]);
|
||||
paramEventBean.add(String.valueOf(useReson));
|
||||
if(currencyMap.containsKey(itemId)){
|
||||
paramEventBean.add(currencyMap.get(itemId));
|
||||
}else{
|
||||
paramEventBean.add(String.valueOf(itemId));
|
||||
}
|
||||
paramEventBean.add(String.valueOf(itemNum));
|
||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
ItemLogic.getInstance().addItemLog(new ItemLog(user.getId(),useType,String.valueOf(TimeUtils.now()),useReson,itemId,itemNum,itemTotalNum));
|
||||
|
||||
if(parm.length==6){
|
||||
String sbReson = String.valueOf(parm[5]);
|
||||
BILog.info("itemflow {}|{}|{}|{}|{}|{}|{}|{}|{}",user.getId(), playerInfoManager.getLevel(), playerInfoManager.getVipLevel(),useType,useReson,itemId,itemNum,itemTotalNum,sbReson);
|
||||
}else {
|
||||
BILog.info("itemflow {}|{}|{}|{}|{}|{}|{}|{}",user.getId(), playerInfoManager.getLevel(), playerInfoManager.getVipLevel(),useType,useReson,itemId,itemNum,itemTotalNum);
|
||||
}
|
||||
|
||||
break;
|
||||
case ParamEventBean.UserLoginOutEvent:
|
||||
case ParamEventBean.UserLogin:
|
||||
int loginType = (int)parm[0];
|
||||
paramEventBean.add(userloginType[loginType]);
|
||||
break;
|
||||
case ParamEventBean.UserStoreEvent:
|
||||
int storeId = (int)parm[0];
|
||||
int buyItemId = (int)parm[1];
|
||||
int goldType = (int)parm[2];
|
||||
int buyTimes = (int)parm[3];
|
||||
int costTotal = (int)parm[4];
|
||||
paramEventBean.add(String.valueOf(storeId));
|
||||
paramEventBean.add(String.valueOf(buyItemId));
|
||||
if(currencyMap.containsKey(goldType)){
|
||||
paramEventBean.add(currencyMap.get(goldType));
|
||||
}else{
|
||||
paramEventBean.add(Integer.toString(goldType));
|
||||
}
|
||||
paramEventBean.add(String.valueOf(buyTimes));
|
||||
paramEventBean.add(String.valueOf(costTotal/buyTimes));
|
||||
paramEventBean.add(String.valueOf(costTotal));
|
||||
break;
|
||||
case ParamEventBean.UserPayEvent:
|
||||
int goodsId = (int)parm[0];
|
||||
String orderId = (String)parm[1];
|
||||
String payValid = payResult[(int)parm[2]];
|
||||
String amount = String.valueOf( ((int)parm[3]));
|
||||
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||
paramEventBean.add(sRechargeCommodityConfig.getName());
|
||||
paramEventBean.add(orderId);
|
||||
paramEventBean.add(payValid);
|
||||
paramEventBean.add(amount);
|
||||
break;
|
||||
case ParamEventBean.UserRegister:
|
||||
break;
|
||||
case ParamEventBean.UserTaskEvent:
|
||||
int misionType = (int)parm[0];
|
||||
int misionId = (int)parm[1];
|
||||
paramEventBean.add(misionType+"_"+misionId);
|
||||
paramEventBean.add("COMPLETE");
|
||||
break;
|
||||
case ParamEventBean.UserGameType:
|
||||
paramEventBean.add("玩法");
|
||||
String type = KTGameType.getName((int) parm[0]);
|
||||
paramEventBean.add(String.valueOf(type));
|
||||
paramEventBean.add(String.valueOf(parm[1]));
|
||||
paramEventBean.add("COMPLETE");
|
||||
eventType = ParamEventBean.UserActivityEvent;
|
||||
break;
|
||||
}
|
||||
|
||||
KTParam ktParam = ParamBuilder.paramBuild(user, eventType, paramEventBean);
|
||||
DataMessageUtils.addLogQueue(ktParam);
|
||||
// ParamEventBean paramEventBean = new ParamEventBean(eventType);
|
||||
// switch (eventType){
|
||||
// case ParamEventBean.UserActivityEvent:
|
||||
// int activityId = (int)parm[0];
|
||||
// SGlobalActivity sGlobalActivity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||
// paramEventBean.add(sGlobalActivity.getSesc());
|
||||
// paramEventBean.add(sGlobalActivity.getSesc());
|
||||
// paramEventBean.add(parm[1].toString());
|
||||
// paramEventBean.add("COMPLETE");
|
||||
// break;
|
||||
// case ParamEventBean.UserItemEvent:
|
||||
// case ParamEventBean.UserCurrencyEvent:
|
||||
// int useReson = (int)parm[0];
|
||||
// int useType = (int)parm[1];
|
||||
// int itemId = (int)parm[2];
|
||||
// int itemNum = (int)parm[3];
|
||||
// int itemTotalNum = (int)parm[4];
|
||||
// paramEventBean.add(itemUseType[useType]);
|
||||
// paramEventBean.add(String.valueOf(useReson));
|
||||
// if(currencyMap.containsKey(itemId)){
|
||||
// paramEventBean.add(currencyMap.get(itemId));
|
||||
// }else{
|
||||
// paramEventBean.add(String.valueOf(itemId));
|
||||
// }
|
||||
// paramEventBean.add(String.valueOf(itemNum));
|
||||
// PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||
// ItemLogic.getInstance().addItemLog(new ItemLog(user.getId(),useType,String.valueOf(TimeUtils.now()),useReson,itemId,itemNum,itemTotalNum));
|
||||
//
|
||||
// if(parm.length==6){
|
||||
// String sbReson = String.valueOf(parm[5]);
|
||||
// BILog.info("itemflow {}|{}|{}|{}|{}|{}|{}|{}|{}",user.getId(), playerInfoManager.getLevel(), playerInfoManager.getVipLevel(),useType,useReson,itemId,itemNum,itemTotalNum,sbReson);
|
||||
// }else {
|
||||
// BILog.info("itemflow {}|{}|{}|{}|{}|{}|{}|{}",user.getId(), playerInfoManager.getLevel(), playerInfoManager.getVipLevel(),useType,useReson,itemId,itemNum,itemTotalNum);
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// case ParamEventBean.UserLoginOutEvent:
|
||||
// case ParamEventBean.UserLogin:
|
||||
// int loginType = (int)parm[0];
|
||||
// paramEventBean.add(userloginType[loginType]);
|
||||
// break;
|
||||
// case ParamEventBean.UserStoreEvent:
|
||||
// int storeId = (int)parm[0];
|
||||
// int buyItemId = (int)parm[1];
|
||||
// int goldType = (int)parm[2];
|
||||
// int buyTimes = (int)parm[3];
|
||||
// int costTotal = (int)parm[4];
|
||||
// paramEventBean.add(String.valueOf(storeId));
|
||||
// paramEventBean.add(String.valueOf(buyItemId));
|
||||
// if(currencyMap.containsKey(goldType)){
|
||||
// paramEventBean.add(currencyMap.get(goldType));
|
||||
// }else{
|
||||
// paramEventBean.add(Integer.toString(goldType));
|
||||
// }
|
||||
// paramEventBean.add(String.valueOf(buyTimes));
|
||||
// paramEventBean.add(String.valueOf(costTotal/buyTimes));
|
||||
// paramEventBean.add(String.valueOf(costTotal));
|
||||
// break;
|
||||
// case ParamEventBean.UserPayEvent:
|
||||
// int goodsId = (int)parm[0];
|
||||
// String orderId = (String)parm[1];
|
||||
// String payValid = payResult[(int)parm[2]];
|
||||
// String amount = String.valueOf( ((int)parm[3]));
|
||||
// SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
|
||||
// paramEventBean.add(sRechargeCommodityConfig.getName());
|
||||
// paramEventBean.add(orderId);
|
||||
// paramEventBean.add(payValid);
|
||||
// paramEventBean.add(amount);
|
||||
// break;
|
||||
// case ParamEventBean.UserRegister:
|
||||
// break;
|
||||
// case ParamEventBean.UserTaskEvent:
|
||||
// int misionType = (int)parm[0];
|
||||
// int misionId = (int)parm[1];
|
||||
// paramEventBean.add(misionType+"_"+misionId);
|
||||
// paramEventBean.add("COMPLETE");
|
||||
// break;
|
||||
// case ParamEventBean.UserGameType:
|
||||
// paramEventBean.add("玩法");
|
||||
// String type = KTGameType.getName((int) parm[0]);
|
||||
// paramEventBean.add(String.valueOf(type));
|
||||
// paramEventBean.add(String.valueOf(parm[1]));
|
||||
// paramEventBean.add("COMPLETE");
|
||||
// eventType = ParamEventBean.UserActivityEvent;
|
||||
// break;
|
||||
// }
|
||||
//
|
||||
// KTParam ktParam = ParamBuilder.paramBuild(user, eventType, paramEventBean);
|
||||
// DataMessageUtils.addLogQueue(ktParam);
|
||||
// LOGGER.info("ktparm -- > {}",gson.toJson(ktParam));
|
||||
}
|
||||
public static ParamEnvironmentBean enviromentBuild(int uid){
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
package com.ljsd.jieling.ktbeans;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/7/20
|
||||
* @discribe
|
||||
*/
|
||||
public class OnlineProp {
|
||||
|
||||
private String server;
|
||||
|
||||
private int online;
|
||||
|
||||
private long timestamp;
|
||||
|
||||
|
||||
public OnlineProp(String server, int online, long timestamp) {
|
||||
this.server = server;
|
||||
this.online = online;
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public String getServer() {
|
||||
return server;
|
||||
}
|
||||
|
||||
public void setServer(String server) {
|
||||
this.server = server;
|
||||
}
|
||||
|
||||
public int getOnline() {
|
||||
return online;
|
||||
}
|
||||
|
||||
public void setOnline(int online) {
|
||||
this.online = online;
|
||||
}
|
||||
|
||||
public long getTimeStamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimeStamp(long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.ljsd.jieling.ktbeans;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/7/20
|
||||
* @discribe
|
||||
*/
|
||||
public class OnlineUserCalEvent {
|
||||
private String appid;
|
||||
|
||||
private OnlineProp[] onlines;
|
||||
|
||||
public OnlineProp[] getOnlines() {
|
||||
return onlines;
|
||||
}
|
||||
|
||||
public void setOnlines(OnlineProp[] onlines) {
|
||||
this.onlines = onlines;
|
||||
}
|
||||
|
||||
public String getAppid() {
|
||||
return appid;
|
||||
}
|
||||
|
||||
public void setAppid(String appid) {
|
||||
this.appid = appid;
|
||||
}
|
||||
}
|
|
@ -38,6 +38,8 @@ public class GuildMyInfo extends MongoBase {
|
|||
private int carPlayTime; //车迟上次玩的时间
|
||||
private int carPlayProgress; // 车迟玩的阶段
|
||||
|
||||
private int joinTime;//加入公会时间
|
||||
|
||||
|
||||
|
||||
public void clearOfLevelGuild(){
|
||||
|
@ -282,4 +284,14 @@ public class GuildMyInfo extends MongoBase {
|
|||
this.carPlayProgress = carPlayProgress;
|
||||
updateString("carPlayProgress",carPlayProgress);
|
||||
}
|
||||
|
||||
public int getJoinTime() {
|
||||
return joinTime;
|
||||
}
|
||||
|
||||
public void setJoinTime(int joinTime) {
|
||||
this.joinTime = joinTime;
|
||||
updateString("joinTime",joinTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.ljsd.jieling.globals.BIReason;
|
|||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.GlobalDataManaager;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import com.ljsd.jieling.logic.dao.GuildMyInfo;
|
||||
import com.ljsd.jieling.logic.dao.GuilidManager;
|
||||
import com.ljsd.jieling.logic.dao.TimeControllerOfFunction;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
|
@ -62,6 +63,8 @@ public class DeathPathLogic {
|
|||
|
||||
private int overTime;
|
||||
|
||||
private int startTime;
|
||||
|
||||
//第一次开启时间
|
||||
private long firstStartTime;
|
||||
|
||||
|
@ -199,6 +202,7 @@ public class DeathPathLogic {
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
startTime = (int)(TimeUtils.getAppointTime(guildWarTime[status-1][0],guildWarTime[status-1][1])/1000);
|
||||
overTime = (int)(TimeUtils.getAppointTime(guildWarTime[status][0],guildWarTime[status][1])/1000);
|
||||
if (taskExecutor == null) {
|
||||
taskExecutor = new DeathPathExecutor(tasks);
|
||||
|
@ -240,8 +244,14 @@ public class DeathPathLogic {
|
|||
* @param session
|
||||
* @param messageType
|
||||
*/
|
||||
public void getStatus(ISession session, MessageTypeProto.MessageType messageType){
|
||||
Family.GetDeathPathStatusResponse response = Family.GetDeathPathStatusResponse.newBuilder().setStatus(status).build();
|
||||
public void getStatus(ISession session, MessageTypeProto.MessageType messageType) throws Exception {
|
||||
GuildMyInfo info = UserManager.getUser(session.getUid()).getGuildMyInfo();
|
||||
int joinType =0;
|
||||
if(info.getJoinTime()<startTime||info.getJoinTime()>overTime) {
|
||||
joinType = 1;
|
||||
}
|
||||
Family.GetDeathPathStatusResponse response = Family.GetDeathPathStatusResponse.newBuilder().setStatus(status).setAllowChallange(joinType).build();
|
||||
|
||||
MessageUtil.sendMessage(session,1,messageType.getNumber(),response,true);
|
||||
}
|
||||
|
||||
|
|
|
@ -617,6 +617,7 @@ public class GuildLogic {
|
|||
Family.FamilyJoinIndicaion build = builder.setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo)).setFamilyUserInfo(CBean2Proto.getFamilyUserInfo(targetUser, GlobalsDef.MEMBER)).build();
|
||||
sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.FAMILY_JOIN_INDICATION,build);
|
||||
}
|
||||
targetUser.getGuildMyInfo().setJoinTime(TimeUtils.nowInt());
|
||||
ReportUtil.onReportEvent(targetUser, ReportEventEnum.JOIN_GUILD.getType(),String.valueOf(guildInfo.getId()),guildInfo.getName(),guildInfo.getLevel(),guildInfo.getTotalMembers());
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.ljsd.jieling.logic.store;
|
||||
|
||||
import com.ljsd.jieling.config.clazzStaticCfg.CommonStaticConfig;
|
||||
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.core.HandlerLogicThread;
|
||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
|
@ -215,7 +216,7 @@ public class BuyGoodsLogic {
|
|||
// if(rechargeInfo.getIsFirst()==0 && firstInvest == 1){
|
||||
// ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.FirstRecharge,sRechargeCommodityConfig.getPrice());
|
||||
// SActivityRewardConfig sActivityRewardConfig = SActivityRewardConfig.getsActivityRewardConfigByActivityId(4).get(0);
|
||||
// rechargeInfo.setFirst(1);
|
||||
rechargeInfo.setFirst(1);
|
||||
// String title = SErrorCodeEerverConfig.getI18NMessage("recharge_first_title");
|
||||
// String content = SErrorCodeEerverConfig.getI18NMessage("recharge_first_txt");
|
||||
// MailLogic.getInstance().sendMail(user.getId(),title,content,ItemUtil.getMailReward(sActivityRewardConfig.getReward()),nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
|
@ -356,9 +357,24 @@ public class BuyGoodsLogic {
|
|||
// Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),goodsId));
|
||||
MongoUtil.getLjsdMongoTemplate().lastUpdate();
|
||||
sendGiftGooodsIndication(uid);
|
||||
onChargeSuccess(uid,sRechargeCommodityConfig.getPrice(),0);//充值成功上报
|
||||
return resultRes;
|
||||
|
||||
}
|
||||
private static void onChargeSuccess(int uid,int amount,int virtualAmount){
|
||||
RechargeEvent rechargeEvent = new RechargeEvent();
|
||||
rechargeEvent.setModule("GameAnalysis");
|
||||
rechargeEvent.setIp("");
|
||||
rechargeEvent.setName("charge");
|
||||
rechargeEvent.setIndex("wjtsq7xrwb48t2uw");
|
||||
rechargeEvent.setIdentify(String.valueOf(uid));
|
||||
rechargeEvent.setProperties(new RechargeEventProp("",amount,virtualAmount,"CNY","",""));
|
||||
String s = DataMessageUtils.sendRechargePost(rechargeEvent);
|
||||
if(s.equals("1")){
|
||||
LOGGER.info("{}充值上报成功,价格为{}",uid,amount);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//通知前端充值成功
|
||||
public static void notifyPaySuccessFul(int uid,int goodsId,boolean needNotify){
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package com.ljsd.jieling.logic.store;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/7/20
|
||||
* @discribe
|
||||
*/
|
||||
public class RechargeEvent {
|
||||
private String module;
|
||||
|
||||
private String ip;
|
||||
|
||||
private String name;
|
||||
|
||||
private String index;
|
||||
|
||||
private String identify;
|
||||
|
||||
private RechargeEventProp properties;
|
||||
|
||||
|
||||
public String getModule() {
|
||||
return module;
|
||||
}
|
||||
|
||||
public void setModule(String module) {
|
||||
this.module = module;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getIndex() {
|
||||
return index;
|
||||
}
|
||||
|
||||
public void setIndex(String index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
public String getIdentify() {
|
||||
return identify;
|
||||
}
|
||||
|
||||
public void setIdentify(String identify) {
|
||||
this.identify = identify;
|
||||
}
|
||||
|
||||
public RechargeEventProp getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(RechargeEventProp properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package com.ljsd.jieling.logic.store;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/7/20
|
||||
* @discribe
|
||||
*/
|
||||
public class RechargeEventProp {
|
||||
private String order_id;
|
||||
|
||||
private int amount;
|
||||
|
||||
private int virtual_currency_amount;
|
||||
|
||||
private String currency_type;
|
||||
|
||||
private String product;
|
||||
|
||||
private String payment;
|
||||
|
||||
public String getOrder_id() {
|
||||
return order_id;
|
||||
}
|
||||
|
||||
public void setOrder_id(String order_id) {
|
||||
this.order_id = order_id;
|
||||
}
|
||||
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public int getVirtual_currency_amount() {
|
||||
return virtual_currency_amount;
|
||||
}
|
||||
|
||||
public void setVirtual_currency_amount(int virtual_currency_amount) {
|
||||
this.virtual_currency_amount = virtual_currency_amount;
|
||||
}
|
||||
|
||||
public String getCurrency_type() {
|
||||
return currency_type;
|
||||
}
|
||||
|
||||
public void setCurrency_type(String currency_type) {
|
||||
this.currency_type = currency_type;
|
||||
}
|
||||
|
||||
public String getProduct() {
|
||||
return product;
|
||||
}
|
||||
|
||||
public void setProduct(String product) {
|
||||
this.product = product;
|
||||
}
|
||||
|
||||
public String getPayment() {
|
||||
return payment;
|
||||
}
|
||||
|
||||
public void setPayment(String payment) {
|
||||
this.payment = payment;
|
||||
}
|
||||
|
||||
public RechargeEventProp(String order_id, int amount, int virtual_currency_amount, String currency_type, String product, String payment) {
|
||||
this.order_id = order_id;
|
||||
this.amount = amount;
|
||||
this.virtual_currency_amount = virtual_currency_amount;
|
||||
this.currency_type = currency_type;
|
||||
this.product = product;
|
||||
this.payment = payment;
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@ public class ThreadManager implements IManager {
|
|||
private static MongoDataHandlerTask mongoDataHandlerTask;
|
||||
private static ItemLogTask itemLogTask;
|
||||
public static int SLEEP_INTEVAL_TIME = 60; //每1分钟检查一次
|
||||
|
||||
private static OnlineUserTapTask onlineUserTapTask;//5分钟上报一次
|
||||
|
||||
private static Set<Future<?>> scheduledFutureSets = new HashSet<>();
|
||||
|
||||
|
@ -41,10 +41,13 @@ public class ThreadManager implements IManager {
|
|||
mongoDataHandlerTask = ConfigurableApplicationContextManager.getBean(MongoDataHandlerTask.class);
|
||||
dataReportTask = ConfigurableApplicationContextManager.getBean(DataReportTask.class);
|
||||
itemLogTask = ConfigurableApplicationContextManager.getBean(ItemLogTask.class);
|
||||
onlineUserTapTask = ConfigurableApplicationContextManager.getBean(OnlineUserTapTask.class);
|
||||
|
||||
new RetrySendIndicationThread("retry-indi").start();
|
||||
mongoDataHandlerTask.start();
|
||||
dataReportTask.start();
|
||||
itemLogTask.start();
|
||||
onlineUserTapTask.start();
|
||||
|
||||
scheduledExecutor = new ScheduledThreadPoolExecutor(8, new ScheduleThreadFactory());
|
||||
scheduledExecutor.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
package com.ljsd.jieling.thread.task;
|
||||
|
||||
import com.ljsd.GameApplication;
|
||||
import com.ljsd.jieling.config.reportData.DataMessageUtils;
|
||||
import com.ljsd.jieling.ktbeans.OnlineProp;
|
||||
import com.ljsd.jieling.ktbeans.OnlineUserCalEvent;
|
||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
||||
import org.springframework.stereotype.Component;
|
||||
import util.TimeUtils;
|
||||
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author lvxinran
|
||||
* @date 2020/7/20
|
||||
* @discribe
|
||||
*/
|
||||
@Component
|
||||
public class OnlineUserTapTask extends Thread {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
while (true){
|
||||
Thread.sleep(5*60000);//5分钟上报一次
|
||||
int serverId = GameApplication.serverId;
|
||||
Set<Integer> uids = OnlineUserManager.sessionMap.keySet();
|
||||
OnlineUserCalEvent onlineUserCalEvent = new OnlineUserCalEvent();
|
||||
|
||||
onlineUserCalEvent.setAppid("wjtsq7xrwb48t2uw");
|
||||
onlineUserCalEvent.setOnlines(new OnlineProp[]{new OnlineProp(String.valueOf(serverId),uids.size(), TimeUtils.now()/1000)});
|
||||
DataMessageUtils.sendOnlinePost(onlineUserCalEvent);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -78,7 +78,7 @@ public class HttpPool {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject 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();
|
||||
|
@ -99,7 +99,7 @@ public class HttpPool {
|
|||
String result = EntityUtils.toString(responseEntity,"UTF-8");
|
||||
LOGGER.debug("Http Send,第" + (sendTimes + 1) + "次调用成功,返回码为:[" + statusCode + "]");
|
||||
EntityUtils.consume(responseEntity);
|
||||
return JSONObject.parseObject(result);
|
||||
return result;
|
||||
// break;
|
||||
} else {
|
||||
LOGGER.error("Http Send,第" + (sendTimes + 1) + "次调用出错,返回码为:[" + statusCode + "]");
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue