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: 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 dao

func New

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

New init mysql db

func (*Dao) AddCacheAsset

func (d *Dao) AddCacheAsset(c context.Context, id int64, otype string, currency string, value *model.Asset) (err error)

AddCacheAsset Set data to mc

func (*Dao) AddCacheAssetRelationState

func (d *Dao) AddCacheAssetRelationState(c context.Context, oid int64, otype string, mid int64, state string) (err error)

AddCacheAssetRelationState set asset relation state.

func (*Dao) AddCacheOrderUser

func (d *Dao) AddCacheOrderUser(c context.Context, id string, val *model.Order) (err error)

AddCacheOrderUser Set data to mc

func (*Dao) ArchiveUGCPay

func (d *Dao) ArchiveUGCPay(ctx context.Context, aid int64) (pay bool, err error)

ArchiveUGCPay get archive ugcpay flag.

func (*Dao) Asset

func (d *Dao) Asset(c context.Context, id int64, otype string, currency string) (res *model.Asset, err error)

Asset get data from cache if miss will call source method, then add to cache.

func (*Dao) BeginTran

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

BeginTran begin transcation.

func (*Dao) CacheAsset

func (d *Dao) CacheAsset(c context.Context, id int64, otype string, currency string) (res *model.Asset, err error)

CacheAsset get data from mc

func (*Dao) CacheAssetRelationState

func (d *Dao) CacheAssetRelationState(c context.Context, oid int64, otype string, mid int64) (state string, err error)

CacheAssetRelationState get asset relation state.

func (*Dao) CacheOrderUser

func (d *Dao) CacheOrderUser(c context.Context, id string) (res *model.Order, err error)

CacheOrderUser get data from mc

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) DelCacheAsset

func (d *Dao) DelCacheAsset(c context.Context, id int64, otype string, currency string) (err error)

DelCacheAsset delete data from mc

func (*Dao) DelCacheAssetRelation

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

DelCacheAssetRelation delete assetrelation.

func (*Dao) DelCacheAssetRelationState

func (d *Dao) DelCacheAssetRelationState(c context.Context, oid int64, otype string, mid int64) (err error)

DelCacheAssetRelationState delete asset relation state.

func (*Dao) DelCacheOrderUser

func (d *Dao) DelCacheOrderUser(c context.Context, id string) (err error)

DelCacheOrderUser delete data from mc

func (*Dao) InsertOrderUser

func (d *Dao) InsertOrderUser(ctx context.Context, data *model.Order) (id int64, err error)

InsertOrderUser is.

func (*Dao) OrderUser

func (d *Dao) OrderUser(c context.Context, id string) (res *model.Order, err error)

OrderUser get data from cache if miss will call source method, then add to cache.

func (*Dao) PayCancel

func (d *Dao) PayCancel(c context.Context, dataJSON string) (err error)

PayCancel 调用支付平台订单取消接口

func (*Dao) PayQuery

func (d *Dao) PayQuery(c context.Context, dataJSON string) (orders map[string][]*model.PayOrder, err error)

PayQuery 调用支付平台订单查询接口 return map[orderID]*model.PayOrder

func (*Dao) PayRefund

func (d *Dao) PayRefund(c context.Context, dataJSON string) (err error)

PayRefund 调用支付平台退款接口

func (*Dao) Ping

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

Ping dao ping

func (*Dao) RawAggrIncomeUser

func (d *Dao) RawAggrIncomeUser(ctx context.Context, mid int64, currency string) (data *model.AggrIncomeUser, err error)

RawAggrIncomeUser is.

func (*Dao) RawAggrIncomeUserAsset

func (d *Dao) RawAggrIncomeUserAsset(ctx context.Context, mid int64, currency string, oid int64, otype string, ver int64) (data *model.AggrIncomeUserAsset, err error)

RawAggrIncomeUserAsset .

func (*Dao) RawAggrIncomeUserAssetList

func (d *Dao) RawAggrIncomeUserAssetList(ctx context.Context, mid int64, currency string, ver int64, limit int) (data []*model.AggrIncomeUserAsset, err error)

RawAggrIncomeUserAssetList is.

func (*Dao) RawAsset

func (d *Dao) RawAsset(ctx context.Context, oid int64, otype string, currency string) (data *model.Asset, err error)

RawAsset is

func (*Dao) RawAssetRelation

func (d *Dao) RawAssetRelation(ctx context.Context, mid int64, oid int64, otype string) (data *model.AssetRelation, err error)

RawAssetRelation is

func (*Dao) RawBillUserDaily

func (d *Dao) RawBillUserDaily(ctx context.Context, mid int64, biz string, currency string, ver int64) (data *model.Bill, err error)

RawBillUserDaily is.

func (*Dao) RawBillUserDailyByMonthVer

func (d *Dao) RawBillUserDailyByMonthVer(ctx context.Context, mid int64, biz string, currency string, monthVer int64) (datas []*model.Bill, err error)

RawBillUserDailyByMonthVer .

func (*Dao) RawOrderRechargeShell

func (d *Dao) RawOrderRechargeShell(ctx context.Context, orderID string) (data *model.OrderRechargeShell, err error)

RawOrderRechargeShell .

func (*Dao) RawOrderUser

func (d *Dao) RawOrderUser(ctx context.Context, id string) (data *model.Order, err error)

RawOrderUser get user order

func (*Dao) TXInsertOrderRechargeShellLog

func (d *Dao) TXInsertOrderRechargeShellLog(ctx context.Context, tx *xsql.Tx, order *model.OrderRechargeShellLog) (id int64, err error)

TXInsertOrderRechargeShellLog .

func (*Dao) TXInsertOrderUserLog

func (d *Dao) TXInsertOrderUserLog(ctx context.Context, tx *xsql.Tx, data *model.LogOrder) (id int64, err error)

TXInsertOrderUserLog .

func (*Dao) TXUpdateOrderRechargeShell

func (d *Dao) TXUpdateOrderRechargeShell(ctx context.Context, tx *xsql.Tx, data *model.OrderRechargeShell) (err error)

TXUpdateOrderRechargeShell .

func (*Dao) TXUpdateOrderUser

func (d *Dao) TXUpdateOrderUser(ctx context.Context, tx *xsql.Tx, data *model.Order) (affected int64, err error)

TXUpdateOrderUser .

func (*Dao) TXUpsertAssetRelation

func (d *Dao) TXUpsertAssetRelation(ctx context.Context, tx *xsql.Tx, data *model.AssetRelation) (rows int64, err error)

TXUpsertAssetRelation is

func (*Dao) UpsertAsset

func (d *Dao) UpsertAsset(ctx context.Context, data *model.Asset) (err error)

UpsertAsset is

func (*Dao) UpsertAssetRelation

func (d *Dao) UpsertAssetRelation(ctx context.Context, data *model.AssetRelation) (rows int64, err error)

UpsertAssetRelation is

Jump to

Keyboard shortcuts

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