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

@@ -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)