Documentation ¶
Index ¶
- type CreateBillDTO
- type Service
- func (receiver *Service) CancelBillAndUpdateUserBalance(billID uint) error
- func (receiver *Service) CreateNewBill(userID uint, amount float64, category string, opts ...bill.CreateBillOptions) (*models.Bill, error)
- func (receiver *Service) CreateNewBills(userID uint, billDTOs []CreateBillDTO) error
- func (receiver *Service) GetUserBillsByCreateTime(userID uint, opts ...bill.GetUserBillsByCreateTimeOptions) ([]*models.Bill, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateBillDTO ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(billRepo bill.Repository, userRepo user.Repository) *Service
func (*Service) CancelBillAndUpdateUserBalance ¶
CancelBillAndUpdateUserBalance 取消订单并更新用户余额
func (*Service) CreateNewBill ¶
func (*Service) CreateNewBills ¶
func (receiver *Service) CreateNewBills(userID uint, billDTOs []CreateBillDTO) error
func (*Service) GetUserBillsByCreateTime ¶
func (receiver *Service) GetUserBillsByCreateTime(userID uint, opts ...bill.GetUserBillsByCreateTimeOptions) ([]*models.Bill, error)
GetUserBillsByCreateTime 获取用户在指定时间范围内的账单列表,若 opts 为空,则返回账单(opts 只取列表第一个作为查询参数)
Click to show internal directories.
Click to hide internal directories.