This commit is contained in:
苏尹岚
2021-02-25 15:12:08 +08:00
parent 8d3d64e381
commit 966a11f394
6 changed files with 157 additions and 5 deletions

View File

@@ -0,0 +1,30 @@
package partner
import (
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model/dao"
)
const (
StoreAcctType1 = 1 //主动充值
)
var (
CurStoreAcctManager IStoreAcctManager
)
func InitStoreAcctManager(curStoreManager IStoreAcctManager) {
CurStoreAcctManager = curStoreManager
}
type IStoreAcctManager interface {
//增加一条收入流水
InsertStoreAcctIncome(ctx *jxcontext.Context, db *dao.DaoDB, storeID, price, acctType int) (err error)
//增加一条支出流水
InsertStoreAcctExpend(ctx *jxcontext.Context, db *dao.DaoDB, storeID, price, acctType int, vendorOrderID string) (err error)
//更新门店账户
UpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price int, isIncome bool) (err error)
InsertStoreAcctExpendAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int, vendorOrderID string) (err error)
InsertStoreAcctIncomeAndUpdateStoreAcctBalance(ctx *jxcontext.Context, storeID, price, acctType int) (err error)
CheckStoreAcctExpendExist(storeID int, vendorOrderID string) (result bool, err error)
}