Merge branch 'master_test_gn' of http://60.1.1.230/backend/jieling_server into master_test_gn
commit
6c8e14ba4d
|
@ -608,6 +608,8 @@ public class BuyGoodsNewLogic {
|
|||
builder.setStartTime((int)(bag.getStartTime()/1000));
|
||||
if(bag.getType() == RechargeType.perpetual.getType() && bag.getRefreshTime() > 0){
|
||||
builder.setEndTime((int)(bag.getRefreshTime()/1000));
|
||||
}else if(bag.getType() == RechargeType.receive.getType() && bag.getEndTime() == 0){
|
||||
builder.setEndTime((int)((bag.getStartTime() + bag.getContinueDays() * TimeUtils.DAY)/1000));
|
||||
}else{
|
||||
builder.setEndTime((int)(bag.getEndTime()/1000));
|
||||
}
|
||||
|
@ -647,21 +649,24 @@ public class BuyGoodsNewLogic {
|
|||
if(list == null){
|
||||
return;
|
||||
}
|
||||
int popup = 0;
|
||||
for(SPackPushConfig con : list){
|
||||
int bagId = judgePushCondition(user,con);
|
||||
if(bagId > 0 && info.getNextPushTime() < System.currentTimeMillis()){
|
||||
popup = bagId;
|
||||
info.setNextPushTime(System.currentTimeMillis() + con.getcDTime() * TimeUtils.HOUR);
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(bagId);
|
||||
initUnitWF(user,config);
|
||||
}
|
||||
}
|
||||
List<Integer> pushList = info.getPushList();
|
||||
List<CommonProto.GiftGoodsInfo> goodsBagInfo = new ArrayList<>(SRechargeCommodityNewConfig.configMap.size());
|
||||
getGoodsBagInfo(user.getId(), goodsBagInfo);
|
||||
PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addAllId(pushList).build();
|
||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true);
|
||||
PlayerInfoProto.AllGiftGoodsIndication goodsBuild = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build();
|
||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.ALL_GIFTGOODS_INDICATION_VALUE, goodsBuild, true);
|
||||
if(popup != 0){
|
||||
PlayerInfoProto.PushWelfareResponse pushWelfareResponse = PlayerInfoProto.PushWelfareResponse.newBuilder().addId(popup).build();
|
||||
MessageUtil.sendIndicationMessage(session, 1, MessageTypeProto.MessageType.PUSH_WELFARE_RESPONSE.getNumber(), pushWelfareResponse, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static int judgePushCondition(User user,SPackPushConfig con){
|
||||
|
|
|
@ -185,9 +185,6 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
public long getEndTime() { return endTime; }
|
||||
|
||||
public void setEndTime(long endTime) {
|
||||
if(getModId() == 101){
|
||||
System.out.println();
|
||||
}
|
||||
this.endTime = endTime;
|
||||
updateString("endTime",endTime);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue