循环周卡领取bug处理
parent
8da5ec551c
commit
98044a5bce
|
@ -588,12 +588,6 @@ public class ActivityLogic implements IEventHandler{
|
||||||
}
|
}
|
||||||
int type = sGlobalActivity.getType();
|
int type = sGlobalActivity.getType();
|
||||||
int gapTime = sGlobalActivity.getGapTime();
|
int gapTime = sGlobalActivity.getGapTime();
|
||||||
///旧版积天豪礼数据兼容
|
|
||||||
if (type ==ActivityType.RECHARGE_SUM_DAY){
|
|
||||||
if (activityMissionMap.get(activityId).getV()<=0||activityMissionMap.get(activityId).getV()>=15) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(activityStatus == ActivityType.CLOSE_STATE){
|
if(activityStatus == ActivityType.CLOSE_STATE){
|
||||||
long prepareTime = ToolsUtil.getEndTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),0, gapTime);
|
long prepareTime = ToolsUtil.getEndTimeLong(sGlobalActivity.getStartTimeLong(),sGlobalActivity.getEndTimeLong(),sGlobalActivity.getTime(),0, gapTime);
|
||||||
|
|
|
@ -11,8 +11,6 @@ import com.ljsd.jieling.logic.activity.event.SuperBoxEvent;
|
||||||
import com.ljsd.jieling.logic.dao.UserManager;
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||||
import com.ljsd.jieling.logic.store.newRechargeInfo.bean.AbstractWelfareBag;
|
|
||||||
import com.ljsd.jieling.logic.store.newRechargeInfo.bean.PerpetualWelfareBag;
|
|
||||||
import com.ljsd.jieling.util.ItemUtil;
|
import com.ljsd.jieling.util.ItemUtil;
|
||||||
import com.ljsd.jieling.util.ToolsUtil;
|
import com.ljsd.jieling.util.ToolsUtil;
|
||||||
import config.*;
|
import config.*;
|
||||||
|
@ -74,26 +72,26 @@ public class WeekCardActivity extends AbstractActivity {
|
||||||
/**
|
/**
|
||||||
* 刷新礼包信息
|
* 刷新礼包信息
|
||||||
*/
|
*/
|
||||||
private void refreshGood(User user){
|
// private void refreshGood(User user){
|
||||||
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
// SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(id);
|
||||||
if (activity == null){
|
// if (activity == null){
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
int[] canBuyRechargeId = activity.getCanBuyRechargeId();
|
// int[] canBuyRechargeId = activity.getCanBuyRechargeId();
|
||||||
if (canBuyRechargeId == null || canBuyRechargeId.length <= 0){
|
// if (canBuyRechargeId == null || canBuyRechargeId.length <= 0){
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
Map<Integer, AbstractWelfareBag> receiveMap = user.getPlayerInfoManager().getNewRechargeInfo().getReceiveMap();
|
// Map<Integer, AbstractWelfareBag> receiveMap = user.getPlayerInfoManager().getNewRechargeInfo().getReceiveMap();
|
||||||
for (int goodId : canBuyRechargeId) {
|
// for (int goodId : canBuyRechargeId) {
|
||||||
AbstractWelfareBag bag = receiveMap.get(goodId);
|
// AbstractWelfareBag bag = receiveMap.get(goodId);
|
||||||
if (bag == null){
|
// if (bag == null){
|
||||||
LOGGER.error("礼包刷新结束,礼包不存在,活动id:{},礼包id:{}",id, canBuyRechargeId[0]);
|
// LOGGER.error("礼包刷新结束,礼包不存在,活动id:{},礼包id:{}",id, canBuyRechargeId[0]);
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
PerpetualWelfareBag welfareBag = (PerpetualWelfareBag) bag;
|
// PerpetualWelfareBag welfareBag = (PerpetualWelfareBag) bag;
|
||||||
welfareBag.refresh();
|
// welfareBag.refresh();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 封装周卡信息
|
* 封装周卡信息
|
||||||
|
|
|
@ -51,8 +51,12 @@ public class WeekCardLogic {
|
||||||
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
SGlobalActivity activity = SGlobalActivity.getsGlobalActivityMap().get(activityId);
|
||||||
long createTime = user.getPlayerInfoManager().getCreateTime();
|
long createTime = user.getPlayerInfoManager().getCreateTime();
|
||||||
// 计算间隔时间
|
// 计算间隔时间
|
||||||
|
long now = TimeUtils.now();
|
||||||
long startTimeLong = ToolsUtil.getTimeLong(activity.getStartTimeLong(),activity.getEndTimeLong(),activity.getTime(),createTime,1);
|
long startTimeLong = ToolsUtil.getTimeLong(activity.getStartTimeLong(),activity.getEndTimeLong(),activity.getTime(),createTime,1);
|
||||||
int days = TimeUtils.differentDays(startTimeLong, TimeUtils.now())+1;
|
long cycleTime = activity.getCycleMinute() * TimeUtils.ONE_MINUTE;
|
||||||
|
long latelyStartTime = TimeUtils.getLatelyTime(startTimeLong, now, cycleTime);
|
||||||
|
|
||||||
|
int days = TimeUtils.differentDays(latelyStartTime, now)+1;
|
||||||
|
|
||||||
for (int[] ints : sWeekcardConfig.getBaseRewardID()) {
|
for (int[] ints : sWeekcardConfig.getBaseRewardID()) {
|
||||||
int day = ints[0];
|
int day = ints[0];
|
||||||
|
@ -77,8 +81,6 @@ public class WeekCardLogic {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询周卡信息
|
* 查询周卡信息
|
||||||
* @param user
|
|
||||||
* @param activtiyId
|
|
||||||
*/
|
*/
|
||||||
public void queryWeekCardInfo(User user, int activtiyId){
|
public void queryWeekCardInfo(User user, int activtiyId){
|
||||||
ArrayList<CommonProto.WeekCardInfo> list = new ArrayList<>();
|
ArrayList<CommonProto.WeekCardInfo> list = new ArrayList<>();
|
||||||
|
@ -93,9 +95,6 @@ public class WeekCardLogic {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领取周卡奖励
|
* 领取周卡奖励
|
||||||
* @param user
|
|
||||||
* @param proto
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
*/
|
||||||
public void getWeekCardReward(User user, PlayerInfoProto.GetWeekCardRewardRequest proto) throws Exception {
|
public void getWeekCardReward(User user, PlayerInfoProto.GetWeekCardRewardRequest proto) throws Exception {
|
||||||
Map<Integer, Integer> map = user.getPlayerInfoManager().getWeekCard().get(proto.getWeekcardId());
|
Map<Integer, Integer> map = user.getPlayerInfoManager().getWeekCard().get(proto.getWeekcardId());
|
||||||
|
@ -136,9 +135,6 @@ public class WeekCardLogic {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送
|
* 推送
|
||||||
* @param user
|
|
||||||
* @param weekCardId
|
|
||||||
* @param activityId
|
|
||||||
*/
|
*/
|
||||||
public void weekCardInfoIndication(User user, int weekCardId, int activityId){
|
public void weekCardInfoIndication(User user, int weekCardId, int activityId){
|
||||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||||
|
|
Loading…
Reference in New Issue