diff --git a/customer/user.go b/customer/user.go index 432b23e..edc14a4 100644 --- a/customer/user.go +++ b/customer/user.go @@ -165,3 +165,19 @@ func (u *user) FindByIds(ctx context.Context, userIds []uint) (reply []UserInfoI err = xClient.Call(ctx, "FindByIds", userIds, &reply) return } + +type UserSelectItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// Select @Title 用户筛选 +func (u *user) Select(ctx context.Context) (reply []UserSelectItem, err error) { + xClient, err := client.GetClient(u) + if err != nil { + return + } + args := 0 + err = xClient.Call(ctx, "Select", args, &reply) + return +} diff --git a/supplier/orderCancelApply.go b/supplier/orderCancelApply.go new file mode 100644 index 0000000..c20a4b1 --- /dev/null +++ b/supplier/orderCancelApply.go @@ -0,0 +1,25 @@ +package supplier + +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + +type orderCancelApply struct { +} + +type ArgsOrderCancelApply struct { + ChannelId uint + OrderSubSn string + Reason string +} + +// Apply @Title 申请取消订单 +func (o *orderCancelApply) Apply(ctx context.Context, args ArgsOrderCancelApply) error { + xClient, err := client.GetClient(o) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Apply", args, &reply) +} diff --git a/supplier/supplier.go b/supplier/supplier.go index 88101ec..4f1f704 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -11,8 +11,9 @@ type Supplier struct { Goods goods Apply supplierApply supplier - WarnLiaison warnLiaison - WalletApply supplierWalletApply + WarnLiaison warnLiaison + WalletApply supplierWalletApply + OrderCancelApply orderCancelApply } type supplier struct { diff --git a/supplier/supplierApply.go b/supplier/supplierApply.go index 29fa733..fe57bd5 100644 --- a/supplier/supplierApply.go +++ b/supplier/supplierApply.go @@ -105,6 +105,7 @@ type ArgsSupplierApplyReAudit struct { Password string // 密码 Liaison string // 联系人 Phone string // 手机号 + PayType uint // 结算类型 Annex string // 附件 } diff --git a/supply/afterService.go b/supply/afterService.go new file mode 100644 index 0000000..55f2f14 --- /dev/null +++ b/supply/afterService.go @@ -0,0 +1,57 @@ +package supply + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +const ( +//售后状态 1=售后申请中 2=客户发货 3=收货处理中 4=售后完成 5=售后关闭 +) + +type afterService struct { +} + +type ArgsRetailHistory struct { + Search RetailHistorySearch + Page bean.Page +} + +type RetailHistorySearch struct { + AfterServiceSn string `label:"售后单号"` + OrderSn string `label:"订单号"` + Status uint `label:"售后状态"` + SourceId uint `label:"所属供应商"` + CustomerId uint `label:"所属客户"` + CreateStartDate string `label:"创建开始日期"` + CreateEndDate string `label:"创建结束日期"` +} + +type RetailHistoryItem struct { + AfterServiceSn uint64 `json:"afterServiceSn"` + OrderSn uint64 `json:"orderSn"` + Name string `json:"name"` + Quantity uint `json:"quantity"` + Status uint `json:"status"` + Reason string `json:"reason"` + CreatedAt int64 `json:"createdAt"` + UpdatedAt int64 `json:"updatedAt"` + Source string `json:"source"` + CustomerId uint `json:"customerId"` +} + +type ReplyRetailHistory struct { + Lists []RetailHistoryItem `json:"lists"` + Total int64 `json:"total"` +} + +// RetailAfsHistory @Title 零售订单售后记录 +func (a *afterService) RetailAfsHistory(ctx context.Context, args ArgsRetailHistory) (reply ReplyRetailHistory, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return ReplyRetailHistory{}, err + } + err = xClient.Call(ctx, "RetailAfsHistory", args, &reply) + return +} diff --git a/supply/channel/order.go b/supply/channel/order.go index 9fb432f..98aa411 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -149,7 +149,7 @@ type ArgsOrderLists struct { type OrderItem struct { OrderId uint `json:"orderId"` - OrderSn uint64 `json:"orderSn"` + OrderSn string `json:"orderSn"` ReceiverName string `json:"receiverName"` ReceiverMobile string `json:"receiverMobile"` Address string `json:"address"` diff --git a/supply/supply.go b/supply/supply.go index 94da827..0686fc6 100644 --- a/supply/supply.go +++ b/supply/supply.go @@ -6,12 +6,13 @@ import ( ) type Supply struct { - Brand brand - Category category - Sku sku - SkuAudit skuAudit - Channel channel.Channel - Setting setting.Setting - Order order - Source sourceRpc + Brand brand + Category category + Sku sku + SkuAudit skuAudit + Channel channel.Channel + Setting setting.Setting + Order order + Source sourceRpc + AfterService afterService }