dao

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

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

Dao dao

func New

func New(c *conf.Config) (dao *Dao)

New init mysql db

func (*Dao) AllPointConfig

func (d *Dao) AllPointConfig(c context.Context) (res []*model.VipPointConf, err error)

AllPointConfig all point config.

func (*Dao) BeginTran

func (d *Dao) BeginTran(c context.Context) (*sql.Tx, error)

BeginTran begin transaction.

func (*Dao) Close

func (dao *Dao) Close()

Close close the resource.

func (*Dao) DelPointInfoCache

func (d *Dao) DelPointInfoCache(c context.Context, mid int64) (err error)

DelPointInfoCache .

func (*Dao) ExistPointOrder

func (d *Dao) ExistPointOrder(c context.Context, orID string) (id int, err error)

ExistPointOrder check orderID is uniq or not

func (*Dao) InsertPoint

func (d *Dao) InsertPoint(c context.Context, tx *sql.Tx, pi *model.PointInfo) (a int64, err error)

InsertPoint .

func (*Dao) InsertPointHistory

func (d *Dao) InsertPointHistory(c context.Context, tx *sql.Tx, ph *model.PointHistory) (a int64, err error)

InsertPointHistory .

func (*Dao) OldPointHistory

func (d *Dao) OldPointHistory(c context.Context, mid int64, start int, ps int) (phs []*model.OldPointHistory, err error)

OldPointHistory point history.

func (*Dao) Ping

func (dao *Dao) Ping(c context.Context) (err error)

Ping dao ping

func (*Dao) PointHistory

func (d *Dao) PointHistory(c context.Context, mid int64, cursor int, ps int) (phs []*model.PointHistory, err error)

PointHistory point history

func (*Dao) PointHistoryCount

func (d *Dao) PointHistoryCount(c context.Context, mid int64) (count int, err error)

PointHistoryCount point history

func (*Dao) PointInfo

func (d *Dao) PointInfo(c context.Context, mid int64) (pi *model.PointInfo, err error)

PointInfo .

func (*Dao) PointInfoCache

func (d *Dao) PointInfoCache(c context.Context, mid int64) (pi *model.PointInfo, err error)

PointInfoCache .

func (*Dao) SelPointHistory

func (d *Dao) SelPointHistory(c context.Context, mid int64, startDate, endDate xtime.Time) (phs []*model.PointHistory, err error)

SelPointHistory .

func (*Dao) SetPointInfoCache

func (d *Dao) SetPointInfoCache(c context.Context, pi *model.PointInfo) (err error)

SetPointInfoCache .

func (*Dao) TxPointInfo

func (d *Dao) TxPointInfo(c context.Context, tx *sql.Tx, mid int64) (pi *model.PointInfo, err error)

TxPointInfo .

func (*Dao) UpdatePointInfo

func (d *Dao) UpdatePointInfo(c context.Context, tx *sql.Tx, pi *model.PointInfo, ver int64) (a int64, err error)

UpdatePointInfo .

Jump to

Keyboard shortcuts

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