lvxinran 2020-08-30 21:15:02 +08:00
commit 237317a677
16 changed files with 155 additions and 176 deletions

View File

@ -3,6 +3,7 @@ package util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
@ -367,4 +368,10 @@ public class MathUtils {
return result;
}
public static double doubleAdd(double d1 ,double d2){
BigDecimal b1 = new BigDecimal(Double.toString(d1));
BigDecimal b2 = new BigDecimal(Double.toString(d2));
return b1.add(b2).doubleValue();
}
}

View File

@ -85,118 +85,7 @@ public class Cmd_changename extends GmRoleAbstract {
}
}
if("recharge".equals(args[2])){
Gson gson = new Gson();
Map<String,String> rechargeInfoMap = new HashMap<>();
Map<Integer,Integer> realBuyGoodsTimes = new HashMap<>();
Map<Integer,Integer> hotGoods = new HashMap<>();
rechargeInfoMap= gson.fromJson(args[3],rechargeInfoMap.getClass());
String rechargeInfoFileStr = rechargeInfoMap.get(String.valueOf(user.getId()));
if(rechargeInfoFileStr == null){
return false;
}
RechargeInfo rechargeInfoFile = gson.fromJson(rechargeInfoFileStr,RechargeInfo.class);
realBuyGoodsTimes = rechargeInfoFile.getBuyGoodsTimes();
hotGoods=new HashMap<>(realBuyGoodsTimes);
Map<Integer,Integer> oldBuyGoodsTimes = user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes();
for (Map.Entry<Integer,Integer> entry:oldBuyGoodsTimes.entrySet() ) {
if(realBuyGoodsTimes.containsKey(entry.getKey())){
int finalvalue = realBuyGoodsTimes.get(entry.getKey())-entry.getValue();
if(finalvalue==0){
realBuyGoodsTimes.remove(entry.getKey());
}else if(finalvalue>0){
realBuyGoodsTimes.put(entry.getKey(),finalvalue);
}else {
//日志记录不对
LOGGER.info("cmd_________recharge:err");
return false;
}
}
}
int hotRechargeMoney = 0;
for (Map.Entry<Integer,Integer> entry:realBuyGoodsTimes.entrySet()) {
if(entry.getKey()==1||entry.getKey()==2||entry.getKey()==3||entry.getKey()==4||entry.getKey()==5||entry.getKey()==13||entry.getKey()==14||entry.getKey()==15||entry.getKey()==16){
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(entry.getKey());
int price =sRechargeCommodityConfig.getPrice();
hotRechargeMoney+=entry.getValue()*price;
}
}
//月卡
boolean mulvip =false;
if(realBuyGoodsTimes.containsKey(9)||realBuyGoodsTimes.containsKey(10)||realBuyGoodsTimes.containsKey(11)){
mulvip =true;
}
RechargeInfo rechargeInfo = user.getPlayerInfoManager().getRechargeInfo();
int saveAmt = rechargeInfo.getSaveAmt();
//成长礼金
if(realBuyGoodsTimes.containsKey(7)||realBuyGoodsTimes.containsKey(8)){
// if(!user.getActivityManager().getActivityMissionMap().containsKey(6)){
ActivityLogic.getInstance().openActivityReallyOpen(user, ActivityType.GrowthFund);
//}
}
// int[][] costItemArr = StringUtil.parseFiledInt2(rewardStr);
// for (int i = 0; i <costItemArr.length ; i++) {
// if(costItemArr[i][0]==Global.SOULCRYSTAL){
// rechargeInfo.addSoulCrystalAmt(costItemArr[i][1]);
// }
// }
//充值金额
rechargeInfo.setSaveAmt(hotRechargeMoney+saveAmt);
//累计充值
// ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RechargeTotal,rechargeInfo.getSaveAmt());
//限时累计充值
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_NUM,hotRechargeMoney);
Map<Integer, Integer> goodsDurationMap = user.getPlayerInfoManager().getRechargeInfo().getGoodsDurationMap();
Integer nowTime =(int)(System.currentTimeMillis()/1000);
for(Integer goodsId : hotGoods.keySet()){
if(goodsDurationMap.containsKey(goodsId)){
LOGGER.info("the uid={} already send the goods={}",user.getId(),goodsId);
continue;
}
SRechargeCommodityConfig sRechargeCommodityConfig = SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsId);
int goodsType = sRechargeCommodityConfig.getType();
if(goodsType == GiftGoodsType.MONTHCARD || goodsType == GiftGoodsType.LUXURYMONTHCARD || goodsType == GiftGoodsType.WEEKCARD){
Integer endTime = null;
boolean needSendMail = false;
for(Map.Entry<Integer,Integer> goodsDurationItem : goodsDurationMap.entrySet()){
if(SRechargeCommodityConfig.rechargeCommodityConfigMap.get(goodsDurationItem.getKey()).getType() == goodsType){
endTime = goodsDurationItem.getValue();
}
}
if(endTime == null || nowTime>endTime){
endTime = nowTime;
needSendMail = true;
}
endTime +=sRechargeCommodityConfig.getContiueDays() * 24 * 3600;
rechargeInfo.updateGoodsTypeDuration(sRechargeCommodityConfig.getId(),endTime);
if(needSendMail){
int[] openPrivilege = sRechargeCommodityConfig.getOpenPrivilege();
if(openPrivilege!=null && openPrivilege.length>0){
for(int privilege:openPrivilege){
user.getPlayerInfoManager().addVipInfo(privilege);
}
}
}
}
}
user.getPlayerInfoManager().getRechargeInfo().setBuyGoodsTimes(hotGoods);
LOGGER.info("cmd_________recharge:hotRechargeMoney"+hotRechargeMoney+"重复月卡:"+mulvip);
}
}

View File

@ -3,6 +3,7 @@ package com.ljsd.jieling.logic.activity;
import com.ljsd.jieling.jbean.ActivityMission;
import com.ljsd.jieling.jbean.ActivityProgressInfo;
import com.ljsd.jieling.logic.OnlineUserManager;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.network.session.ISession;
import config.SActivityRewardConfig;
@ -43,7 +44,10 @@ class DailyRechargeActivity extends AbstractActivity {
@Override
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
return checkValue(session, sActivityRewardConfig, activityProgressInfo);
int[][] values = sActivityRewardConfig.getValues();
User user = UserManager.getUser(session.getUid());
int value = user.getActivityManager().getActivityMissionMap().get(sActivityRewardConfig.getActivityId()).getV();
return value/1000 >= values[0][0];
}
@Override

View File

@ -77,7 +77,7 @@ public class LuckyCatActivity extends AbstractActivity {
throw new ErrorCodeException(ErrorCode.CFG_NULL);
}
if (activityMission.getV() < sLuckyRewardConfig.getRmbValue()) {
if (activityMission.getV()/1000 < sLuckyRewardConfig.getRmbValue()) {
throw new ErrorCodeException(ErrorCode.newDefineCode("value illegality"));
}

View File

@ -3,6 +3,7 @@ package com.ljsd.jieling.logic.activity;
import com.ljsd.jieling.jbean.ActivityMission;
import com.ljsd.jieling.jbean.ActivityProgressInfo;
import com.ljsd.jieling.logic.OnlineUserManager;
import com.ljsd.jieling.logic.dao.UserManager;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.network.session.ISession;
import config.SActivityRewardConfig;
@ -31,7 +32,10 @@ class RechargeSumActivity extends AbstractActivity {
@Override
boolean takeRewardsProcess(ISession session, SActivityRewardConfig sActivityRewardConfig, ActivityProgressInfo activityProgressInfo) throws Exception {
return checkValue(session, sActivityRewardConfig, activityProgressInfo);
int[][] values = sActivityRewardConfig.getValues();
User user = UserManager.getUser(session.getUid());
int value = user.getActivityManager().getActivityMissionMap().get(sActivityRewardConfig.getActivityId()).getV();
return value/1000 >= values[0][0];
}
}

View File

@ -38,7 +38,7 @@ class RechargeSumDayActivity extends AbstractActivity {
if (activityProgressInfo == null || activityProgressInfo.getProgrss() == 1) {
return;
}
if (count >= SActivityRewardConfig.getsActivityRewardConfigByMissionId(missionId).getValues()[0][0]) {
if (count/1000 >= SActivityRewardConfig.getsActivityRewardConfigByMissionId(missionId).getValues()[0][0]) {
activityProgressInfo.setProgrss(1);
}

View File

@ -22,7 +22,7 @@ class RechargeTotalActivity extends AbstractActivity {
User user = UserManager.getUser(session.getUid());
RechargeInfo rechargeInfo = user.getPlayerInfoManager().getRechargeInfo();
int days = TimeUtils.differentDaysByHour(rechargeInfo.getCreateTime(), now,5) + 1;
if (missionProgress < values[0][0] || days < values[0][1]) {
if (missionProgress/1000 < values[0][0] || days < values[0][1]) {
return false;
}
return true;

View File

@ -46,8 +46,8 @@ public class LeveGiftEventHander implements IEventHandler {
return;
}
RechargeInfo rechargeInfo = user.getPlayerInfoManager().getRechargeInfo();
int saveAmt = rechargeInfo.getSaveAmt();
Map.Entry<Integer, Integer> entry = SRechargeCommodityConfig.rechargePlayerLevelMap.floorEntry(saveAmt);
double saveAmt = rechargeInfo.getSaveAmt();
Map.Entry<Integer, Integer> entry = SRechargeCommodityConfig.rechargePlayerLevelMap.floorEntry((int)saveAmt);
SRechargeCommodityConfig orDefault = STableManager.getConfig(SRechargeCommodityConfig.class).getOrDefault(entry.getValue(), null);
if(orDefault==null){
return;

View File

@ -8,6 +8,7 @@ import com.ljsd.jieling.logic.dao.root.User;
import config.SMonthcardConfig;
import config.SPrivilegeTypeConfig;
import manager.STableManager;
import util.MathUtils;
import util.TimeUtils;
import java.util.*;
@ -85,7 +86,7 @@ public class PlayerManager extends MongoBase {
private int signTotay;//今天是否签到
private int rechargedaily;
private double rechargedaily;
private long onlineTime;
@ -487,17 +488,17 @@ public class PlayerManager extends MongoBase {
return signTotay;
}
public int getRechargedaily() {
public double getRechargedaily() {
return rechargedaily;
}
public void setRechargedaily(int rechargedaily) {
public void setRechargedaily(double rechargedaily) {
updateString("rechargedaily", rechargedaily);
this.rechargedaily = rechargedaily;
}
public void addRechargedaily(int rechargedaily) {
this.rechargedaily += rechargedaily;
public void addRechargedaily(double rechargedaily) {
this.rechargedaily = MathUtils.doubleAdd(rechargedaily,this.rechargedaily);
updateString("rechargedaily", this.rechargedaily);
}

View File

@ -9,10 +9,12 @@ import java.util.*;
public class RechargeInfo extends MongoBase{
private int saveAmt;//累计充值
private double saveAmt;//累计充值
private int soulCrystalAmt;//累计充值购买魂晶
private int monthSaveAmt ; //月卡累计总额
private int smonthSaveAmt ; //豪华月卡累计总额
private double monthSaveAmt ; //月卡累计总额
private double smonthSaveAmt ; //豪华月卡累计总额
private int isFirst;
private long createTime;
private int isDayFirst;
@ -95,7 +97,7 @@ public class RechargeInfo extends MongoBase{
return false;
}
public void setSaveAmt(int saveAmt){
public void setSaveAmt(double saveAmt){
if(this.saveAmt == 0){
createTime = System.currentTimeMillis();
updateString("createTime",createTime);
@ -143,7 +145,7 @@ public class RechargeInfo extends MongoBase{
}
public int getSaveAmt() {
public double getSaveAmt() {
return saveAmt;
}
@ -180,14 +182,14 @@ public class RechargeInfo extends MongoBase{
this.goodseSendDailyMap.put(goodsType,sendTime);
}
public int getSoulCrystalAmt() {
return soulCrystalAmt;
}
public void addSoulCrystalAmt(int soulCrystalAmt) {
this.soulCrystalAmt += soulCrystalAmt;
updateString("soulCrystalAmt",soulCrystalAmt);
}
// public int getSoulCrystalAmt() {
// return soulCrystalAmt;
// }
//
// public void addSoulCrystalAmt(int soulCrystalAmt) {
// this.soulCrystalAmt += soulCrystalAmt;
// updateString("soulCrystalAmt",soulCrystalAmt);
// }
public Map<Integer, Long> getTypeBagMap() {
return typeBagMap;
@ -243,20 +245,20 @@ public class RechargeInfo extends MongoBase{
updateString("refreshBagMap", refreshBagMap);
}
public int getMonthSaveAmt() {
public double getMonthSaveAmt() {
return monthSaveAmt;
}
public void setMonthSaveAmt(int monthSaveAmt) {
public void setMonthSaveAmt(double monthSaveAmt) {
this.monthSaveAmt = monthSaveAmt;
updateString("monthSaveAmt",monthSaveAmt);
}
public int getSmonthSaveAmt() {
public double getSmonthSaveAmt() {
return smonthSaveAmt;
}
public void setSmonthSaveAmt(int smonthSaveAmt) {
public void setSmonthSaveAmt(double smonthSaveAmt) {
this.smonthSaveAmt = smonthSaveAmt;
updateString("smonthSaveAmt",smonthSaveAmt);
}

View File

@ -938,7 +938,7 @@ public class PlayerLogic {
STableManager.getConfig(SMonthcardConfig.class).forEach((integer, sMonthcardConfig) -> {
int time = playerInfoManager.getMonthCard().getOrDefault(integer,0);
int state = playerInfoManager.getMonthCardDailyTake().contains(integer)?1:0;
int saveAmt = integer==1?rechargeInfo.getMonthSaveAmt():rechargeInfo.getSmonthSaveAmt();
double saveAmt = integer==1?rechargeInfo.getMonthSaveAmt():rechargeInfo.getSmonthSaveAmt();
cardInfos.add(CommonProto.MonthCardInfo.newBuilder().setId(integer).setEndingTime(time).setState(state).setTotleAmt(saveAmt).build());
});
return cardInfos;

View File

@ -39,9 +39,11 @@ import config.*;
import manager.STableManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import util.MathUtils;
import util.StringUtil;
import util.TimeUtils;
import java.math.BigDecimal;
import java.util.*;
/**
@ -73,12 +75,12 @@ public class BuyGoodsLogic {
}
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.TEST_BUY_GIGT_GOODS_RESPONSE_VALUE,null,true);
Result result = sendGoods(uid, goodsId, "gm-test", "111111", System.currentTimeMillis(), -999);
User user = UserManager.getUser(uid);
int price =sRechargeCommodityConfig.getPrice();
int isDiscount = sRechargeCommodityConfig.getIsDiscount();
if(isDiscount!=0){
price=(int)(sRechargeCommodityConfig.getPrice() * (10 + isDiscount)/10f);
}
// User user = UserManager.getUser(uid);
// int price =sRechargeCommodityConfig.getPrice();
// int isDiscount = sRechargeCommodityConfig.getIsDiscount();
// if(isDiscount!=0){
// price=(int)(sRechargeCommodityConfig.getPrice() * (10 + isDiscount)/10f);
// }
List<Integer> itemList = new ArrayList<>();
for(int[] item:sRechargeCommodityConfig.getBaseReward()){
itemList.add(item[0]);
@ -108,7 +110,9 @@ public class BuyGoodsLogic {
if(buyCount ==null){
buyCount = 0;
}
int price =sRechargeCommodityConfig.getPrice();
double priceTemp =sRechargeCommodityConfig.getPrice();
SExchangeRate sExchangeRate = STableManager.getConfig(SExchangeRate.class).get(priceTemp);
double price = sExchangeRate.getPrice_2();
buyCount=buyCount+1;
//time check
@ -171,11 +175,11 @@ public class BuyGoodsLogic {
int monthline = STableManager.getConfig(SMonthcardConfig.class).get(Global.MONTHCARDID).getPrice();
int lmonthline = STableManager.getConfig(SMonthcardConfig.class).get(Global.LMONTHCARDID).getPrice();
boolean sendneed =false;
if(rechargeInfo.getMonthSaveAmt()<monthline&&(price+rechargeInfo.getMonthSaveAmt())>=monthline){
if(rechargeInfo.getMonthSaveAmt()<monthline&&(MathUtils.doubleAdd(price,rechargeInfo.getMonthSaveAmt()))>=monthline){
sendneed=true;
user.getPlayerInfoManager().getMonthCard().put(Global.MONTHCARDID, (int) (System.currentTimeMillis() / 1000));
}
if(rechargeInfo.getSmonthSaveAmt()<lmonthline&&(price+rechargeInfo.getSmonthSaveAmt())>=lmonthline){
if(rechargeInfo.getSmonthSaveAmt()<lmonthline&&(MathUtils.doubleAdd(price,rechargeInfo.getSmonthSaveAmt()))>=lmonthline){
sendneed=true;
user.getPlayerInfoManager().getMonthCard().put(Global.LMONTHCARDID, (int) (System.currentTimeMillis() / 1000));
Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),Global.LMONTHCARDID));
@ -247,30 +251,31 @@ public class BuyGoodsLogic {
rewardStr = ItemUtil.getMailReward(baseReward);
}
if(sRechargeCommodityConfig.getAccumulativeRecharge() == 1){
int saveAmt = rechargeInfo.getSaveAmt();
if(!StringUtil.isEmpty(rewardStr)){
int[][] costItemArr = StringUtil.parseFiledInt2(rewardStr);
for (int i = 0; i <costItemArr.length ; i++) {
if(costItemArr[i][0]==Global.SOULCRYSTAL){
rechargeInfo.addSoulCrystalAmt(costItemArr[i][1]);
}
}
}
rechargeInfo.setSaveAmt(price+saveAmt);
double saveAmt = rechargeInfo.getSaveAmt();
// if(!StringUtil.isEmpty(rewardStr)){
// int[][] costItemArr = StringUtil.parseFiledInt2(rewardStr);
// for (int i = 0; i <costItemArr.length ; i++) {
// if(costItemArr[i][0]==Global.SOULCRYSTAL){
// rechargeInfo.addSoulCrystalAmt(costItemArr[i][1]);
// }
// }
// }
rechargeInfo.setSaveAmt(MathUtils.doubleAdd(price,saveAmt));
user.getPlayerInfoManager().addRechargedaily(price);
user.getPlayerInfoManager().getMonthCard();
rechargeInfo.setMonthSaveAmt(price+rechargeInfo.getMonthSaveAmt());
rechargeInfo.setSmonthSaveAmt(price+rechargeInfo.getSmonthSaveAmt());
rechargeInfo.setMonthSaveAmt(MathUtils.doubleAdd(price,rechargeInfo.getMonthSaveAmt()));
rechargeInfo.setSmonthSaveAmt(MathUtils.doubleAdd(price,rechargeInfo.getSmonthSaveAmt()));
//TODO 用事件分发
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RechargeTotal,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.LUCKYCAT,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.DAILY_RECHARGE,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_NUM,price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_SUM_DAY, user.getPlayerInfoManager().getRechargedaily());
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.FIND_FAIRY_FESTIVAL, price);
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RechargeTotal,(int)(price*1000));
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.LUCKYCAT,(int)(price*1000));
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.DAILY_RECHARGE,(int)(price*1000));
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_NUM,(int)(price*1000));
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RECHARGE_SUM_DAY, (int)(user.getPlayerInfoManager().getRechargedaily()*1000) );
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.FIND_FAIRY_FESTIVAL, (int)(price*1000));
AyyncWorker ayyncWorker = new AyyncWorker(user, true, new AynMissionWorker(GameEvent.RECHARGE_TOTAL,price)) ;
AyyncWorker ayyncWorker = new AyyncWorker(user, true, new AynMissionWorker(GameEvent.RECHARGE_TOTAL,(int)(price*1000))) ;
ProtocolsManager.getInstance().updateAyncWorker(ayyncWorker);
@ -364,7 +369,7 @@ public class BuyGoodsLogic {
return resultRes;
}
private static void onChargeSuccess(int uid,int amount,int virtualAmount,String orderId){
private static void onChargeSuccess(int uid,double amount,int virtualAmount,String orderId){
RechargeEvent rechargeEvent = new RechargeEvent();
rechargeEvent.setModule("GameAnalysis");
rechargeEvent.setIp("");

View File

@ -8,7 +8,7 @@ package com.ljsd.jieling.logic.store;
public class RechargeEventProp {
private String order_id;
private int amount;
private double amount;
private int virtual_currency_amount;
@ -26,7 +26,7 @@ public class RechargeEventProp {
this.order_id = order_id;
}
public int getAmount() {
public double getAmount() {
return amount;
}
@ -66,7 +66,7 @@ public class RechargeEventProp {
this.payment = payment;
}
public RechargeEventProp(String order_id, int amount, int virtual_currency_amount, String currency_type, String product, String payment) {
public RechargeEventProp(String order_id, double amount, int virtual_currency_amount, String currency_type, String product, String payment) {
this.order_id = order_id;
this.amount = amount;
this.virtual_currency_amount = virtual_currency_amount;

View File

@ -43,7 +43,7 @@ public class CBean2Proto {
.setServerTime((int) (System.currentTimeMillis() / 1000))
.setMaxForce(playerManager.getMaxForce())
.setRechargeTime((int) (rechargeInfo.getCreateTime() / 1000))
.setSaveAmt(rechargeInfo.getSaveAmt())
.setSaveAmt((rechargeInfo.getSaveAmt()))
.setIsFirstRecharge(rechargeInfo.getIsFirst())
.setHeadFrame(playerManager.getHeadFrame())
.setDesignation(playerManager.getDesignation())

View File

@ -0,0 +1,67 @@
package config;
import manager.STableManager;
import manager.Table;
import java.util.Map;
@Table(name ="ExchangeRate")
public class SExchangeRate implements BaseConfig {
private int id;
private int price_1;
private float price_2;
private float price_3;
private float price_4;
private float price_5;
private float price_6;
private float price_7;
@Override
public void init() throws Exception {
}
public int getId() {
return id;
}
public int getPrice_1() {
return price_1;
}
public float getPrice_2() {
return price_2;
}
public float getPrice_3() {
return price_3;
}
public float getPrice_4() {
return price_4;
}
public float getPrice_5() {
return price_5;
}
public float getPrice_6() {
return price_6;
}
public float getPrice_7() {
return price_7;
}
}

View File

@ -15,7 +15,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
private int type;
private int price;
private double price;
private int[][] firstMultiple;
@ -128,7 +128,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
return type;
}
public int getPrice() {
public double getPrice() {
return price;
}