数数公共事件添加

back_recharge
duhui 2021-09-02 10:58:07 +08:00
parent c880ba81a0
commit 130e7fd09b
2 changed files with 14 additions and 1 deletions

View File

@ -90,6 +90,16 @@ public class ReportUserEvent {
return this; return this;
} }
public ReportUserEvent setPlatform(String platform){
baseInfo.put("platform",platform);
return this;
}
public ReportUserEvent setBundle_id(String bundle_id){
baseInfo.put("bundle_id",bundle_id);
return this;
}
public ReportUserEvent setChannelId(String channelId){ public ReportUserEvent setChannelId(String channelId){
baseInfo.put("channel_id",channelId); baseInfo.put("channel_id",channelId);
return this; return this;

View File

@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@ -106,7 +107,9 @@ public class ReportUtil {
.setFighting_capacity(user.getPlayerInfoManager().getMaxForce()) .setFighting_capacity(user.getPlayerInfoManager().getMaxForce())
.setLevel(user.getPlayerInfoManager().getLevel()) .setLevel(user.getPlayerInfoManager().getLevel())
.setChannelId(user.getPlayerInfoManager().getChannel_id()==null?"":user.getPlayerInfoManager().getChannel_id()) .setChannelId(user.getPlayerInfoManager().getChannel_id()==null?"":user.getPlayerInfoManager().getChannel_id())
.setPackId(user.getPlayerInfoManager().getPack_id()==null?"":user.getPlayerInfoManager().getPack_id()); .setPackId(user.getPlayerInfoManager().getPack_id()==null?"":user.getPlayerInfoManager().getPack_id())
.setBundle_id(Optional.ofNullable(user.getPlayerInfoManager().getBundle_id()).orElse(""))
.setPlatform(Optional.ofNullable(user.getPlayerInfoManager().getPlatform()).orElse(""));
} }
public static void doReport(ReportUserEvent reportUserEvent){ public static void doReport(ReportUserEvent reportUserEvent){