Merge branch 'master' of 60.1.1.230:backend/jieling_server

back_recharge
wangyuan 2019-12-12 18:32:58 +08:00
commit f49bfe6f1f
3 changed files with 31 additions and 5 deletions

View File

@ -7,6 +7,7 @@ import com.ljsd.jieling.handler.BaseHandler;
import com.ljsd.jieling.logic.dao.PlayerManager; import com.ljsd.jieling.logic.dao.PlayerManager;
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.store.GiftGoodsType;
import com.ljsd.jieling.network.session.ISession; import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.CommonProto; import com.ljsd.jieling.protocols.CommonProto;
import com.ljsd.jieling.protocols.MessageTypeProto; import com.ljsd.jieling.protocols.MessageTypeProto;
@ -33,6 +34,10 @@ public class VipTakeDailyHandler extends BaseHandler<PlayerInfoProto.VipTakeDily
throw new ErrorCodeException(ErrorCode.CFG_NULL); throw new ErrorCodeException(ErrorCode.CFG_NULL);
} }
if(playerInfoManager.getRechargeInfo().getBuyGoodsTimes().containsKey(GiftGoodsType.LUXURYMONTHCARD)){
throw new ErrorCodeException(ErrorCode.newDefineCode("未激活豪华月卡"));
}
if(playerInfoManager.getHadTakeDailyBoxVip() != -1 ){ if(playerInfoManager.getHadTakeDailyBoxVip() != -1 ){
throw new ErrorCodeException(ErrorCode.newDefineCode("had taked the vip daily reward")); throw new ErrorCodeException(ErrorCode.newDefineCode("had taked the vip daily reward"));
} }

View File

@ -64,15 +64,26 @@ class ExpectRankActivity extends AbstractActivity {
if(null==sActivityRankingReward) if(null==sActivityRankingReward)
return; return;
int maxRank = 0; int maxRank = 0;
int maxRewardId = 0;
Map<Integer, Integer> rank2miss = new HashMap<>(); Map<Integer, Integer> rank2miss = new HashMap<>();
for (SActivityRankingReward sActivityRankingReward1 : sActivityRankingReward) { for (SActivityRankingReward sActivityRankingReward1 : sActivityRankingReward) {
if(sActivityRankingReward1.getMaxRank()==-1){
maxRank =-1;
maxRewardId = sActivityRankingReward1.getId();
continue;
}
if(maxRank!=-1)
{
maxRank = Math.max(maxRank, sActivityRankingReward1.getMaxRank()); maxRank = Math.max(maxRank, sActivityRankingReward1.getMaxRank());
}
for (Integer rank : getRankSet(sActivityRankingReward1.getMinRank(), sActivityRankingReward1.getMaxRank())) { for (Integer rank : getRankSet(sActivityRankingReward1.getMinRank(), sActivityRankingReward1.getMaxRank())) {
rank2miss.put(rank, sActivityRankingReward1.getId()); rank2miss.put(rank, sActivityRankingReward1.getId());
} }
} }
Set<ZSetOperations.TypedTuple<String>> rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.EXPERT_RANK, Integer.toString(id), 0, maxRank - 1); Set<ZSetOperations.TypedTuple<String>> rankInfo = RedisUtil.getInstence().getZsetreverseRangeWithScores(RedisKey.EXPERT_RANK, Integer.toString(id), 0, (maxRank==-1?0:maxRank) - 1);
int rank = 1; int rank = 1;
int nowTime = (int) (TimeUtils.now() / 1000); int nowTime = (int) (TimeUtils.now() / 1000);
for (ZSetOperations.TypedTuple<String> item : rankInfo) { for (ZSetOperations.TypedTuple<String> item : rankInfo) {
@ -86,7 +97,17 @@ class ExpectRankActivity extends AbstractActivity {
if (activityMission == null || activityMission.getOpenType() == 0) { if (activityMission == null || activityMission.getOpenType() == 0) {
continue; continue;
} }
int missionId = rank2miss.get(rank); int missionId ;
if(rank2miss.containsKey(rank)) {
missionId = rank2miss.get(rank);
}else {
if(maxRank==-1){
missionId = maxRewardId;
}else {
continue;
}
}
//check value //check value
SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId); SActivityRankingReward sActivityRankingReward1 = SActivityRankingReward.getsActivityRankingRewardMap().get(missionId);
//sendmail //sendmail

View File

@ -420,7 +420,7 @@ public class StoreLogic {
if(storeId==Global.VIPSTORID){ if(storeId==Global.VIPSTORID){
int vipLeve = user.getPlayerInfoManager().getVipLevel(); int vipLeve = user.getPlayerInfoManager().getVipLevel();
user.getPlayerInfoManager().getHadTakeLevelBoxVip().add(vipLeve); user.getPlayerInfoManager().setHadTakeLevelBoxVip(vipLeve);
} }
PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build(); PlayerInfoProto.BuyStoreItemResponse builder = PlayerInfoProto.BuyStoreItemResponse.newBuilder().setDrop(drop).build();
@ -443,7 +443,7 @@ public class StoreLogic {
if(storeId==Global.VIPSTORID){ if(storeId==Global.VIPSTORID){
int vipLeve = user.getPlayerInfoManager().getVipLevel(); int vipLeve = user.getPlayerInfoManager().getVipLevel();
if(vipLeve<(sStoreConfig.getStoreId()-1)){ if(vipLeve<(sStoreConfig.getSort()-1)){
return "vip leve limit"; return "vip leve limit";
} }
// if(user.getPlayerInfoManager().getHadTakeLevelBoxVip().contains(vipLeve)){ // if(user.getPlayerInfoManager().getHadTakeLevelBoxVip().contains(vipLeve)){