pendant

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: 20 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 struct info of Dao.

func New

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

New new a Dao and return.

func (*Dao) AddEquip

func (d *Dao) AddEquip(c context.Context, arg *model.PendantEquip) (n int64, err error)

AddEquip add equip

func (*Dao) AddEquipCache

func (d *Dao) AddEquipCache(c context.Context, mid int64, info *model.PendantEquip) (err error)

AddEquipCache set pendant info cache

func (*Dao) AddEquipsCache

func (d *Dao) AddEquipsCache(c context.Context, equips map[int64]*model.PendantEquip) (err error)

AddEquipsCache mset equips info to caache .

func (*Dao) AddOrderInfo

func (d *Dao) AddOrderInfo(c context.Context, arg *model.PendantOrderInfo) (id int64, err error)

AddOrderInfo add order log

func (*Dao) AddPKGCache

func (d *Dao) AddPKGCache(c context.Context, mid int64, info []*model.PendantPackage) (err error)

AddPKGCache set package cache.

func (*Dao) BeginTran

func (d *Dao) BeginTran(c context.Context) (res *xsql.Tx, err error)

BeginTran begin a tx.

func (*Dao) CheckPackageExpire

func (d *Dao) CheckPackageExpire(c context.Context, mid, expires int64) (rows int64, err error)

CheckPackageExpire check expire items and update

func (*Dao) Close

func (d *Dao) Close()

Close close connections of mc, redis, db.

func (*Dao) DelEquipCache

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

DelEquipCache set pendant info cache

func (*Dao) DelEquipsCache

func (d *Dao) DelEquipsCache(c context.Context, mids []int64) (err error)

DelEquipsCache del batch equip cache .

func (*Dao) DelPKGCache

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

DelPKGCache del package cache

func (*Dao) DelRedPointCache

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

DelRedPointCache delete new pendant info red point cache.

func (*Dao) EquipByMid

func (d *Dao) EquipByMid(c context.Context, mid, t int64) (res *model.PendantEquip, noRow bool, err error)

EquipByMid obtain pendant equiped

func (*Dao) EquipByMids

func (d *Dao) EquipByMids(c context.Context, mids []int64, t int64) (res map[int64]*model.PendantEquip, err error)

EquipByMids obtain equipss by mids .

func (*Dao) EquipCache

func (d *Dao) EquipCache(c context.Context, mid int64) (*model.PendantEquip, error)

EquipCache get equip cache.

func (*Dao) EquipsCache

func (d *Dao) EquipsCache(c context.Context, mids []int64) (map[int64]*model.PendantEquip, []int64, error)

EquipsCache get multi equip cache.

func (*Dao) GIDRefPID

func (d *Dao) GIDRefPID(c context.Context) (gidMap map[int64][]int64, pidMap map[int64]int64, err error)

GIDRefPID gid relation of pid .

func (*Dao) GroupByID

func (d *Dao) GroupByID(c context.Context, gid int64) (res *model.PendantGroupInfo, err error)

GroupByID return group info by id

func (*Dao) OrderInfo

func (d *Dao) OrderInfo(c context.Context, arg *model.ArgOrderHistory) (res []*model.PendantOrderInfo, count int64, err error)

OrderInfo return order info

func (*Dao) OrderInfoByID

func (d *Dao) OrderInfoByID(c context.Context, orderID string) (res *model.PendantOrderInfo, err error)

OrderInfoByID return order info by order id

func (*Dao) PKGCache

func (d *Dao) PKGCache(c context.Context, mid int64) (info []*model.PendantPackage, err error)

PKGCache get package cache.

func (*Dao) PackageByID

func (d *Dao) PackageByID(c context.Context, mid, pid int64) (res *model.PendantPackage, err error)

PackageByID get pendant in user's package

func (*Dao) PackageByMid

func (d *Dao) PackageByMid(c context.Context, mid int64) (res []*model.PendantPackage, err error)

PackageByMid get pendant in user's package

func (*Dao) PayBcoin

func (d *Dao) PayBcoin(c context.Context, params url.Values, ip string) (orderNo, casherURL string, err error)

PayBcoin pay coin

func (*Dao) PendantGroupInfo

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

PendantGroupInfo return all group info

func (*Dao) PendantInfo

func (d *Dao) PendantInfo(c context.Context, pid int64) (res *model.Pendant, err error)

PendantInfo return pendant info by id

func (*Dao) PendantList

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

PendantList return pendant info

func (*Dao) PendantPrice

func (d *Dao) PendantPrice(c context.Context, pid int64) (res map[int64]*model.PendantPrice, err error)

PendantPrice return pendant price

func (*Dao) Pendants

func (d *Dao) Pendants(c context.Context, pids []int64) (res []*model.Pendant, err error)

Pendants return pendant info by ids

func (*Dao) Ping

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

Ping ping health.

func (*Dao) RedPointCache

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

RedPointCache get new pendant info red point cache.

func (*Dao) SetRedPointCache

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

SetRedPointCache set red point cache.

func (*Dao) TxAddHistory

func (d *Dao) TxAddHistory(c context.Context, arg *model.PendantHistory, tx *xsql.Tx) (id int64, err error)

TxAddHistory add a history of operation

func (*Dao) TxAddOrderInfo

func (d *Dao) TxAddOrderInfo(c context.Context, arg *model.PendantOrderInfo, tx *xsql.Tx) (id int64, err error)

TxAddOrderInfo add order log

func (*Dao) TxAddPackage

func (d *Dao) TxAddPackage(c context.Context, arg *model.PendantPackage, tx *xsql.Tx) (id int64, err error)

TxAddPackage add a pendant in package

func (*Dao) TxUpdateOrderInfo

func (d *Dao) TxUpdateOrderInfo(c context.Context, arg *model.PendantOrderInfo, tx *xsql.Tx) (id int64, err error)

TxUpdateOrderInfo update order info

func (*Dao) TxUpdatePackageInfo

func (d *Dao) TxUpdatePackageInfo(c context.Context, arg *model.PendantPackage, tx *xsql.Tx) (n int64, err error)

TxUpdatePackageInfo update package info

func (*Dao) UpEquipMID

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

UpEquipMID uninstall user pid by mid.

func (*Dao) UpdateOrderInfo

func (d *Dao) UpdateOrderInfo(c context.Context, arg *model.PendantOrderInfo) (id int64, err error)

UpdateOrderInfo update order info

func (*Dao) VipInfo

func (d *Dao) VipInfo(c context.Context, mid int64, ip string) (idt *model.VipInfo, err error)

VipInfo get identify info by calling api.

Jump to

Keyboard shortcuts

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