dao

package
v0.0.0-...-099a909 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackIpDao

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

func NewBlackIpDao

func NewBlackIpDao(engine *xorm.Engine) *BlackIpDao

func (*BlackIpDao) CountAll

func (d *BlackIpDao) CountAll() int64

func (*BlackIpDao) Create

func (d *BlackIpDao) Create(data *models.Blackip) error

func (*BlackIpDao) Get

func (d *BlackIpDao) Get(id int) *models.Blackip

func (*BlackIpDao) GetAll

func (d *BlackIpDao) GetAll(page, size int) []models.Blackip

func (*BlackIpDao) GetByIp

func (d *BlackIpDao) GetByIp(ip string) *models.Blackip

func (*BlackIpDao) Search

func (d *BlackIpDao) Search(ip string) []models.Blackip

func (*BlackIpDao) Update

func (d *BlackIpDao) Update(data *models.Blackip, columns []string) error

type CodeDao

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

func NewCodeDao

func NewCodeDao(engine *xorm.Engine) *CodeDao

func (*CodeDao) CountAll

func (d *CodeDao) CountAll() int64

func (*CodeDao) CountByGift

func (d *CodeDao) CountByGift(giftId int) int64

func (*CodeDao) Create

func (d *CodeDao) Create(data *models.Code) error

func (*CodeDao) Delete

func (d *CodeDao) Delete(id int) error

func (*CodeDao) Get

func (d *CodeDao) Get(id int) *models.Code

func (*CodeDao) GetAll

func (d *CodeDao) GetAll(page, size int) []models.Code

func (*CodeDao) NextUsingCode

func (d *CodeDao) NextUsingCode(giftId, codeId int) *models.Code

找到下一个可用的最小的优惠券

func (*CodeDao) Search

func (d *CodeDao) Search(giftId int) []models.Code

func (*CodeDao) Update

func (d *CodeDao) Update(data *models.Code, columns []string) error

func (*CodeDao) UpdateByCode

func (d *CodeDao) UpdateByCode(code *models.Code, columns []string) error

根据唯一的code来更新

type GiftDao

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

func NewGiftDao

func NewGiftDao(engine *xorm.Engine) *GiftDao

func (*GiftDao) CountAll

func (d *GiftDao) CountAll() int64

func (*GiftDao) Create

func (d *GiftDao) Create(data *models.Gift) error

func (*GiftDao) DecrLeftNum

func (d *GiftDao) DecrLeftNum(id, num int) (int64, error)

func (*GiftDao) Delete

func (d *GiftDao) Delete(id int) error

func (*GiftDao) Get

func (d *GiftDao) Get(id int) *models.Gift

func (*GiftDao) GetAll

func (d *GiftDao) GetAll() []models.Gift

func (*GiftDao) GetAllUse

func (d *GiftDao) GetAllUse() []models.Gift

获取到当前可以获取的奖品列表 有奖品限定,状态正常,时间期间内 gtype倒序, displayorder正序

func (*GiftDao) IncrLeftNum

func (d *GiftDao) IncrLeftNum(id, num int) (int64, error)

func (*GiftDao) Update

func (d *GiftDao) Update(data *models.Gift, columns []string) error

type ResultDao

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

func NewResultDao

func NewResultDao(engine *xorm.Engine) *ResultDao

func (*ResultDao) CountAll

func (d *ResultDao) CountAll() int64

func (*ResultDao) CountByGift

func (d *ResultDao) CountByGift(giftId int) int64

func (*ResultDao) CountByUser

func (d *ResultDao) CountByUser(uid int) int64

func (*ResultDao) Create

func (d *ResultDao) Create(result *models.Result) error

func (*ResultDao) Delete

func (d *ResultDao) Delete(id int) error

func (*ResultDao) Get

func (d *ResultDao) Get(id int) *models.Result

func (*ResultDao) GetAll

func (d *ResultDao) GetAll(page, size int) []models.Result

func (*ResultDao) GetNewPrize

func (d *ResultDao) GetNewPrize(size int, giftIds []int) []models.Result

func (*ResultDao) SearchByGift

func (d *ResultDao) SearchByGift(giftId, page, size int) []models.Result

func (*ResultDao) SearchByUser

func (d *ResultDao) SearchByUser(uid, page, size int) []models.Result

func (*ResultDao) Update

func (d *ResultDao) Update(data *models.Result, columns []string) error

type UserDao

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

func NewUserDao

func NewUserDao(engine *xorm.Engine) *UserDao

func (*UserDao) CountAll

func (d *UserDao) CountAll() int64

func (*UserDao) Create

func (d *UserDao) Create(user *models.User) error

func (*UserDao) Get

func (d *UserDao) Get(id int) *models.User

func (*UserDao) GetAll

func (d *UserDao) GetAll(page, size int) []models.User

func (*UserDao) Update

func (d *UserDao) Update(user *models.User, columns []string) error

type UserDayDao

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

func NewUserDayDao

func NewUserDayDao(engine *xorm.Engine) *UserDayDao

func (*UserDayDao) Count

func (d *UserDayDao) Count(uid, day int) int

func (*UserDayDao) CountAll

func (d *UserDayDao) CountAll() int64

func (*UserDayDao) Create

func (d *UserDayDao) Create(data *models.Userday) error

func (*UserDayDao) Get

func (d *UserDayDao) Get(id int) *models.Userday

func (*UserDayDao) GetAll

func (d *UserDayDao) GetAll(page, size int) []models.Userday

func (*UserDayDao) Search

func (d *UserDayDao) Search(uid, day int) []models.Userday

func (*UserDayDao) Update

func (d *UserDayDao) Update(data *models.Userday, columns []string) error

Jump to

Keyboard shortcuts

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