|
|
@ -127,7 +127,7 @@ func (t *LiveCtl) SendLiveRedPack() { |
|
|
|
t.CheckErr(err) |
|
|
|
} |
|
|
|
|
|
|
|
rule := models.LiveRedEnvelopeRule{} |
|
|
|
rule := new(models.LiveRedEnvelopeRule) |
|
|
|
rule.OutTradeNo = res["out_trade_no"].(string) // 彩排为空
|
|
|
|
rule.ActivityId = activityId |
|
|
|
rule.RehearsalId = activity.RehearsalId |
|
|
@ -144,7 +144,7 @@ func (t *LiveCtl) SendLiveRedPack() { |
|
|
|
} |
|
|
|
rule.UpdatedAt = time.Now() |
|
|
|
rule.CreatedAt = time.Now() |
|
|
|
_, err = rule.Add() |
|
|
|
_, err = models.Add(rule) |
|
|
|
t.CheckErr(err) |
|
|
|
|
|
|
|
if activity.RehearsalId != 0 { // 彩排不过钱
|
|
|
@ -171,7 +171,7 @@ func (t *LiveCtl) SendLiveRedPack() { |
|
|
|
record.Amount = utils.Float64CusDecimal(float64(v)/float64(100), 2) |
|
|
|
record.CreatedAt = time.Now() |
|
|
|
record.UpdatedAt = time.Now() |
|
|
|
_, err = record.Add() |
|
|
|
_, err = models.Add(record) |
|
|
|
t.CheckErr(err) |
|
|
|
} |
|
|
|
|
|
|
|