爱玩信息上报
parent
deebea6ab1
commit
1354ec8bf3
|
|
@ -54,16 +54,16 @@ public class AiWanPlayerInfoUpload {
|
||||||
}
|
}
|
||||||
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
PlayerManager playerInfoManager = user.getPlayerInfoManager();
|
||||||
int nowInt = TimeUtils.nowInt();
|
int nowInt = TimeUtils.nowInt();
|
||||||
SortedMap<String, String> map = new TreeMap<>();
|
SortedMap<String, Object> map = new TreeMap<>();
|
||||||
map.put("eventtype",type);
|
map.put("eventtype",type);
|
||||||
map.put("appid",app_id);
|
map.put("appid",app_id);
|
||||||
map.put("serverid",String.valueOf(GameApplication.serverId));
|
map.put("serverid",String.valueOf(GameApplication.serverId));
|
||||||
map.put("openid", playerInfoManager.getOpenId());
|
map.put("openid", playerInfoManager.getOpenId());
|
||||||
map.put("roleid",String.valueOf(user.getId()));
|
map.put("roleid",String.valueOf(user.getId()));
|
||||||
map.put("nickname",playerInfoManager.getNickName());
|
map.put("nickname",playerInfoManager.getNickName());
|
||||||
map.put("regtime",String.valueOf(Long.valueOf(playerInfoManager.getCreateTime())/1000));
|
map.put("regtime",(playerInfoManager.getCreateTime()/1000));
|
||||||
map.put("posttime",String.valueOf(nowInt));
|
map.put("posttime",nowInt);
|
||||||
map.put("level",String.valueOf(user.getMainLevelManager().getFightId()));//关卡
|
map.put("level",user.getMainLevelManager().getFightId());//关卡
|
||||||
map.put("ext","");
|
map.put("ext","");
|
||||||
String sign = getSign(map);
|
String sign = getSign(map);
|
||||||
map.put("sign",sign);
|
map.put("sign",sign);
|
||||||
|
|
@ -71,12 +71,12 @@ public class AiWanPlayerInfoUpload {
|
||||||
LOGGER.info("爱玩玩家信息上报 uid={}, 返回结果={}, 参数={}", user.getId(), result, map);
|
LOGGER.info("爱玩玩家信息上报 uid={}, 返回结果={}, 参数={}", user.getId(), result, map);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getSign(Map<String, String> map){
|
private static String getSign(Map<String, Object> map){
|
||||||
if (map == null || map.isEmpty()) {
|
if (map == null || map.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
StringBuilder builder = new StringBuilder();
|
StringBuilder builder = new StringBuilder();
|
||||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||||
builder.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
|
builder.append(entry.getKey()).append("=").append(entry.getValue()).append("&");
|
||||||
}
|
}
|
||||||
String substring = builder.substring(0, builder.length() - 1);
|
String substring = builder.substring(0, builder.length() - 1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue