Ver a proveniência

更新

master
huangjiajun há 9 meses
ascendente
cometimento
ffbf31f345
1 ficheiros alterados com 6 adições e 1 eliminações
  1. +6
    -1
      db/db_subsidy_with_month.go

+ 6
- 1
db/db_subsidy_with_month.go Ver ficheiro

@@ -32,7 +32,12 @@ func SubsidyWithMonthInsert(session *xorm.Session, SubsidyWithUserFlow *model.Su
amountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(SubsidyWithUserFlow.ExperienceAmount))
data.ExperienceAmount = userAmountValue.Add(amountValue).RoundFloor(8).String()
}
_, err := session.Where("id=?", data.Id).Cols("consume_amount,experience_amount").Update(&data)
if zhios_order_relate_utils.StrToFloat64(SubsidyWithUserFlow.StoreAmount) > 0 {
userAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(data.StoreAmount))
amountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(SubsidyWithUserFlow.StoreAmount))
data.StoreAmount = userAmountValue.Add(amountValue).RoundFloor(8).String()
}
_, err := session.Where("id=?", data.Id).Cols("consume_amount,experience_amount,store_amount").Update(&data)
if err != nil {
return 0, err
}


Carregando…
Cancelar
Guardar