Merge branch 'master_prb_gn' into master_test_gn

back_recharge
lvxinran 2021-05-08 17:12:59 +08:00
commit 9f0900a5a2
8 changed files with 46 additions and 30 deletions

View File

@ -4,6 +4,7 @@ import com.google.gson.Gson;
import com.ljsd.jieling.config.json.SDK37Constans;
import com.ljsd.jieling.config.reportData.DataMessageUtils;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
import com.ljsd.jieling.util.MD5Util;
import util.TimeUtils;
@ -38,7 +39,7 @@ public class Repot37EventUtil {
report37RoleLeveBean.setRole_grade_u_time(TimeUtils.getTimeStamp(System.currentTimeMillis()));
report37RoleLeveBean.setRole_grade_desc("null");
report37RoleLeveBean.setBalance("null");//todo
report37RoleLeveBean.setTotal_pay_amoun(String.valueOf(user.getPlayerInfoManager().getNewRechargeInfo().getRr()*100));
report37RoleLeveBean.setTotal_pay_amoun(String.valueOf(BuyGoodsNewLogic.getAllAmount(user) *100));
report37RoleLeveBean.setTotal_online_time(user.getPlayerInfoManager().getOnlineTime());
report37RoleLeveBean.setGuild_id("");//todo
report37RoleLeveBean.setGuild_name("0");//todo

View File

@ -205,7 +205,7 @@ public class GetPlayerInfoHandler extends BaseHandler{
.setQuestionState(questState)
.setSoulEquipPool(equipPool)
.addAllPlayedMapTypes(mapManager.getPlayedMapType())
.setAmount(newRechargeInfo.getRr())
.setAmount(BuyGoodsNewLogic.getAllAmount(user))
.setVipDaily(playerInfoManager.getHadTakeDailyBoxVip())
.setMissingRefreshCount(vipPrivilageValue)
.addAllMonthinfos(PlayerLogic.getInstance().getMonthCardInfo(user))

View File

@ -1,6 +1,7 @@
package com.ljsd.jieling.ktbeans.reportEvent;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
import java.util.Date;
import java.util.HashMap;
@ -19,10 +20,10 @@ public class ChargeAmountEventHandler extends CommonEventHandler {
Map<String, Object> setOnceProperties = new HashMap<>();
setProperties.put("charge_amount",user.getPlayerInfoManager().getNewRechargeInfo().getRr());
setProperties.put("charge_amount", BuyGoodsNewLogic.getAllAmount(user));
setProperties.put("last_recharge_time",new Date());
setOnceProperties.put("first_charge_time",new Date());
setOnceProperties.put("first_charge_amount",user.getPlayerInfoManager().getNewRechargeInfo().getRr());
setOnceProperties.put("first_charge_amount",BuyGoodsNewLogic.getAllAmount(user));
userProperties.put(1,setProperties);
userProperties.put(2,setOnceProperties);
return userProperties;

View File

@ -73,8 +73,8 @@ public class PlayerManager extends MongoBase {
private Set<Integer> reds = new CopyOnWriteArraySet<>();
// private RechargeInfo rechargeInfo;
private NewRechargeInfo newRechargeInfo = new NewRechargeInfo();
private RechargeInfo rechargeInfo;
private NewRechargeInfo newRechargeInfo;
private Map<Integer,Integer> monthCard = new HashMap<>();//月卡信息
private Set<Integer> monthCardDailyTake = new HashSet<>();
@ -467,9 +467,9 @@ public class PlayerManager extends MongoBase {
removeString(getMongoKey() +".vipInfo."+privilageId);
}
// public RechargeInfo getRechargeInfo() {
// return rechargeInfo;
// }
public RechargeInfo getRechargeInfo() {
return rechargeInfo;
}
//
// public void setRechargeInfo(RechargeInfo rechargeInfo) {
// rechargeInfo.init(this.getRootId(), getMongoKey()+".rechargeInfo");

View File

@ -1,15 +1,14 @@
//package com.ljsd.jieling.logic.dao;
package com.ljsd.jieling.logic.dao;
import com.ljsd.common.mogodb.MongoBase;
import io.netty.util.internal.ConcurrentSet;
import org.springframework.data.annotation.Transient;
import java.util.*;
public class RechargeInfo extends MongoBase{
//
//import com.ljsd.common.mogodb.MongoBase;
//import config.SRechargeCommodityConfig;
//import io.netty.util.internal.ConcurrentSet;
//import org.springframework.data.annotation.Transient;
//
//import java.util.*;
//
//public class RechargeInfo extends MongoBase{
//
// private double saveAmt;//累计充值
private double saveAmt;//累计充值;
//
// private double monthSaveAmt ; //月卡累计总额
// private double smonthSaveAmt ; //豪华月卡累计总额
@ -144,9 +143,9 @@
// }
//
//
// public double getSaveAmt() {
// return saveAmt;
// }
public double getSaveAmt() {
return saveAmt;
}
//
// public long getCreateTime() {
// return createTime;
@ -270,4 +269,4 @@
// }
//
//
//}
}

View File

@ -21,6 +21,7 @@ import com.ljsd.jieling.logic.activity.event.NewWelfareEvent;
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
import com.ljsd.jieling.logic.activity.event.Poster;
import com.ljsd.jieling.logic.dao.PlayerManager;
import com.ljsd.jieling.logic.dao.RechargeInfo;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.VipInfo;
import com.ljsd.jieling.logic.dao.root.User;
@ -63,19 +64,31 @@ public class BuyGoodsNewLogic {
return RechargeType.getHandler(type);
}
//获取充值总金额,结合前面的
public static double getAllAmount(User user){
PlayerManager playerInfoManager = user.getPlayerInfoManager();
NewRechargeInfo newRechargeInfo = playerInfoManager.getNewRechargeInfo();
RechargeInfo rechargeInfo = playerInfoManager.getRechargeInfo();
double amount = newRechargeInfo.getRr();
if(rechargeInfo!=null){
amount+=rechargeInfo.getSaveAmt();
}
return amount;
}
/**
*
*/
public static boolean refreshWelfareState(User user) throws Exception {
dailyRefresh(user);
sendDailyMailReward(user);
boolean needChange = false;
List<AbstractWelfareBag> pAddList = new ArrayList<>();
NewRechargeInfo info = user.getPlayerInfoManager().getNewRechargeInfo();
if(info == null){
info = new NewRechargeInfo();
user.getPlayerInfoManager().setNewRechargeInfo(info);
}
dailyRefresh(user);
sendDailyMailReward(user);
boolean needChange = false;
List<AbstractWelfareBag> pAddList = new ArrayList<>();
for(Map.Entry<Integer,SRechargeCommodityNewConfig> entry : SRechargeCommodityNewConfig.configMap.entrySet()){
//获取处理类
RechargeHandler rechargeHandler = getRechargeHandler(entry.getValue().getOtype());

View File

@ -559,7 +559,7 @@ public class StoreLogic implements IEventHandler {
int[] buyRule = sStoreConfig.getBuyRule();
if(buyRule!=null&&buyRule.length>0){
//充值金额购买条件判断
if(buyRule[0]==1&&playerInfoManager.getNewRechargeInfo().getRr()<buyRule[1]){
if(buyRule[0]==1&&BuyGoodsNewLogic.getAllAmount(user)<buyRule[1]){
return "充值金额不足,无权购买";
}
}

View File

@ -197,7 +197,7 @@ public class MinuteTask extends Thread {
for(Map.Entry<Integer,GuildInfo> guildInfoEntry:guildInfoMap.entrySet()){
RedisUtil.getInstence().del(RedisKey.getKey(RedisKey.GUILD_RED_PACKAGE_RANK,String.valueOf(guildInfoEntry.getKey()),false));
guildInfoEntry.getValue().reSetFete();
LOGGER.info("{}更新公会祭祀完毕",guildInfoEntry.getValue().getName());
SimpleTransaction transaction = SimpleTransaction.current();
GuildInfo guildInfo = guildInfoEntry.getValue();
Set<Integer> sendUids = new HashSet<>();
@ -218,6 +218,8 @@ public class MinuteTask extends Thread {
guildMyInfo.setGuildHelpReward(false);
guildMyInfo.setGuildHelpTime(0);
}
LOGGER.info("{}更新公会援助完毕",guildInfoEntry.getValue().getName());
SimpleTransaction.remove();
//处理公会援助信息