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

finance
黄伟 2 years ago
commit 5dde0a238a

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

@ -129,6 +129,17 @@ type ReplyAfterServiceDetail struct {
LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"`
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 售后详情

@ -14,6 +14,10 @@ const (
AfterServiceStatusHandle = 3 // 收货处理中
AfterServiceStatusFinal = 4 // 售后完成
AfterServiceStatusClose = 5 // 售后关闭
AfterServicePackageSendNone = 1 // 无
AfterServicePackageSendWait = 2 // 待客户发货
AfterServicePackageSendAlready = 3 // 客户已发货
)
type afterService struct {
@ -181,8 +185,6 @@ func (a *afterService) Lists(ctx context.Context, channelId string, args ArgsAft
type ReplyAfterServiceDetail struct {
Id uint `json:"id"`
AfsSn string `json:"afsSn"`
ReceiverName string `json:"receiverName"`
ReceiverMobile string `json:"receiverMobile"`
Status uint `json:"status"`
Result string `json:"result"`
CreatedAt int64 `json:"createdAt"`
@ -198,6 +200,17 @@ type ReplyAfterServiceDetail struct {
LogisticsCompany string `json:"logisticsCompany"`
WaybillCode string `json:"waybillCode"`
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 售后详情

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

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

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

@ -114,9 +114,13 @@ type SkuListsSearch struct {
SourceId uint // 所属供应商 1=京东
SourceSkuId uint // 供应商skuId
BrandId uint // 品牌Id
BrandIds []uint // 品牌Ids
FirstCategoryId uint // 一级分类Id
FirstCategoryIds []uint // 一级分类ids
SecondCategoryId uint // 二级分类Id
SecondCategoryIds []uint // 二级分类Ids
ThirdCategoryId uint // 三级分类Id
ThirdCategoryIds []uint // 三级分类Ids
AdjustType uint // 加价规则
MaxSupplyPrice decimal.Decimal // 最大采购价格
MinSupplyPrice decimal.Decimal // 最小采购价格
@ -160,6 +164,15 @@ type SkuItem struct {
AdjustAuditStatus uint `json:"adjustAuditStatus"` // 改价审核状态
Reason string `json:"reason"` // 改价驳回原因
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 商品列表

Loading…
Cancel
Save