dao

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT 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
}

func New

func New(c *config.Config) *Dao

func (*Dao) ChangeVersionStatus

func (d *Dao) ChangeVersionStatus(form *model.VersionForm) error

func (*Dao) CheckAndUpdateVersion

func (d *Dao) CheckAndUpdateVersion(form *model.VersionForm) (*model.VersionForm, error)

func (*Dao) CheckCdkExist

func (d *Dao) CheckCdkExist(cdkId int64, cdkContent string) (bool, error)

func (*Dao) CleanFrozenCdks

func (d *Dao) CleanFrozenCdks(orderId int64) error

func (*Dao) ConvertVersionList

func (d *Dao) ConvertVersionList(records *[]map[string]string) (*[]model.VersionForm, error)

func (*Dao) DeleteCdk

func (d *Dao) DeleteCdk(id int64, deleteTime int64) error

func (*Dao) DeleteCdkType

func (d *Dao) DeleteCdkType(cdkId int64, deleteTime int64) error

func (*Dao) DeleteCdkTypes

func (d *Dao) DeleteCdkTypes(cdkIds []int64) error

func (*Dao) DeleteCdks

func (d *Dao) DeleteCdks(ids []int64, deleteTime int64) error

func (*Dao) DeleteCdksByCdkIds

func (d *Dao) DeleteCdksByCdkIds(cdkIds []int64) error

func (*Dao) FrozenCdksStatus

func (d *Dao) FrozenCdksStatus(ids []int64, userId string, orderId int64) error

func (*Dao) GetCdkType

func (d *Dao) GetCdkType(cdkId int64) (*db.CdkType, error)

func (*Dao) GetCdkTypes

func (d *Dao) GetCdkTypes(coinName string, page int64, size int64) ([]db.CdkType, int64, int64, error)

func (*Dao) GetCdkTypesWithCoinName

func (d *Dao) GetCdkTypesWithCoinName(coinName string) ([]db.CdkType, error)

func (*Dao) GetCdks

func (d *Dao) GetCdks(cdkId int64, cdkContent string, page int64, size int64) ([]db.Cdk, int64, int64, error)

func (*Dao) GetCdksByOrderId

func (d *Dao) GetCdksByOrderId(orderId int64) ([]db.Cdk, error)

func (*Dao) GetCdksCount

func (d *Dao) GetCdksCount(cdkId int64) (int64, int64, int64, error)

func (*Dao) GetCdksCountByUserIdAndCdkId

func (d *Dao) GetCdksCountByUserIdAndCdkId(cdkId int64, userId string) (int64, error)

func (*Dao) GetCdksWithUserId

func (d *Dao) GetCdksWithUserId(userId string, page int64, size int64) ([]db.Cdk, int64, int64, error)

func (*Dao) GetFrozenCdks

func (d *Dao) GetFrozenCdks() ([]db.Cdk, error)

func (*Dao) GetFrozenCdksCount

func (d *Dao) GetFrozenCdksCount(cdkId string) (int64, error)

func (*Dao) GetUnusedCdks

func (d *Dao) GetUnusedCdks(cdkId int64, number int64) ([]db.Cdk, error)

func (*Dao) GetUnusedCdksCount

func (d *Dao) GetUnusedCdksCount(cdkId string) (int64, error)

func (*Dao) GetUsedCdksCount

func (d *Dao) GetUsedCdksCount(cdkId string) (int64, error)

func (*Dao) GetVersionList

func (d *Dao) GetVersionList(form *model.VersionForm, page int64, size int64) (*[]model.VersionForm, int64, int64, error)

func (*Dao) InsertCdk

func (d *Dao) InsertCdk(cdk *db.Cdk) error

func (*Dao) InsertCdkType

func (d *Dao) InsertCdkType(cdkType *db.CdkType) error

func (*Dao) InsertVersion

func (d *Dao) InsertVersion(form *model.VersionForm) (int64, int64, error)

func (*Dao) ToCdkTypes

func (d *Dao) ToCdkTypes(records []map[string]string) ([]db.CdkType, error)

func (*Dao) ToCdks

func (d *Dao) ToCdks(records []map[string]string) ([]db.Cdk, error)

func (*Dao) UpdateCdkOrderId

func (d *Dao) UpdateCdkOrderId(id int64, orderId int64) error

func (*Dao) UpdateCdkStatus

func (d *Dao) UpdateCdkStatus(id int64, cdkStatus int32) error

func (*Dao) UpdateCdkType

func (d *Dao) UpdateCdkType(cdkId int64, cdkName, coinName string, exchangeRate int64) error

func (*Dao) UpdateCdkUserId

func (d *Dao) UpdateCdkUserId(id int64, userId int64) error

func (*Dao) UpdateCdksStatus

func (d *Dao) UpdateCdksStatus(ids []int64, status int64) error

func (*Dao) UpdateVersion

func (d *Dao) UpdateVersion(form *model.VersionForm) (*model.VersionForm, error)

Jump to

Keyboard shortcuts

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