打点添加
parent
a4942479a0
commit
a54bbe491f
|
|
@ -87,19 +87,30 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
|
||||||
int gid = 0;
|
int gid = 0;
|
||||||
String channle_id = "";
|
String channle_id = "";
|
||||||
String bundle_id = "";
|
String bundle_id = "";
|
||||||
|
String pack_Id = "";
|
||||||
String channelS = loginRequest.getChannelS();
|
String channelS = loginRequest.getChannelS();
|
||||||
String[] splitChannelS = channelS.split("#");
|
String[] splitChannelS = channelS.split("#");
|
||||||
if(splitChannelS.length==1){
|
if(splitChannelS.length==1){
|
||||||
// if(!StringUtil.isEmpty(splitChannelS[0])){
|
// if(!StringUtil.isEmpty(splitChannelS[0])){
|
||||||
// pid = Integer.valueOf(splitChannelS[0]);
|
// pid = Integer.valueOf(splitChannelS[0]);
|
||||||
// }
|
// }
|
||||||
}else if (splitChannelS.length>=2){
|
}else if (splitChannelS.length==2){
|
||||||
if(!StringUtil.isEmpty(splitChannelS[0])){
|
if(!StringUtil.isEmpty(splitChannelS[0])){
|
||||||
channle_id = splitChannelS[0];
|
channle_id = splitChannelS[0];
|
||||||
}
|
}
|
||||||
if(!StringUtil.isEmpty(splitChannelS[1])){
|
if(!StringUtil.isEmpty(splitChannelS[1])){
|
||||||
bundle_id = splitChannelS[1];
|
bundle_id = splitChannelS[1];
|
||||||
}
|
}
|
||||||
|
}else if(splitChannelS.length==3){
|
||||||
|
if(!StringUtil.isEmpty(splitChannelS[0])){
|
||||||
|
channle_id = splitChannelS[0];
|
||||||
|
}
|
||||||
|
if(!StringUtil.isEmpty(splitChannelS[1])){
|
||||||
|
bundle_id = splitChannelS[1];
|
||||||
|
}
|
||||||
|
if(!StringUtil.isEmpty(splitChannelS[2])){
|
||||||
|
pack_Id = splitChannelS[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//临时代码 等前端出新包后删除2019 11 29
|
//临时代码 等前端出新包后删除2019 11 29
|
||||||
|
|
@ -126,9 +137,9 @@ public class LoginRequestHandler extends BaseHandler<PlayerInfoProto.LoginReques
|
||||||
if(split.length>=2){
|
if(split.length>=2){
|
||||||
String openId = split[0];
|
String openId = split[0];
|
||||||
String chanel = split[1];
|
String chanel = split[1];
|
||||||
UserManager.userLogin(userId,openId,chanel,pid,gid,loginRequest.getPlatformS(),loginRequest.getIpS(),channle_id,bundle_id,ccId);
|
UserManager.userLogin(userId,openId,chanel,pid,gid,loginRequest.getPlatformS(),loginRequest.getIpS(),channle_id,bundle_id,ccId,pack_Id);
|
||||||
}
|
}
|
||||||
user = UserManager.userLogin(userId,openIdFront,"",pid,gid,loginRequest.getPlatformS(),loginRequest.getIpS(),channle_id,bundle_id,ccId);
|
user = UserManager.userLogin(userId,openIdFront,"",pid,gid,loginRequest.getPlatformS(),loginRequest.getIpS(),channle_id,bundle_id,ccId,pack_Id);
|
||||||
|
|
||||||
user.getPlayerInfoManager().setLastDeviceId(loginRequest.getDeviceIdS());
|
user.getPlayerInfoManager().setLastDeviceId(loginRequest.getDeviceIdS());
|
||||||
// String newToken = UserManager.getNewToken(userId);
|
// String newToken = UserManager.getNewToken(userId);
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,16 @@ public class ReportUserEvent {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ReportUserEvent setPackId(String packId){
|
||||||
|
baseInfo.put("pack_id",packId);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReportUserEvent setChannelId(String channelId){
|
||||||
|
baseInfo.put("channel_id",channelId);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, Object> getBaseInfo() {
|
public Map<String, Object> getBaseInfo() {
|
||||||
return baseInfo;
|
return baseInfo;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,9 @@ public class ReportUtil {
|
||||||
.setCoins_amount(coin==null?0:coin.getItemNum())
|
.setCoins_amount(coin==null?0:coin.getItemNum())
|
||||||
.setDiamond_amount(diamond==null?0:(int)diamond.getItemNum())
|
.setDiamond_amount(diamond==null?0:(int)diamond.getItemNum())
|
||||||
.setFighting_capacity(user.getPlayerInfoManager().getMaxForce())
|
.setFighting_capacity(user.getPlayerInfoManager().getMaxForce())
|
||||||
.setLevel(user.getPlayerInfoManager().getLevel());
|
.setLevel(user.getPlayerInfoManager().getLevel())
|
||||||
|
.setChannelId(user.getPlayerInfoManager().getChannel_id())
|
||||||
|
.setPackId(user.getPlayerInfoManager().getPack_id());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void doReport(ReportUserEvent reportUserEvent){
|
public static void doReport(ReportUserEvent reportUserEvent){
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@ public class PlayerManager extends MongoBase {
|
||||||
|
|
||||||
private String bundle_id;
|
private String bundle_id;
|
||||||
|
|
||||||
|
private String pack_id;
|
||||||
|
|
||||||
private String lastDeviceId;
|
private String lastDeviceId;
|
||||||
|
|
||||||
private String nickName;
|
private String nickName;
|
||||||
|
|
@ -1109,4 +1111,14 @@ public class PlayerManager extends MongoBase {
|
||||||
this.isHasRandomLotteryType = hasRandomLotteryType;
|
this.isHasRandomLotteryType = hasRandomLotteryType;
|
||||||
updateString("isHasRandomLotteryType",hasRandomLotteryType);
|
updateString("isHasRandomLotteryType",hasRandomLotteryType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPack_id() {
|
||||||
|
return pack_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPack_id(String pack_id) {
|
||||||
|
this.pack_id = pack_id;
|
||||||
|
updateString("pack_id",pack_id);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,13 +75,13 @@ public class UserManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static User userLogin(int uid,String openId,String channel,int pid,int gid,String platform,String ip,String channle_id,String bundle_id,String ccId) throws Exception {
|
public static User userLogin(int uid,String openId,String channel,int pid,int gid,String platform,String ip,String channle_id,String bundle_id,String ccId,String pack_Id) throws Exception {
|
||||||
|
|
||||||
User user = null;
|
User user = null;
|
||||||
if (!UserManager.isUserExist(uid)){
|
if (!UserManager.isUserExist(uid)){
|
||||||
user = MongoUtil.getInstence().getMyMongoTemplate().findById(User.getCollectionName(), uid, User.class);
|
user = MongoUtil.getInstence().getMyMongoTemplate().findById(User.getCollectionName(), uid, User.class);
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
user = registerUser(uid,openId,channel,pid,gid,platform,ip,channle_id,bundle_id,ccId);
|
user = registerUser(uid,openId,channel,pid,gid,platform,ip,channle_id,bundle_id,ccId,pack_Id);
|
||||||
}
|
}
|
||||||
UserManager.addUser(user);
|
UserManager.addUser(user);
|
||||||
}else{
|
}else{
|
||||||
|
|
@ -89,21 +89,22 @@ public class UserManager {
|
||||||
user.getPlayerInfoManager().setGid(gid);
|
user.getPlayerInfoManager().setGid(gid);
|
||||||
user.getPlayerInfoManager().setPid(pid);
|
user.getPlayerInfoManager().setPid(pid);
|
||||||
user.getPlayerInfoManager().setCc_id(ccId);
|
user.getPlayerInfoManager().setCc_id(ccId);
|
||||||
|
user.getPlayerInfoManager().setPack_id(pack_Id);
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static User registerUser(int uid,String openId,String channel,int pid,int gid,String platform,String ip,String channle_id,String bundle_id,String ccId) throws Exception {
|
private static User registerUser(int uid,String openId,String channel,int pid,int gid,String platform,String ip,String channle_id,String bundle_id,String ccId,String pack_Id) throws Exception {
|
||||||
User user = new User(uid);
|
User user = new User(uid);
|
||||||
UserManager.addUser(user);
|
UserManager.addUser(user);
|
||||||
initPlayer(user,openId,channel,pid,gid,platform,ip,channle_id,bundle_id,ccId);
|
initPlayer(user,openId,channel,pid,gid,platform,ip,channle_id,bundle_id,ccId,pack_Id);
|
||||||
MongoUtil.getInstence().getMyMongoTemplate().save(user.getId(),user);
|
MongoUtil.getInstence().getMyMongoTemplate().save(user.getId(),user);
|
||||||
PlayerLogic.getInstance().sendTestWelfareMail(user,1,1);
|
PlayerLogic.getInstance().sendTestWelfareMail(user,1,1);
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initPlayer(User user,String openId,String channel,int pid,int gid,String platform,String ip,String channle_id,String bundle_id,String ccId) throws Exception {
|
private static void initPlayer(User user,String openId,String channel,int pid,int gid,String platform,String ip,String channle_id,String bundle_id,String ccId,String pack_Id) throws Exception {
|
||||||
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
||||||
PlayerManager playerManager = user.getPlayerInfoManager();
|
PlayerManager playerManager = user.getPlayerInfoManager();
|
||||||
long now = TimeUtils.now();
|
long now = TimeUtils.now();
|
||||||
|
|
@ -124,6 +125,7 @@ public class UserManager {
|
||||||
playerManager.setPhoneBindInfo(new PhoneBindInfo(""));
|
playerManager.setPhoneBindInfo(new PhoneBindInfo(""));
|
||||||
playerManager.setChannel(channel);
|
playerManager.setChannel(channel);
|
||||||
playerManager.setCc_id(ccId);
|
playerManager.setCc_id(ccId);
|
||||||
|
playerManager.setPack_id(pack_Id);
|
||||||
playerManager.setPid(pid);
|
playerManager.setPid(pid);
|
||||||
playerManager.setGid(gid);
|
playerManager.setGid(gid);
|
||||||
playerManager.setPlatform(platform);
|
playerManager.setPlatform(platform);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue