修改激活接口
This commit is contained in:
parent
8b6b184863
commit
37fa991a9f
@ -486,7 +486,7 @@ func BundleActivate(ids []uint32) error {
|
||||
}
|
||||
balance.ExpiredAt = balance.ExpiredAt.Add(time.Since(balance.StartAt))
|
||||
balance.StartAt = time.Now()
|
||||
if err := tx.Model(&model.BundleBalance{}).Save(balance).Error; err != nil {
|
||||
if err := tx.Model(&model.BundleBalance{}).Where("id = ?", balance.ID).Save(balance).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return tx.Model(&model.BundleActivate{}).Where("user_id = ?", v).Create(&model.BundleActivate{UserId: int(v), Activate: 2}).Error
|
||||
|
Loading…
Reference in New Issue
Block a user