|
|
@@ -13,6 +13,9 @@ func AddSettleOrder(eg *xorm.Engine, req md.DayLuckDrawOrderJackpotReq) error { |
|
|
|
return nil |
|
|
|
} |
|
|
|
drawSetting := db.GetDayLuckDrawSetting(eg) |
|
|
|
if drawSetting.Source == "amount" { |
|
|
|
return nil |
|
|
|
} |
|
|
|
req.Bili = drawSetting.CommissionBili |
|
|
|
req.Commission = zhios_day_luck_draw_utils.Float64ToStrByPrec(zhios_day_luck_draw_utils.StrToFloat64(req.Commission)*(zhios_day_luck_draw_utils.StrToFloat64(req.Bili)/100), 7) |
|
|
|
err := db.AddSettle(eg, req) |
|
|
@@ -27,6 +30,9 @@ func AddSettleOrderSess(sess *xorm.Session, req md.DayLuckDrawOrderJackpotReq) e |
|
|
|
return nil |
|
|
|
} |
|
|
|
drawSetting := db.GetDayLuckDrawSettingSess(sess) |
|
|
|
if drawSetting.Source == "amount" { |
|
|
|
return nil |
|
|
|
} |
|
|
|
req.Bili = drawSetting.CommissionBili |
|
|
|
req.Commission = zhios_day_luck_draw_utils.Float64ToStrByPrec(zhios_day_luck_draw_utils.StrToFloat64(req.Commission)*(zhios_day_luck_draw_utils.StrToFloat64(req.Bili)/100), 7) |
|
|
|
err := db.AddSettleSess(sess, req) |
|
|
|