package sys_user_payment

import (
	"context"
	"kami/internal/dao"
	"kami/internal/service"
	"kami/utility/config"

	"github.com/gogf/gf/v2/database/gdb"
)

// GetNextUser 切换账户
func (s *sSysUserPayment) GetNextUser(ctx context.Context, amount float64, currentUserId string, tx gdb.TX) {
	//	列出所有可用的用户
	var (
		column = dao.V1SysUserPayment.Columns()
	)
	m := dao.V1SysUserPaymentRecords.Ctx(ctx).DB(config.GetDatabaseV1())
	if tx != nil {
		m = m.TX(tx)
	}
	//查询所有正常用户
	user, _ := service.SysUser().GetAllUserNormal(ctx, tx)
	if len(user) == 0 {
		return
	}
	_ = column
	return
}
