aa
This commit is contained in:
@@ -18,6 +18,7 @@ type JxOrderController struct {
|
||||
// @Param jxOrder formData string true "订单信息"
|
||||
// @Param addressID formData int64 true "配送地址ID"
|
||||
// @Param fromStoreID formData int fasle "物料配送门店"
|
||||
// @Param couponIDs formData string fasle "优惠券IDs"
|
||||
// @Param createType formData int false "创建类型, 0:预创建, 1:创建"
|
||||
// @Param isDeliverySelf formData bool false "是否是自提单"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
@@ -27,7 +28,10 @@ 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, params.FromStoreID, params.IsDeliverySelf)
|
||||
var couponIDs []int
|
||||
if err = jxutils.Strings2Objs(params.CouponIDs, &couponIDs); err == nil {
|
||||
retVal, err = localjx.CreateOrder(params.Ctx, jxOrder, int64(params.AddressID), params.CreateType, params.FromStoreID, params.IsDeliverySelf, couponIDs)
|
||||
}
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user