diff --git a/business/model/order.go b/business/model/order.go index eebf17572..335c3b72d 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -146,7 +146,7 @@ type GoodsOrder struct { EarningType int `json:"earningType"` //订单结算方式,2为扣点,1为报价 OrderType int `json:"orderType"` //订单类型,0为普通订单,1为物料订单,2为进货订单 OrderPayPercentage int `json:"orderPayPercentage"` - // CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` //优惠券IDs(京西商城) + CouponIDs string `orm:"column(coupon_ids)" json:"couponIDs"` //优惠券IDs(京西商城) // 以下只是用于传递数据 OriginalData string `orm:"-" json:"-"` diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index fb5571918..81a6e0e9f 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -1058,11 +1058,11 @@ func jxOrder2GoodsOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, deliveryAd VendorOrderID2: jxOrder.OrderID2, } if len(couponIDs) > 0 { - // strCounponIDs := []string{} - // for _, v := range couponIDs { - // strCounponIDs = append(strCounponIDs, utils.Int2Str(v)) - // } - // order.CouponIDs = strings.Join(strCounponIDs, ",") + strCounponIDs := []string{} + for _, v := range couponIDs { + strCounponIDs = append(strCounponIDs, utils.Int2Str(v)) + } + order.CouponIDs = strings.Join(strCounponIDs, ",") } if userID == "" { order.UserID = ctx.GetUserID()