Kaynağa Gözat

更新

master
huangjiajun 11 ay önce
ebeveyn
işleme
8970e8be90
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. +2
    -2
      rule/consume_integral_settlement.go

+ 2
- 2
rule/consume_integral_settlement.go Dosyayı Görüntüle

@@ -133,7 +133,7 @@ func DailySettlementBlockConsumeIntegral(engine *xorm.Engine, mid string, isTask
}
var experienceTotalMap = make(map[int]decimal.Decimal)
var experienceTotalCountMap = make(map[int]int)
if hasExperienceTotal > 0 {
if hasExperienceTotal > 0 && consumeValue > 0 {
experienceValue, err = calcNowEverydayExperienceIntegral(consumeValue)
if err != nil {
_ = session.Rollback()
@@ -203,7 +203,7 @@ func calcNowEverydayConsumeIntegral(subsidyBase *model.SubsidyBase, hasConsumeTo

//计算当前体验积分价值(当前消费积分价值 * 10%)
func calcNowEverydayExperienceIntegral(consumeValue float64) (value float64, err error) {
value = consumeValue * 0.1
value, _ = decimal.NewFromFloat(consumeValue * 0.1).RoundFloor(2).Float64()
////2、通过公式计算 "((资金池的金额 * 浮动比例) / 体验补贴总数) + 基础补贴"
//experienceMoney, _ := decimal.NewFromString(subsidyBase.ExperienceTotalMoney)
//baseSubsidyMoney, _ := decimal.NewFromString(subsidyBase.BaseSubsidyMoney)


Yükleniyor…
İptal
Kaydet