diff --git a/server_tb_LinkedMall/internal/entities/request.go b/server_tb_LinkedMall/internal/entities/request.go new file mode 100644 index 0000000..d9057ff --- /dev/null +++ b/server_tb_LinkedMall/internal/entities/request.go @@ -0,0 +1,280 @@ +package entities + +// ============================================================ +// 通用请求结构 +// ============================================================ + +// PaginationReq 分页请求公共参数 +type PaginationReq struct { + PageNum int `json:"PageNum" query:"PageNum"` + PageSize int `json:"PageSize" query:"PageSize"` +} + +// PurchaserQuery 采购方ID查询参数 +type PurchaserQuery struct { + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` +} + +// ============================================================ +// 接口 1: ListPurchaserShops +// ============================================================ +type ListPurchaserShopsReq struct { + PageNum int `json:"PageNum" query:"PageNum"` + PageSize int `json:"PageSize" query:"PageSize"` +} + +// ============================================================ +// 接口 2: GetPurchaserShop +// ============================================================ +type GetPurchaserShopReq struct { + ShopId string `json:"ShopId" params:"ShopId"` +} + +// ============================================================ +// 接口 3: ListSelectionProducts +// ============================================================ +type ListSelectionProductsReq struct { + PageNum int `json:"PageNum" query:"PageNum"` + PageSize int `json:"PageSize" query:"PageSize"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` +} + +// ============================================================ +// 接口 4: GetSelectionProduct +// ============================================================ +type GetSelectionProductReq struct { + ProductId string `json:"ProductId" params:"ProductId"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` + DivisionCode string `json:"DivisionCode" query:"DivisionCode"` +} + +// ============================================================ +// 接口 5: GetSelectionProductSaleInfo +// ============================================================ +type GetSelectionProductSaleInfoReq struct { + ProductId string `json:"ProductId" params:"ProductId"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` + DivisionCode string `json:"DivisionCode" query:"DivisionCode"` +} + +// ============================================================ +// 接口 6: ListSelectionProductSaleInfos +// ============================================================ +type ListSelectionProductSaleInfosReq struct { + PurchaserId string `json:"PurchaserId"` + ProductIdList []string `json:"ProductIdList"` + DivisionCode string `json:"DivisionCode"` +} + +// ============================================================ +// 接口 7: ListSelectionSkuSaleInfos +// ============================================================ +type ListSelectionSkuSaleInfosReq struct { + PurchaserId string `json:"PurchaserId"` + SkuIdList []string `json:"SkuIdList"` + DivisionCode string `json:"DivisionCode"` +} + +// ============================================================ +// 接口 8: ListCategories +// ============================================================ +type ListCategoriesReq struct { + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` + ParentCategoryId string `json:"ParentCategoryId" query:"ParentCategoryId"` +} + +// ============================================================ +// 接口 9: SearchProducts +// ============================================================ +type SearchProductsReq struct { + Keyword string `json:"Keyword"` + CategoryId string `json:"CategoryId"` + PageNum int `json:"PageNum"` + PageSize int `json:"PageSize"` + PurchaserId string `json:"PurchaserId"` +} + +// ============================================================ +// 接口 10: SelectionGroupAddProduct +// ============================================================ +type SelectionGroupAddProductReq struct { + PurchaserId string `json:"PurchaserId"` + ShopId string `json:"ShopId"` + ProductIdList []string `json:"ProductIdList"` +} + +// ============================================================ +// 接口 11: SelectionGroupRemoveProduct +// ============================================================ +type SelectionGroupRemoveProductReq struct { + PurchaserId string `json:"PurchaserId"` + ShopId string `json:"ShopId"` + ProductIdList []string `json:"ProductIdList"` +} + +// ============================================================ +// 接口 12: RenderPurchaseOrder +// ============================================================ +type RenderPurchaseOrderReq struct { + PurchaserId string `json:"PurchaserId"` + ShopId string `json:"ShopId"` + DivisionCode string `json:"DivisionCode"` + ItemList []RenderOrderItem `json:"ItemList"` + ReceiverInfo ReceiverInfo `json:"ReceiverInfo"` +} + +type RenderOrderItem struct { + SkuId string `json:"SkuId"` + Quantity int64 `json:"Quantity"` +} + +type ReceiverInfo struct { + ReceiverName string `json:"ReceiverName"` + ReceiverPhone string `json:"ReceiverPhone"` + ProvinceCode string `json:"ProvinceCode"` + CityCode string `json:"CityCode"` + DistrictCode string `json:"DistrictCode"` + TownCode string `json:"TownCode"` + DetailAddress string `json:"DetailAddress"` +} + +// ============================================================ +// 接口 13: SplitPurchaseOrder +// ============================================================ +type SplitPurchaseOrderReq struct { + PurchaserId string `json:"PurchaserId"` + ShopId string `json:"ShopId"` + DivisionCode string `json:"DivisionCode"` + ItemList []RenderOrderItem `json:"ItemList"` + ReceiverInfo ReceiverInfo `json:"ReceiverInfo"` +} + +// ============================================================ +// 接口 14: CreatePurchaseOrder +// ============================================================ +type CreatePurchaseOrderReq struct { + PurchaserId string `json:"PurchaserId"` + ShopId string `json:"ShopId"` + OuterPurchaseOrderId string `json:"OuterPurchaseOrderId"` + DivisionCode string `json:"DivisionCode"` + ReceiverInfo ReceiverInfo `json:"ReceiverInfo"` + SubOrderList []CreateSubOrderItem `json:"SubOrderList"` +} + +type CreateSubOrderItem struct { + SkuId string `json:"SkuId"` + Quantity int64 `json:"Quantity"` +} + +// ============================================================ +// 接口 15: GetPurchaseOrderStatus +// ============================================================ +type GetPurchaseOrderStatusReq struct { + PurchaseOrderId string `json:"PurchaseOrderId" params:"PurchaseOrderId"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` +} + +// ============================================================ +// 接口 16: GetOrder +// ============================================================ +type GetOrderReq struct { + OrderId string `json:"OrderId" params:"OrderId"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` +} + +// ============================================================ +// 接口 17: QueryOrders +// ============================================================ +type QueryOrdersReq struct { + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` + PurchaseOrderId string `json:"PurchaseOrderId" query:"PurchaseOrderId"` + PageNum int `json:"PageNum" query:"PageNum"` + PageSize int `json:"PageSize" query:"PageSize"` + StartTime string `json:"StartTime" query:"StartTime"` + EndTime string `json:"EndTime" query:"EndTime"` +} + +// ============================================================ +// 接口 18: ListLogisticsOrders +// ============================================================ +type ListLogisticsOrdersReq struct { + OrderId string `json:"OrderId" params:"OrderId"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` +} + +// ============================================================ +// 接口 19: ConfirmDisburse +// ============================================================ +type ConfirmDisburseReq struct { + OrderId string `json:"OrderId" params:"OrderId"` + PurchaserId string `json:"PurchaserId"` +} + +// ============================================================ +// 接口 20: RenderRefundOrder +// ============================================================ +type RenderRefundOrderReq struct { + PurchaserId string `json:"PurchaserId"` + OrderId string `json:"OrderId"` + OrderItemId string `json:"OrderItemId"` + RefundQuantity int64 `json:"RefundQuantity"` + RefundType string `json:"RefundType"` +} + +// ============================================================ +// 接口 21: CreateRefundOrder +// ============================================================ +type CreateRefundOrderReq struct { + PurchaserId string `json:"PurchaserId"` + OrderId string `json:"OrderId"` + OrderItemId string `json:"OrderItemId"` + RefundQuantity int64 `json:"RefundQuantity"` + RefundAmount int64 `json:"RefundAmount"` + RefundType string `json:"RefundType"` + RefundReason string `json:"RefundReason"` + OuterRefundNo string `json:"OuterRefundNo"` +} + +// ============================================================ +// 接口 22: CancelRefundOrder +// ============================================================ +type CancelRefundOrderReq struct { + RefundOrderId string `json:"RefundOrderId" params:"RefundOrderId"` + PurchaserId string `json:"PurchaserId"` +} + +// ============================================================ +// 接口 23: GetRefundOrder +// ============================================================ +type GetRefundOrderReq struct { + RefundOrderId string `json:"RefundOrderId" params:"RefundOrderId"` + PurchaserId string `json:"PurchaserId" query:"PurchaserId"` +} + +// ============================================================ +// 接口 24: CreateGoodsShippingNotice +// ============================================================ +type CreateGoodsShippingNoticeReq struct { + RefundOrderId string `json:"RefundOrderId" params:"RefundOrderId"` + PurchaserId string `json:"PurchaserId"` + LogisticsCompany string `json:"LogisticsCompany"` + TrackingNumber string `json:"TrackingNumber"` +} + +// ============================================================ +// 接口 25: QueryChildDivisionCode +// ============================================================ +type QueryChildDivisionCodeReq struct { + ParentDivisionCode string `json:"ParentDivisionCode" query:"ParentDivisionCode"` +} + +// ============================================================ +// 回调通知 +// ============================================================ +type CallbackNotification struct { + EventCode string `json:"EventCode"` + PurchaseOrderId string `json:"PurchaseOrderId"` + OrderIdList []string `json:"OrderIdList"` + Status string `json:"Status"` + RequestId string `json:"RequestId"` +} \ No newline at end of file