Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrder ¶
func GetOrder() (*[]model.DBOrderInfo, error)
func PostOrder ¶
func PostOrder(req *POSTOrderReq) (int64, error)
Types ¶
type APIGETOrderDetailReq ¶
type APIGETOrderDetailReq struct { OrderID uint64 `form:"OrderID"` OrderSN string `form:"OrderSN"` }
APIGETOrderDetailReq 获取订单详情 id sn 不可同时为空,建议传入orderID @since 0.0.22
type OrderDetail ¶
type OrderDetail struct { OrderID uint64 OrderSN string UID uint64 Mobile string GoodsAmount float64 Date time.Time OrderGoods *[]OrderGoods }
OrderDetail 订单详情完整结构体 @since 0.0.22
func GetOrderDetail ¶
func GetOrderDetail(req *APIGETOrderDetailReq) (*OrderDetail, error)
GetOrderDetail 获取订单详情
type OrderGoods ¶
type OrderGoods struct { OrderID uint64 `db:"order_id"` GoodsID uint64 `db:"goods_id"` GoodsNumber float64 `db:"goods_number"` GoodsName string `db:"goods_name"` GoodsPrice float64 `db:"goods_price"` }
OrderGoods 订单内的商品 @since 0.0.22
type POSTOrderReq ¶
type POSTOrderReq struct { Postscript string // 订单附言,由用户提交订单前填写 Mobile string `binding:"required"` // 收货人的手机,用户页面填写,默认取值于表user_address // TODO 必须验证登录状态 //UserID uint64 `binding:"required"` // 用户id,同ecs_users的user_id Goods []struct { GoodsID int64 `binding:"required"` Num int64 `binding:"required"` } `json:"Goods" binding:"required"` OrderID int64 GoodsAmount float64 `binding:"required"` // 商品的总金额 }
Click to show internal directories.
Click to hide internal directories.