1
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"github.com/astaxie/beego/server/web"
|
||||
)
|
||||
|
||||
@@ -89,7 +91,7 @@ func (c *JxOrderController) Pay4StoreMyselfDeliverOrder() {
|
||||
FreightPrice: 0,
|
||||
OrderPrice: int64(params.PayMoney),
|
||||
ActualPayPrice: int64(params.PayMoney),
|
||||
OrderID: 0,
|
||||
OrderID: jxutils.GenOrderNo(),
|
||||
StoreName: orderDetail.Name,
|
||||
Weight: 500,
|
||||
FromStoreID: 0,
|
||||
@@ -101,11 +103,17 @@ func (c *JxOrderController) Pay4StoreMyselfDeliverOrder() {
|
||||
UserID: params.Ctx.GetUserID(),
|
||||
}
|
||||
outJxOrder, err := localjx.CreateOrder(params.Ctx, jxOrder, int64(142), 1, 0, true, nil)
|
||||
globals.SugarLogger.Debugf("outJxOrder := %s", utils.Format4Output(outJxOrder, false))
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf(" localjx.CreateOrder err := %s", utils.Format4Output(err, false))
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
if outJxOrder.OrderID == 0 {
|
||||
return nil, "", errors.New("orderId 不能为空")
|
||||
}
|
||||
retVal, err := localjx.Pay4Order(params.Ctx, outJxOrder.OrderID, params.PayType, params.VendorPayType, params.SubAppID)
|
||||
globals.SugarLogger.Debugf("retVal :=========%s", utils.Format4Output(retVal, false))
|
||||
globals.SugarLogger.Debugf("errrrr :=========%s", utils.Format4Output(err, false))
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user