支持购买套餐/续费套餐/用户账户操作等

This commit is contained in:
GoEdgeLab
2021-11-08 20:52:15 +08:00
parent 1f9e3e428b
commit dcfba222e2
24 changed files with 582 additions and 14 deletions

View File

@@ -136,3 +136,14 @@ func (this *UserPlanDAO) UpdateUserPlan(tx *dbs.Tx, userPlanId int64, planId int
op.IsOn = isOn
return this.Save(tx, op)
}
// UpdateUserPlanDayTo 修改套餐日期
func (this *UserPlanDAO) UpdateUserPlanDayTo(tx *dbs.Tx, userPlanId int64, dayTo string) error {
if userPlanId <= 0 {
return errors.New("invalid userPlanId")
}
var op = NewUserPlanOperator()
op.Id = userPlanId
op.DayTo = dayTo
return this.Save(tx, op)
}