Documentation
¶
Index ¶
- type Address
- type AddressReq
- type BatchOperateReq
- type CancelOrderReq
- type CartInfo
- type CartItem
- type CartItemReq
- type Category
- type ChangePasswordReq
- type ConfirmOrderReq
- type CreateCategoryReq
- type CreateCategoryResp
- type CreateOrderReq
- type CreatePaymentReq
- type CreatePaymentResp
- type CreateProductReq
- type CreateProductResp
- type CreateRefundReq
- type CreateReviewReq
- type CreateSkuReq
- type CreateSkuResp
- type DeleteAddressReq
- type DeleteCategoryReq
- type DeleteItemReq
- type DeleteProductReq
- type DeleteReviewReq
- type GetCategoriesResp
- type GetOrderReq
- type GetProductReq
- type GetProductSkusReq
- type GetProfileReq
- type LoginReq
- type LogoutReq
- type LogoutResp
- type Order
- type OrderItem
- type OrderListReq
- type OrderListResp
- type OrderProduct
- type Payment
- type PaymentNotifyReq
- type PaymentNotifyResp
- type PaymentOrder
- type PaymentStatusReq
- type PaymentStatusResp
- type Product
- type RechargeReq
- type RefundInfo
- type RefundNotifyReq
- type RefundNotifyResp
- type RefundReq
- type RefundResp
- type RefundStatusReq
- type RefundStatusResp
- type RegisterReq
- type RegisterResp
- type ResetPasswordReq
- type Response
- type Review
- type ReviewListReq
- type SearchReq
- type SearchResp
- type SelectedItemsResp
- type Shipping
- type Sku
- type SkuAttributeReq
- type TokenResp
- type Transaction
- type TransactionListReq
- type TransactionListResp
- type UpdateCategoryReq
- type UpdateProductReq
- type UpdateProfileReq
- type UpdateReviewReq
- type UpdateSkuReq
- type UserInfo
- type WalletDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Id int64 `json:"id"` ReceiverName string `json:"receiverName"` ReceiverPhone string `json:"receiverPhone"` Province string `json:"province"` City string `json:"city"` District string `json:"district"` DetailAddress string `json:"detailAddress"` IsDefault bool `json:"isDefault"` }
type AddressReq ¶
type AddressReq struct { AddressId int64 `path:"id"` ReceiverName string `json:"receiverName"` ReceiverPhone string `json:"receiverPhone"` Province string `json:"province"` City string `json:"city"` District string `json:"district"` DetailAddress string `json:"detailAddress"` IsDefault bool `json:"isDefault,optional"` }
type BatchOperateReq ¶
type BatchOperateReq struct {
ItemIds []int64 `json:"itemIds"`
}
type CancelOrderReq ¶
type CancelOrderReq struct {
Id int64 `path:"id"`
}
type CartItem ¶
type CartItem struct { Id int64 `json:"id"` ProductId int64 `json:"productId"` ProductName string `json:"productName"` SkuId int64 `json:"skuId"` SkuName string `json:"skuName"` Image string `json:"image"` Price float64 `json:"price"` Quantity int64 `json:"quantity"` Selected bool `json:"selected"` Stock int32 `json:"stock"` CreatedAt int64 `json:"createdAt"` }
type CartItemReq ¶
type ChangePasswordReq ¶
type ConfirmOrderReq ¶
type ConfirmOrderReq struct {
Id int64 `path:"id"`
}
type CreateCategoryReq ¶
type CreateCategoryResp ¶
type CreateCategoryResp struct {
Id int64 `json:"id"`
}
type CreateOrderReq ¶
type CreatePaymentReq ¶
type CreatePaymentResp ¶
type CreateProductReq ¶
type CreateProductResp ¶
type CreateProductResp struct {
Id int64 `json:"id"`
}
type CreateRefundReq ¶
type CreateReviewReq ¶
type CreateSkuReq ¶
type CreateSkuReq struct { ProductId int64 `path:"productId"` SkuCode string `json:"skuCode"` Price float64 `json:"price"` Stock int64 `json:"stock"` Attributes []SkuAttributeReq `json:"attributes"` }
type CreateSkuResp ¶
type CreateSkuResp struct {
Id int64 `json:"id"`
}
type DeleteAddressReq ¶
type DeleteAddressReq struct {
Id int64 `path:"id"`
}
type DeleteCategoryReq ¶
type DeleteCategoryReq struct {
Id int64 `json:"id"`
}
type DeleteItemReq ¶
type DeleteProductReq ¶
type DeleteProductReq struct {
Id int64 `path:"id"`
}
type DeleteReviewReq ¶
type DeleteReviewReq struct {
Id int64 `json:"id"`
}
type GetCategoriesResp ¶
type GetCategoriesResp struct {
Categories []Category `json:"categories"`
}
type GetOrderReq ¶
type GetOrderReq struct {
Id int64 `path:"id"`
}
type GetProductReq ¶
type GetProductReq struct {
Id int64 `path:"id"`
}
type GetProductSkusReq ¶
type GetProductSkusReq struct {
Id int64 `path:"id"`
}
type GetProfileReq ¶
type GetProfileReq struct {
Id int64 `path:"id"`
}
type LogoutResp ¶
type LogoutResp struct {
Success bool `json:"success"`
}
type Order ¶
type Order struct { Id int64 `json:"id"` OrderNo string `json:"orderNo"` UserId int64 `json:"userId"` Status int32 `json:"status"` // 1:待支付 2:待发货 3:待收货 4:已完成 5:已取消 6:售后中 TotalAmount float64 `json:"totalAmount"` // 订单总金额 PayAmount float64 `json:"payAmount"` // 实付金额 FreightAmount float64 `json:"freightAmount"` // 运费 DiscountAmount float64 `json:"discountAmount"` // 优惠金额 CouponAmount float64 `json:"couponAmount"` // 优惠券抵扣 PointsAmount float64 `json:"pointsAmount"` // 积分抵扣 Items []OrderItem `json:"items"` Address Address `json:"address"` Payment Payment `json:"payment"` Shipping Shipping `json:"shipping"` Note string `json:"note"` CreatedAt int64 `json:"createdAt"` PayTime int64 `json:"payTime,optional"` ShipTime int64 `json:"shipTime,optional"` ReceiveTime int64 `json:"receiveTime,optional"` FinishTime int64 `json:"finishTime,optional"` }
type OrderItem ¶
type OrderItem struct { Id int64 `json:"id"` ProductId int64 `json:"productId"` ProductName string `json:"productName"` SkuId int64 `json:"skuId"` SkuName string `json:"skuName"` Image string `json:"image"` Price float64 `json:"price"` Quantity int32 `json:"quantity"` Amount float64 `json:"amount"` }
type OrderListReq ¶
type OrderListResp ¶
type OrderProduct ¶
type PaymentNotifyReq ¶
type PaymentNotifyResp ¶
type PaymentOrder ¶
type PaymentOrder struct { PaymentNo string `json:"paymentNo"` OrderNo string `json:"orderNo"` UserId int64 `json:"userId"` Amount float64 `json:"amount"` PaymentType int32 `json:"paymentType"` // 1:微信 2:支付宝 3:余额 Status int32 `json:"status"` // 1:待支付 2:支付中 3:已支付 4:已退款 5:已关闭 PayTime int64 `json:"payTime,optional"` ExpireTime int64 `json:"expireTime"` CreatedAt int64 `json:"createdAt"` }
type PaymentStatusReq ¶
type PaymentStatusReq struct {
PaymentNo string `path:"paymentNo"`
}
type PaymentStatusResp ¶
type Product ¶
type Product struct { Id int64 `json:"id"` Name string `json:"name"` Brief string `json:"brief"` Description string `json:"description"` CategoryId int64 `json:"categoryId"` CategoryName string `json:"categoryName"` Brand string `json:"brand"` Images []string `json:"images"` Price float64 `json:"price"` Stock int32 `json:"stock"` Sales int32 `json:"sales"` Rating float64 `json:"rating"` Status int32 `json:"status"` CreatedAt int64 `json:"createdAt"` }
type RechargeReq ¶
type RefundInfo ¶
type RefundInfo struct { Id int64 `json:"id"` OrderId int64 `json:"orderId"` RefundNo string `json:"refundNo"` Status int32 `json:"status"` // 0:待处理 1:已同意 2:已拒绝 3:已退款 Amount float64 `json:"amount"` Reason string `json:"reason"` Desc string `json:"desc"` Images []string `json:"images"` CreatedAt int64 `json:"createdAt"` }
type RefundNotifyReq ¶
type RefundNotifyResp ¶
type RefundResp ¶
type RefundStatusReq ¶
type RefundStatusReq struct {
RefundNo string `path:"refundNo"`
}
type RefundStatusResp ¶
type RegisterReq ¶
type RegisterResp ¶
type RegisterResp struct {
UserId int64 `json:"userId"`
}
type ResetPasswordReq ¶
type Review ¶
type Review struct { Id int64 `json:"id"` ProductId int64 `json:"productId"` OrderId int64 `json:"orderId"` UserId int64 `json:"userId"` UserName string `json:"userName"` Rating int32 `json:"rating"` Content string `json:"content"` Images []string `json:"images,optional"` CreatedAt int64 `json:"createdAt"` }
type ReviewListReq ¶
type SearchReq ¶
type SearchReq struct { Keyword string `form:"keyword,optional"` CategoryId int64 `form:"categoryId,optional"` BrandId int64 `form:"brandId,optional"` PriceMin float64 `form:"priceMin,optional"` PriceMax float64 `form:"priceMax,optional"` Attributes []string `form:"attributes,optional"` Sort string `form:"sort,optional"` // price,sales,rating Order string `form:"order,optional"` // asc,desc Page int32 `form:"page,optional,default=1"` }
type SearchResp ¶
type SelectedItemsResp ¶
type SkuAttributeReq ¶
type Transaction ¶
type TransactionListReq ¶
type TransactionListResp ¶
type TransactionListResp struct { List []Transaction `json:"list"` Total int64 `json:"total"` Page int32 `json:"page"` TotalPages int32 `json:"totalPages"` }
type UpdateCategoryReq ¶
type UpdateProductReq ¶
type UpdateProductReq struct { Id int64 `path:"id"` Name string `json:"name,optional"` Description string `json:"description,optional"` CategoryId int64 `json:"categoryId,optional"` Brand string `json:"brand,optional"` Images []string `json:"images,optional"` Price float64 `json:"price,optional"` Status int64 `json:"status,optional"` }
type UpdateProfileReq ¶
type UpdateReviewReq ¶
type UpdateSkuReq ¶
type UserInfo ¶
type UserInfo struct { Id int64 `json:"id"` Username string `json:"username"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Phone string `json:"phone"` Email string `json:"email"` Gender string `json:"gender"` MemberLevel int32 `json:"memberLevel"` Balance float64 `json:"balance"` CreatedAt int64 `json:"createdAt"` }
type WalletDetail ¶
Click to show internal directories.
Click to hide internal directories.