order
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
@@ -11,31 +12,30 @@ type OrderController struct {
|
||||
// @Title 支付
|
||||
// @Description 支付
|
||||
// @Param token header string true "认证token"
|
||||
// @Param type formData int true "支付类型/账单类型"
|
||||
// @Param price formData int true "支付金额"
|
||||
// @Param orderID formData int true "订单号"
|
||||
// @Param payType formData int true "支付平台类型"
|
||||
// @Param vendorPayType formData string true "平台支付类型"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /Pay [post]
|
||||
func (c *OrderController) Pay() {
|
||||
|
||||
c.callPay(func(params *tOrderPayParams) (retVal interface{}, errCode string, err error) {
|
||||
err = cms.Pay(params.Ctx, params.OrderID, params.PayType, params.VendorPayType)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 创建订单
|
||||
// @Description 创建订单
|
||||
// @Param token header string true "认证token"
|
||||
// @Param jxOrder formData string true "订单信息"
|
||||
// @Param addressID formData int64 true "配送地址ID"
|
||||
// @Param fromStoreID formData int fasle "物料配送门店"
|
||||
// @Param createType formData int false "创建类型, 0:预创建, 1:创建"
|
||||
// @Param isDeliverySelf formData bool false "是否是自提单"
|
||||
// @Param type formData int true "支付类型/账单类型"
|
||||
// @Param price formData int true "支付金额"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CreateOrder [post]
|
||||
func (c *OrderController) CreateOrder() {
|
||||
c.callCreateOrder(func(params *tOrderCreateOrderParams) (retVal interface{}, errCode string, err error) {
|
||||
|
||||
retVal, err = cms.CreateOrder(params.Ctx, params.Type, params.Price)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user