Merge branch 'master_prb_gn' into master_test_gn

back_recharge
lvxinran 2021-05-13 17:46:44 +08:00
commit c3749641b3
1 changed files with 11 additions and 5 deletions

View File

@ -430,6 +430,7 @@ public class BuyGoodsNewLogic {
*
*/
public static boolean refreshUnitWF(AbstractWelfareBag bag,User user){
SRechargeCommodityNewConfig configById = SRechargeCommodityNewConfig.getConfigById(bag.getModId());
boolean result = false;
//判断刷新时间
if(bag.getRefreshTime() != 0 && bag.getRefreshTime() < System.currentTimeMillis()){
@ -446,11 +447,16 @@ public class BuyGoodsNewLogic {
user.getPlayerInfoManager().getNewRechargeInfo().removePush((PushWelfareBag) bag);
return true;
}
if(bag.getType() == RechargeType.timeLimit.getType()){//活动类型特殊处理
for(String[] I : bag.getCondition()){
if(I[0].equals("3")){
if(ActivityLogic.checkActivityOpen(user,Integer.parseInt(I[1]))){
long[] time = ActivityLogic.getStartAndEndTime(user,Integer.parseInt(I[1]));
if(bag.getType() == RechargeType.timeLimit.getType()){
//活动类型特殊处理
//todo 其他的也要改 直接读表里的 不读数据库里的
String onSaleRule = configById.getOnSaleRule();
int[] condition = null;
if(!onSaleRule.contains("|")){
condition = StringUtil.parseFiledInt(onSaleRule);
if(condition[0]==3){
if(ActivityLogic.checkActivityOpen(user,condition[1])){
long[] time = ActivityLogic.getStartAndEndTime(user,condition[1]);
bag.setStartTime(time[0]);
bag.setEndTime(time[1]);
bag.setOpen(true);