累计充值钱数修改

back_recharge
lvxinran 2021-05-04 10:22:06 +08:00
parent 0ac4200f7c
commit 575accafa7
7 changed files with 38 additions and 24 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,7 +73,7 @@ public class PlayerManager extends MongoBase {
private Set<Integer> reds = new CopyOnWriteArraySet<>();
// private RechargeInfo rechargeInfo;
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,6 +64,18 @@ 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;
}
/**
*
*/

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 "充值金额不足,无权购买";
}
}