自动生成账单,自动支付账单

This commit is contained in:
GoEdgeLab
2021-11-11 08:30:53 +08:00
parent 4227bfd7fc
commit 5af11ce492
12 changed files with 372 additions and 101 deletions

View File

@@ -194,6 +194,15 @@ func (this *PlanDAO) ListEnabledPlans(tx *dbs.Tx, offset int64, size int64) (res
return
}
// FindAllEnabledPlans 查找所有可用套餐
func (this *PlanDAO) FindAllEnabledPlans(tx *dbs.Tx) (result []*Plan, err error) {
_, err = this.Query(tx).
State(PlanStateEnabled).
Slice(&result).
FindAll()
return
}
// SortPlans 增加排序
func (this *PlanDAO) SortPlans(tx *dbs.Tx, planIds []int64) error {
if len(planIds) == 0 {