Merge branch 'master' of git.oa00.com:supply-chain/service

finance
黄伟 2 years ago
commit 5dde0a238a

@ -24,6 +24,8 @@ const (
ErrorAfterServiceCloseError Error = 11018 // 售后已关闭 ErrorAfterServiceCloseError Error = 11018 // 售后已关闭
ErrorAfterServiceFinishError Error = 11019 // 售后已完成 ErrorAfterServiceFinishError Error = 11019 // 售后已完成
ErrorOrderCancelError Error = 11020 // 订单取消失败 ErrorOrderCancelError Error = 11020 // 订单取消失败
ErrorAfterServiceLogisticsAddressError Error = 11021 // 售后寄回地址获取失败
ErrorAfterServiceLogisticsAddressReturnError Error = 11022 // 售后寄回地址已回传
) )
var ErrorCodes = map[Error]string{ var ErrorCodes = map[Error]string{
@ -47,6 +49,8 @@ var ErrorCodes = map[Error]string{
ErrorAfterServiceCloseError: "售后已关闭", ErrorAfterServiceCloseError: "售后已关闭",
ErrorAfterServiceFinishError: "售后已完成", ErrorAfterServiceFinishError: "售后已完成",
ErrorOrderCancelError: "订单取消失败", ErrorOrderCancelError: "订单取消失败",
ErrorAfterServiceLogisticsAddressError: "售后寄回地址获取失败",
ErrorAfterServiceLogisticsAddressReturnError: "售后寄回地址已回传",
} }
func (e Error) Error() string { func (e Error) Error() string {

@ -129,6 +129,17 @@ type ReplyAfterServiceDetail struct {
LogisticsCompany string `json:"logisticsCompany"` LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"` WaybillCode string `json:"waybillCode"`
SendAt int64 `json:"sendAt"` SendAt int64 `json:"sendAt"`
PackageSend uint `json:"packageSend"`
AfsPackageSend AfsPackageSend `json:"afsPackageSend"`
}
type AfsPackageSend struct {
Name string `json:"name"`
Mobile string `json:"mobile"`
ZipCode string `json:"zipCode"`
Address string `json:"address"`
LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"`
SendGoodsDate int64 `json:"sendGoodsDate"`
} }
// Detail @Title 售后详情 // Detail @Title 售后详情

@ -14,6 +14,10 @@ const (
AfterServiceStatusHandle = 3 // 收货处理中 AfterServiceStatusHandle = 3 // 收货处理中
AfterServiceStatusFinal = 4 // 售后完成 AfterServiceStatusFinal = 4 // 售后完成
AfterServiceStatusClose = 5 // 售后关闭 AfterServiceStatusClose = 5 // 售后关闭
AfterServicePackageSendNone = 1 // 无
AfterServicePackageSendWait = 2 // 待客户发货
AfterServicePackageSendAlready = 3 // 客户已发货
) )
type afterService struct { type afterService struct {
@ -181,8 +185,6 @@ func (a *afterService) Lists(ctx context.Context, channelId string, args ArgsAft
type ReplyAfterServiceDetail struct { type ReplyAfterServiceDetail struct {
Id uint `json:"id"` Id uint `json:"id"`
AfsSn string `json:"afsSn"` AfsSn string `json:"afsSn"`
ReceiverName string `json:"receiverName"`
ReceiverMobile string `json:"receiverMobile"`
Status uint `json:"status"` Status uint `json:"status"`
Result string `json:"result"` Result string `json:"result"`
CreatedAt int64 `json:"createdAt"` CreatedAt int64 `json:"createdAt"`
@ -198,6 +200,17 @@ type ReplyAfterServiceDetail struct {
LogisticsCompany string `json:"logisticsCompany"` LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"` WaybillCode string `json:"waybillCode"`
SendAt int64 `json:"sendAt"` SendAt int64 `json:"sendAt"`
PackageSend uint `json:"packageSend"`
AfsPackageSend AfsPackageSend `json:"afsPackageSend"`
}
type AfsPackageSend struct {
Name string `json:"name"`
Mobile string `json:"mobile"`
ZipCode string `json:"zipCode"`
Address string `json:"address"`
LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"`
SendGoodsDate int64 `json:"sendGoodsDate"`
} }
// Detail @Title 售后详情 // Detail @Title 售后详情

@ -12,6 +12,7 @@ import (
const ( const (
ReplyOrderFreightFeeErrCodeNone = 0 // 无错误 ReplyOrderFreightFeeErrCodeNone = 0 // 无错误
ReplyOrderFreightFeeErrCodeErr = 1 // 有错误 ReplyOrderFreightFeeErrCodeErr = 1 // 有错误
ReplyOrderFreightFeeErrCodeDone = 2 // 已下架
OrderStatusLock = 1 // 锁单待确认 OrderStatusLock = 1 // 锁单待确认
OrderStatusLadingBill = 2 // 提单 OrderStatusLadingBill = 2 // 提单
@ -28,6 +29,10 @@ const (
OrderSubIsSplitFalse = 1 // 无 OrderSubIsSplitFalse = 1 // 无
OrderSubIsSplitTrue = 2 // 被拆单 OrderSubIsSplitTrue = 2 // 被拆单
OrderSubTypeApi = 1 // api接口下单
OrderSubTypeCustomerWeb = 2 // 客户商城下单
) )
type order struct { type order struct {
@ -72,6 +77,7 @@ type ArgsOrderSubmit struct {
OrderFee decimal.Decimal // 订单金额-不含运费 OrderFee decimal.Decimal // 订单金额-不含运费
FreightFees []OrderFreightFee // 运费 FreightFees []OrderFreightFee // 运费
UserIp string // 下单用户ip UserIp string // 下单用户ip
Type uint // 下单方式
} }
type OrderFreightFee struct { type OrderFreightFee struct {
@ -87,8 +93,8 @@ type Receiver struct {
} }
type ReplyOrderSubmit struct { type ReplyOrderSubmit struct {
OrderSn string OrderSn string `json:"orderSn"`
ChannelOrderSn string ChannelOrderSn string `json:"channelOrderSn"`
} }
// Submit @Title 下单 // Submit @Title 下单
@ -147,6 +153,7 @@ type ReplyOrderSplit struct {
OrderFee decimal.Decimal `json:"orderFee"` OrderFee decimal.Decimal `json:"orderFee"`
Skus []OrderSplitSkuItem `json:"skus"` Skus []OrderSplitSkuItem `json:"skus"`
SubOrders []*OrderSubSplit `json:"subOrders"` SubOrders []*OrderSubSplit `json:"subOrders"`
Type uint `json:"type"`
} }
type OrderSubSplit struct { type OrderSubSplit struct {
OrderSn string `json:"orderSn"` OrderSn string `json:"orderSn"`
@ -171,6 +178,7 @@ func (o *order) Split(ctx context.Context, channelId string, args ArgsOrderSplit
} }
type OrderListsSearch struct { type OrderListsSearch struct {
SkuIds []uint // 商品Ids
SkuName string // 商品名称 SkuName string // 商品名称
Status []uint // 订单状态 Status []uint // 订单状态
CancelStatus uint // 订单取消状态 CancelStatus uint // 订单取消状态
@ -203,6 +211,7 @@ type OrderItem struct {
CloseAt int64 `json:"closeAt"` CloseAt int64 `json:"closeAt"`
Skus []OrderSku `json:"skus"` Skus []OrderSku `json:"skus"`
Packages []OrderPackage `json:"packages"` Packages []OrderPackage `json:"packages"`
StockOutAt int64 `json:"stockOutAt"`
} }
type OrderSku struct { type OrderSku struct {
@ -236,6 +245,30 @@ func (o *order) Lists(ctx context.Context, channelId string, args ArgsOrderLists
return return
} }
type ArgsOrderDetail struct {
RootOrderSn string
ChannelOrderSn string
}
type ReplyOrderDetail struct {
ChannelOrderSn string
OrderSn string
OrderFee decimal.Decimal
FreightFee decimal.Decimal
Receiver OrderReceiver
CreatedAt int64
LadingBillAt int64
CloseAt int64
}
type OrderReceiver struct {
ReceiverName string
ReceiverMobile string
ReceiverEmail string
ReceiverZipCode string
Address string
UserIp string
}
// Detail @Title 订单详情 // Detail @Title 订单详情
func (o *order) Detail(ctx context.Context, channelId string, orderSn string) (reply OrderItem, err error) { func (o *order) Detail(ctx context.Context, channelId string, orderSn string) (reply OrderItem, err error) {
xClient, err := client.GetClient(o) xClient, err := client.GetClient(o)

@ -9,6 +9,7 @@ type skuState uint
const ( const (
SkuStateIn = 1 // 有货 SkuStateIn = 1 // 有货
SkuStateOut = 2 // 无货 SkuStateOut = 2 // 无货
SkuStateDone = 3 // 下架商品
) )
type Sku interface { type Sku interface {

@ -106,6 +106,7 @@ type ArgsRetailOrderLists struct {
type RetailOrderSearch struct { type RetailOrderSearch struct {
OrderSubSn uint64 `label:"订单号"` OrderSubSn uint64 `label:"订单号"`
SourceSubSn uint64 `label:"供应商订单号"`
SupplierId uint `label:"供应商"` SupplierId uint `label:"供应商"`
CustomerId uint `label:"客户"` CustomerId uint `label:"客户"`
WaybillCode string `label:"运单号"` WaybillCode string `label:"运单号"`
@ -152,6 +153,8 @@ type OrderInfo struct {
CustomerId uint `json:"customerId"` CustomerId uint `json:"customerId"`
OrderSn uint64 `json:"orderSn"` OrderSn uint64 `json:"orderSn"`
SourceOrderSn uint64 `json:"sourceOrderSn"` SourceOrderSn uint64 `json:"sourceOrderSn"`
SourceId uint `json:"sourceId"`
SourceName string `json:"sourceName"`
ReceiverName string `json:"receiverName"` ReceiverName string `json:"receiverName"`
ReceiverMobile string `json:"receiverMobile"` ReceiverMobile string `json:"receiverMobile"`
Address string `json:"address"` Address string `json:"address"`

@ -114,9 +114,13 @@ type SkuListsSearch struct {
SourceId uint // 所属供应商 1=京东 SourceId uint // 所属供应商 1=京东
SourceSkuId uint // 供应商skuId SourceSkuId uint // 供应商skuId
BrandId uint // 品牌Id BrandId uint // 品牌Id
BrandIds []uint // 品牌Ids
FirstCategoryId uint // 一级分类Id FirstCategoryId uint // 一级分类Id
FirstCategoryIds []uint // 一级分类ids
SecondCategoryId uint // 二级分类Id SecondCategoryId uint // 二级分类Id
SecondCategoryIds []uint // 二级分类Ids
ThirdCategoryId uint // 三级分类Id ThirdCategoryId uint // 三级分类Id
ThirdCategoryIds []uint // 三级分类Ids
AdjustType uint // 加价规则 AdjustType uint // 加价规则
MaxSupplyPrice decimal.Decimal // 最大采购价格 MaxSupplyPrice decimal.Decimal // 最大采购价格
MinSupplyPrice decimal.Decimal // 最小采购价格 MinSupplyPrice decimal.Decimal // 最小采购价格
@ -160,6 +164,15 @@ type SkuItem struct {
AdjustAuditStatus uint `json:"adjustAuditStatus"` // 改价审核状态 AdjustAuditStatus uint `json:"adjustAuditStatus"` // 改价审核状态
Reason string `json:"reason"` // 改价驳回原因 Reason string `json:"reason"` // 改价驳回原因
UpcCode string `json:"upcCode"` // 商品条码 UpcCode string `json:"upcCode"` // 商品条码
Color string `json:"color"` // 颜色
Size string `json:"size"` // 尺寸
Attributes []AttributeItem `json:"attributes"` // 商品属性
}
type AttributeItem struct {
GroupName string `json:"groupName"`
Name string `json:"name"`
Value string `json:"value"`
} }
// Lists @Title 商品列表 // Lists @Title 商品列表

Loading…
Cancel
Save