新礼包
parent
0b59e617c8
commit
30814f86a5
|
@ -35,10 +35,7 @@ import com.ljsd.jieling.logic.store.newRechargeInfo.bean.*;
|
|||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.thrift.idl.Result;
|
||||
import com.ljsd.jieling.util.AynMissionWorker;
|
||||
import com.ljsd.jieling.util.AyyncWorker;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import com.ljsd.jieling.util.*;
|
||||
import config.*;
|
||||
import manager.STableManager;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -51,10 +48,7 @@ import util.StringUtil;
|
|||
import util.TimeUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 新礼包逻辑
|
||||
|
@ -254,7 +248,7 @@ public class BuyGoodsNewLogic {
|
|||
|
||||
public static void sendGiftGooodsIndication(int uid) throws Exception {
|
||||
List<CommonProto.GiftGoodsInfo> goodsBagInfo = new ArrayList<>(SRechargeCommodityConfig.rechargeCommodityConfigMap.size());
|
||||
boolean change = BuyGoodsLogic.getGoodsBagInfo(uid, goodsBagInfo,false);
|
||||
boolean change = BuyGoodsNewLogic.getGoodsBagInfo(uid, goodsBagInfo);
|
||||
ISession session = OnlineUserManager.getSessionByUid(uid);
|
||||
if(session!=null && change){
|
||||
PlayerInfoProto.AllGiftGoodsIndication build = PlayerInfoProto.AllGiftGoodsIndication.newBuilder().addAllGiftGoodsInfo(goodsBagInfo).build();
|
||||
|
@ -314,7 +308,7 @@ public class BuyGoodsNewLogic {
|
|||
}
|
||||
|
||||
/**
|
||||
* 处理各类型发货
|
||||
* 处理特殊类型发货
|
||||
*/
|
||||
public static void sendGoodsByType(User user,SRechargeCommodityNewConfig config,String rewardStr) throws Exception{
|
||||
ISession session = OnlineUserManager.getSessionByUid(user.getId());
|
||||
|
@ -557,4 +551,25 @@ public class BuyGoodsNewLogic {
|
|||
builder.setDynamicBuyTimes(bag.getLimit() - bag.getBuyTimes());
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
public static void minuteCheckReharge() throws Exception {
|
||||
Map<Integer, ISession> sessionMap = OnlineUserManager.sessionMap;
|
||||
Iterator<ISession> iterator = sessionMap.values().iterator();
|
||||
while(iterator.hasNext()){
|
||||
ISession value = iterator.next();
|
||||
if(value.getFiveReady() == 1){
|
||||
User user = UserManager.getUser(value.getUid(), true);
|
||||
if(user == null){
|
||||
continue;
|
||||
}
|
||||
AyyncWorker ayyncWorker = new AyyncWorker(user, false,new AyncWorkerRunnable(){
|
||||
@Override
|
||||
public void work(User user) throws Exception {
|
||||
sendGiftGooodsIndication(user.getId());
|
||||
}
|
||||
}) ;
|
||||
ProtocolsManager.getInstance().updateAyncWorker(ayyncWorker);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ public interface GiftGoodsType {
|
|||
int WEEKCARD = 7; //周卡
|
||||
int FOUND_ONE = 8; //豪华基金
|
||||
int FOUND_TWO = 9; //豪华基金
|
||||
int RED_PACKET = 10;//红包
|
||||
int SUN_LONG = 11; //豪华基金
|
||||
int SKY_TREASURE = 12; //天宫秘宝
|
||||
|
||||
|
|
|
@ -50,13 +50,5 @@ public class ReceiveWelfareBag extends AbstractWelfareBag {
|
|||
}
|
||||
|
||||
private boolean bought ;
|
||||
private int buyTimes;
|
||||
|
||||
public int getBuyTimes() {
|
||||
return buyTimes;
|
||||
}
|
||||
|
||||
public void setBuyTimes(int buyTimes) {
|
||||
this.buyTimes = buyTimes;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue