This commit is contained in:
苏尹岚
2021-03-03 14:11:22 +08:00
parent f37545de19
commit 7fa0849e17
9 changed files with 123 additions and 44 deletions

View File

@@ -7,10 +7,13 @@ import (
const (
//账户收入类型
StoreAcctTypeIncomePay = 1 //主动充值
StoreAcctTypeIncomePay = 10 //主动充值
StoreAcctTypeRealFeeIncome = 15 //真实运费 < 临时运费, 临时运费-真实运费的值
//账户支出类型
StoreAcctTypeExpendCreateWaybillEx = 2 //手动发单扣除的临时运费
StoreAcctTypeExpendCreateWaybillEx = 20 //手动发单扣除的临时运费
StoreAcctTypeExpendCreateWaybillTip = 21 //手动加小费扣除
StoreAcctTypeRealFeeExpend = 25 //真实运费 > 临时运费, 真实运费的值 - 临时运费的值
)
const (

View File

@@ -2456,7 +2456,7 @@ func RefreshCouponsStatus(ctx *jxcontext.Context) (err error) {
return err
}
func CreateStoreAcctOrder(ctx *jxcontext.Context, orderType, storeID, price int) (vendorOrderID string, err error) {
func CreateStoreAcctOrder(ctx *jxcontext.Context, orderType, storeID, price int, goodsVendorOrderID string) (vendorOrderID string, err error) {
var (
db = dao.GetDB()
storeAcct = &model.StoreAcct{
@@ -2470,13 +2470,14 @@ func CreateStoreAcctOrder(ctx *jxcontext.Context, orderType, storeID, price int)
}
order := &model.StoreAcctOrder{
VendorOrderID: utils.Int64ToStr(jxutils.GenOrderNo()),
UserID: ctx.GetUserID(),
StoreID: storeID,
OrderType: orderType,
Status: model.OrderStatusWait4Pay,
ActualPayPrice: price,
VendorID: model.VendorIDJX,
VendorOrderID: utils.Int64ToStr(jxutils.GenOrderNo()),
UserID: ctx.GetUserID(),
StoreID: storeID,
OrderType: orderType,
Status: model.OrderStatusWait4Pay,
ActualPayPrice: price,
VendorID: model.VendorIDJX,
GoodsVendorOrderID: goodsVendorOrderID,
}
dao.WrapAddIDCULEntity(order, ctx.GetUserName())
dao.Begin(db)