网页支付
parent
1b4426b9e4
commit
ef3c6e81c7
|
@ -634,6 +634,12 @@ public class BuyGoodsNewLogic {
|
|||
return needChange;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网页支付
|
||||
* @param uid
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static Set<Integer> getGoodsBagInfoFromDelive(int uid) throws Exception {
|
||||
User user = UserManager.getUser(uid);
|
||||
Set<Integer> list = new HashSet<>();
|
||||
|
@ -644,7 +650,6 @@ public class BuyGoodsNewLogic {
|
|||
ArrayList<AbstractWelfareBag> welfareBags = new ArrayList<>(rechargeInfo.getPerpetualMap().values());
|
||||
welfareBags.addAll(rechargeInfo.getTimeLimitMap().values());
|
||||
welfareBags.addAll(rechargeInfo.getReceiveMap().values());
|
||||
welfareBags.addAll(rechargeInfo.getPushMap().values());
|
||||
for (AbstractWelfareBag bag : welfareBags) {
|
||||
if(bag.isOpen()){
|
||||
if (bag.getLimit() == 0 || bag.getLimit() > bag.getBuyTimes()){
|
||||
|
@ -653,6 +658,16 @@ public class BuyGoodsNewLogic {
|
|||
}
|
||||
}
|
||||
|
||||
// getLimit方法实现不同,需要特殊处理
|
||||
for (AbstractWelfareBag value : rechargeInfo.getPushMap().values()) {
|
||||
PushWelfareBag bag = (PushWelfareBag) value;
|
||||
if(bag.isOpen()){
|
||||
if (bag.getLimit() == 0 || bag.getLimit() > bag.getBuyTimes()){
|
||||
list.add(bag.getModId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 走表判断开启的礼包
|
||||
Map<Integer, SGlobalActivity> activityMap = SGlobalActivity.getsGlobalActivityMap();
|
||||
Map<Integer, ActivityMission> missionMap = user.getActivityManager().getActivityMissionMap();
|
||||
|
@ -674,7 +689,16 @@ public class BuyGoodsNewLogic {
|
|||
iterator.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
// 一键购买处理
|
||||
if (config.getForbid() != null && config.getForbid().length>0){
|
||||
for (int i : config.getForbid()) {
|
||||
// 已购买任意礼包,不能获取一键购买
|
||||
if (!list.contains(i)){
|
||||
iterator.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String[] open : config.getCondition()) {
|
||||
// 活动未开启的礼包
|
||||
if ("3".equals(open[0])){
|
||||
|
|
|
@ -65,6 +65,7 @@ public class SRechargeCommodityNewConfig implements BaseConfig {
|
|||
|
||||
private String[][] condition;
|
||||
|
||||
private int isRecommond;
|
||||
|
||||
public static Map<Integer,SRechargeCommodityNewConfig> configMap;
|
||||
public static Map<String,SRechargeCommodityNewConfig> sdkconfigMap;
|
||||
|
@ -208,4 +209,8 @@ public class SRechargeCommodityNewConfig implements BaseConfig {
|
|||
public int getIsShowInWeb() {
|
||||
return isShowInWeb;
|
||||
}
|
||||
|
||||
public int getIsRecommond() {
|
||||
return isRecommond;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue