Documentation ¶
Index ¶
- type UserAccount
- type UserAccountDAO
- func (this *UserAccountDAO) CheckUserAccount(tx *dbs.Tx, userId int64, accountId int64) error
- func (this *UserAccountDAO) CountAllAccounts(tx *dbs.Tx, keyword string) (int64, error)
- func (this *UserAccountDAO) FindUserAccountWithAccountId(tx *dbs.Tx, accountId int64) (*UserAccount, error)
- func (this *UserAccountDAO) FindUserAccountWithUserId(tx *dbs.Tx, userId int64) (*UserAccount, error)
- func (this *UserAccountDAO) ListAccounts(tx *dbs.Tx, keyword string, offset int64, size int64) (result []*UserAccount, err error)
- func (this *UserAccountDAO) PayBills(tx *dbs.Tx) error
- func (this *UserAccountDAO) UpdateUserAccount(tx *dbs.Tx, accountId int64, delta float32, ...) error
- func (this *UserAccountDAO) UpdateUserAccountFrozen(tx *dbs.Tx, userId int64, delta float32, ...) error
- type UserAccountDailyStat
- type UserAccountDailyStatDAO
- func (this *UserAccountDailyStatDAO) FindDailyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*UserAccountDailyStat, err error)
- func (this *UserAccountDailyStatDAO) FindMonthlyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*UserAccountDailyStat, err error)
- func (this *UserAccountDailyStatDAO) UpdateDailyStat(tx *dbs.Tx) error
- type UserAccountDailyStatOperator
- type UserAccountLog
- type UserAccountLogDAO
- func (this *UserAccountLogDAO) CountAccountLogs(tx *dbs.Tx, userId int64, accountId int64, keyword string, eventType string) (int64, error)
- func (this *UserAccountLogDAO) CreateAccountLog(tx *dbs.Tx, userId int64, accountId int64, delta float32, deltaFrozen float32, ...) error
- func (this *UserAccountLogDAO) ListAccountLogs(tx *dbs.Tx, userId int64, accountId int64, keyword string, eventType string, ...) (result []*UserAccountLog, err error)
- func (this *UserAccountLogDAO) SumDailyEventTypes(tx *dbs.Tx, day string, eventTypes []userconfigs.AccountEventType) (float32, error)
- type UserAccountLogOperator
- type UserAccountOperator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserAccount ¶
type UserAccount struct { Id uint64 `field:"id"` // ID UserId uint64 `field:"userId"` // 用户ID Total float64 `field:"total"` // 可用总余额 TotalFrozen float64 `field:"totalFrozen"` // 冻结余额 }
UserAccount 用户账号
type UserAccountDAO ¶
func NewUserAccountDAO ¶
func NewUserAccountDAO() *UserAccountDAO
func (*UserAccountDAO) CheckUserAccount ¶
CheckUserAccount 检查用户账户
func (*UserAccountDAO) CountAllAccounts ¶
CountAllAccounts 计算所有账户数量
func (*UserAccountDAO) FindUserAccountWithAccountId ¶
func (this *UserAccountDAO) FindUserAccountWithAccountId(tx *dbs.Tx, accountId int64) (*UserAccount, error)
FindUserAccountWithAccountId 根据ID查找用户账户
func (*UserAccountDAO) FindUserAccountWithUserId ¶
func (this *UserAccountDAO) FindUserAccountWithUserId(tx *dbs.Tx, userId int64) (*UserAccount, error)
FindUserAccountWithUserId 根据用户ID查找用户账户
func (*UserAccountDAO) ListAccounts ¶
func (this *UserAccountDAO) ListAccounts(tx *dbs.Tx, keyword string, offset int64, size int64) (result []*UserAccount, err error)
ListAccounts 列出单页账户
func (*UserAccountDAO) PayBills ¶
func (this *UserAccountDAO) PayBills(tx *dbs.Tx) error
PayBills 尝试自动支付账单
func (*UserAccountDAO) UpdateUserAccount ¶
func (this *UserAccountDAO) UpdateUserAccount(tx *dbs.Tx, accountId int64, delta float32, eventType userconfigs.AccountEventType, description string, params maps.Map) error
UpdateUserAccount 操作用户账户
func (*UserAccountDAO) UpdateUserAccountFrozen ¶
func (this *UserAccountDAO) UpdateUserAccountFrozen(tx *dbs.Tx, userId int64, delta float32, eventType userconfigs.AccountEventType, description string, params maps.Map) error
UpdateUserAccountFrozen 操作用户账户冻结余额
type UserAccountDailyStat ¶
type UserAccountDailyStat struct { Id uint32 `field:"id"` // ID Day string `field:"day"` // YYYYMMDD Month string `field:"month"` // YYYYMM Income float64 `field:"income"` // 收入 Expense float64 `field:"expense"` // 支出 }
UserAccountDailyStat 账户每日统计
type UserAccountDailyStatDAO ¶
func NewUserAccountDailyStatDAO ¶
func NewUserAccountDailyStatDAO() *UserAccountDailyStatDAO
func (*UserAccountDailyStatDAO) FindDailyStats ¶
func (this *UserAccountDailyStatDAO) FindDailyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*UserAccountDailyStat, err error)
FindDailyStats 查看按天统计
func (*UserAccountDailyStatDAO) FindMonthlyStats ¶
func (this *UserAccountDailyStatDAO) FindMonthlyStats(tx *dbs.Tx, dayFrom string, dayTo string) (result []*UserAccountDailyStat, err error)
FindMonthlyStats 查看某月统计
func (*UserAccountDailyStatDAO) UpdateDailyStat ¶
func (this *UserAccountDailyStatDAO) UpdateDailyStat(tx *dbs.Tx) error
UpdateDailyStat 更新当天统计数据
type UserAccountDailyStatOperator ¶
type UserAccountDailyStatOperator struct { Id interface{} // ID Day interface{} // YYYYMMDD Month interface{} // YYYYMM Income interface{} // 收入 Expense interface{} // 支出 }
func NewUserAccountDailyStatOperator ¶
func NewUserAccountDailyStatOperator() *UserAccountDailyStatOperator
type UserAccountLog ¶
type UserAccountLog struct { Id uint64 `field:"id"` // ID UserId uint64 `field:"userId"` // 用户ID AccountId uint64 `field:"accountId"` // 账户ID Delta float64 `field:"delta"` // 操作余额的数量(可为负) DeltaFrozen float64 `field:"deltaFrozen"` // 操作冻结的数量(可为负) Total float64 `field:"total"` // 操作后余额 TotalFrozen float64 `field:"totalFrozen"` // 操作后冻结余额 EventType string `field:"eventType"` // 类型 Description string `field:"description"` // 描述文字 Day string `field:"day"` // YYYYMMDD CreatedAt uint64 `field:"createdAt"` // 时间 Params dbs.JSON `field:"params"` // 参数 }
UserAccountLog 用户账户日志
type UserAccountLogDAO ¶
func NewUserAccountLogDAO ¶
func NewUserAccountLogDAO() *UserAccountLogDAO
func (*UserAccountLogDAO) CountAccountLogs ¶
func (this *UserAccountLogDAO) CountAccountLogs(tx *dbs.Tx, userId int64, accountId int64, keyword string, eventType string) (int64, error)
CountAccountLogs 计算日志数量
func (*UserAccountLogDAO) CreateAccountLog ¶
func (this *UserAccountLogDAO) CreateAccountLog(tx *dbs.Tx, userId int64, accountId int64, delta float32, deltaFrozen float32, eventType userconfigs.AccountEventType, description string, params maps.Map) error
CreateAccountLog 生成用户账户日志
func (*UserAccountLogDAO) ListAccountLogs ¶
func (this *UserAccountLogDAO) ListAccountLogs(tx *dbs.Tx, userId int64, accountId int64, keyword string, eventType string, offset int64, size int64) (result []*UserAccountLog, err error)
ListAccountLogs 列出单页日志
func (*UserAccountLogDAO) SumDailyEventTypes ¶
func (this *UserAccountLogDAO) SumDailyEventTypes(tx *dbs.Tx, day string, eventTypes []userconfigs.AccountEventType) (float32, error)
SumDailyEventTypes 统计某天数据总和
type UserAccountLogOperator ¶
type UserAccountLogOperator struct { Id interface{} // ID UserId interface{} // 用户ID AccountId interface{} // 账户ID Delta interface{} // 操作余额的数量(可为负) DeltaFrozen interface{} // 操作冻结的数量(可为负) Total interface{} // 操作后余额 TotalFrozen interface{} // 操作后冻结余额 EventType interface{} // 类型 Description interface{} // 描述文字 Day interface{} // YYYYMMDD CreatedAt interface{} // 时间 Params interface{} // 参数 }
func NewUserAccountLogOperator ¶
func NewUserAccountLogOperator() *UserAccountLogOperator
type UserAccountOperator ¶
type UserAccountOperator struct { Id interface{} // ID UserId interface{} // 用户ID Total interface{} // 可用总余额 TotalFrozen interface{} // 冻结余额 }
func NewUserAccountOperator ¶
func NewUserAccountOperator() *UserAccountOperator
Click to show internal directories.
Click to hide internal directories.