京西商城订单可以创建
This commit is contained in:
30
controllers/jx_order2.go
Normal file
30
controllers/jx_order2.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||
"github.com/astaxie/beego"
|
||||
)
|
||||
|
||||
type JxOrderController struct {
|
||||
beego.Controller
|
||||
}
|
||||
|
||||
// @Title 创建京西商城订单
|
||||
// @Description 创建京西商城订单
|
||||
// @Param token header string true "认证token"
|
||||
// @Param jxOrder formData string true "订单信息"
|
||||
// @Param addressID formData int64 true "配送地址ID"
|
||||
// @Param createType formData int false "创建类型, 0:预创建, 1:创建"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CreateOrder [post]
|
||||
func (c *JxOrderController) CreateOrder() {
|
||||
c.callCreateOrder(func(params *tJxorderCreateOrderParams) (retVal interface{}, errCode string, err error) {
|
||||
var jxOrder *localjx.JxOrderInfo
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.JxOrder), &jxOrder); err == nil {
|
||||
retVal, err = localjx.CreateOrder(params.Ctx, jxOrder, int64(params.AddressID), params.CreateType)
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user