bill

package
v0.0.0-...-b2f9ab3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(billRepo bill.Repository, userRepo user.Repository) *Service

func (*Service) CancelBillAndUpdateUserBalance

func (receiver *Service) CancelBillAndUpdateUserBalance(billID uint) error

CancelBillAndUpdateUserBalance 取消订单并更新用户余额

func (*Service) CreateNewBill

func (receiver *Service) CreateNewBill(userID uint, amount float64, category string, opts ...bill.CreateBillOptions) (*models.Bill, error)

func (*Service) GetUserBillsByCreateTime

func (receiver *Service) GetUserBillsByCreateTime(userID uint, opts ...bill.GetUserBillsByCreateTimeOptions) ([]*models.Bill, error)

GetUserBillsByCreateTime 获取用户在指定时间范围内的账单列表,若 opts 为空,则返回账单(opts 只取列表第一个作为查询参数)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL