fix:购物车下单

This commit is contained in:
momo 2023-09-19 13:56:59 +08:00
parent 832440a58e
commit 12085dca8f
3 changed files with 23 additions and 4 deletions

View File

@ -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

View File

@ -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"` // 支付状态
}
// 收货地址

View File

@ -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