fix:购物车下单
This commit is contained in:
parent
832440a58e
commit
12085dca8f
|
@ -30,6 +30,22 @@ const (
|
|||
PayStatusRefunded PayStatusCode = 30 //30,已退款
|
||||
)
|
||||
|
||||
// 订单支付状态
|
||||
type OrderPayStatusCode int64
|
||||
|
||||
// 0,未付首款
|
||||
// 10,已付首款
|
||||
// 20,已退首款
|
||||
// 30,已付尾款
|
||||
// 40,已退尾款
|
||||
const (
|
||||
OrderPayStatusUnpaidDEPOSIT OrderPayStatusCode = 0
|
||||
OrderPayStatusPaidDEPOSIT OrderPayStatusCode = 10
|
||||
OrderPayStatusRefundedDEPOSIT OrderPayStatusCode = 20
|
||||
OrderPayStatusPaidDREMAINING OrderPayStatusCode = 30
|
||||
OrderPayStatusRefundedREMAINING OrderPayStatusCode = 40
|
||||
)
|
||||
|
||||
// 订单状态
|
||||
type OrderStatusCode int64
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ type OrderDetail struct {
|
|||
OrderAmount OrderAmount `json:"order_amount"` // 订单金额
|
||||
OrderInfo OrderInfo `json:"order_info"` // 订单信息
|
||||
OrderProduct []OrderProduct `json:"order_product"` // 订单商品
|
||||
PayStatus constants.OrderPayStatusCode `json:"pay_status"` // 支付状态
|
||||
}
|
||||
|
||||
// 收货地址
|
||||
|
|
|
@ -99,6 +99,8 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
|
|||
// 订单总价(厘)
|
||||
var orderTotal int64
|
||||
|
||||
var payStatus int64
|
||||
|
||||
for _, shoppingCart := range shoppingCartList {
|
||||
// 购物车快照
|
||||
var shoppingCartSnapshot shopping_cart.CartSnapshot
|
||||
|
|
Loading…
Reference in New Issue
Block a user