From 23503d04f55f80b9c051c7dc8cd56dc787de4a2d Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 8 Oct 2022 13:19:45 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 supply/afterService.go diff --git a/supply/afterService.go b/supply/afterService.go new file mode 100644 index 0000000..fc82f38 --- /dev/null +++ b/supply/afterService.go @@ -0,0 +1,53 @@ +package supply + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +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"` +} + +// RetailHistory @Title 零售订单售后记录 +func (a *afterService) RetailHistory(ctx context.Context, args ArgsRetailHistory) (reply ReplyRetailHistory, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return ReplyRetailHistory{}, err + } + err = xClient.Call(ctx, "RetailHistory", args, &reply) + return +} From eee15fba699aecb6ebe58af2916efb2ff07efbe9 Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 8 Oct 2022 13:21:44 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/supply.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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 } From 55cc110f857524376a4e55a50874037574669b8f Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 8 Oct 2022 13:45:56 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supply/afterService.go b/supply/afterService.go index fc82f38..c0f6b25 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -48,6 +48,6 @@ func (a *afterService) RetailHistory(ctx context.Context, args ArgsRetailHistory if err != nil { return ReplyRetailHistory{}, err } - err = xClient.Call(ctx, "RetailHistory", args, &reply) + err = xClient.Call(ctx, "RetailAfsLists", args, &reply) return } From 2bd797dfbd894b83183dbc77b1f894ab62d7db7f Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 8 Oct 2022 14:23:31 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/afterService.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/supply/afterService.go b/supply/afterService.go index c0f6b25..55f2f14 100644 --- a/supply/afterService.go +++ b/supply/afterService.go @@ -6,6 +6,10 @@ import ( "git.oa00.com/supply-chain/service/lib/bean" ) +const ( +//售后状态 1=售后申请中 2=客户发货 3=收货处理中 4=售后完成 5=售后关闭 +) + type afterService struct { } @@ -42,12 +46,12 @@ type ReplyRetailHistory struct { Total int64 `json:"total"` } -// RetailHistory @Title 零售订单售后记录 -func (a *afterService) RetailHistory(ctx context.Context, args ArgsRetailHistory) (reply ReplyRetailHistory, err error) { +// 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, "RetailAfsLists", args, &reply) + err = xClient.Call(ctx, "RetailAfsHistory", args, &reply) return } From 9858d46df9d2902630f3f21f4130c7f9fc81bf47 Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 8 Oct 2022 14:33:58 +0800 Subject: [PATCH 05/10] - --- customer/user.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 +} From c767a7e6c71ac2cfc15aad0b6874d372e9cb105c Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 9 Oct 2022 14:16:04 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"` From 1202710fa2f2d0e0063f2057663e540b3bf406ef Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 10 Oct 2022 10:19:38 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E8=AE=A2=E5=8D=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/orderCancelApply.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 supplier/orderCancelApply.go diff --git a/supplier/orderCancelApply.go b/supplier/orderCancelApply.go new file mode 100644 index 0000000..cd2d09e --- /dev/null +++ b/supplier/orderCancelApply.go @@ -0,0 +1,24 @@ +package supplier + +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + +type orderCancelApply struct { +} + +type ArgsOrderCancelApply struct { + 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) +} From 955a26c0b9060e680b17a2918332ba27b8591339 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 10 Oct 2022 10:26:38 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 { From 710633181b047b554fce2b73a31009cee87d307d Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 10 Oct 2022 10:30:04 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/orderCancelApply.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/orderCancelApply.go b/supplier/orderCancelApply.go index cd2d09e..c20a4b1 100644 --- a/supplier/orderCancelApply.go +++ b/supplier/orderCancelApply.go @@ -9,6 +9,7 @@ type orderCancelApply struct { } type ArgsOrderCancelApply struct { + ChannelId uint OrderSubSn string Reason string } From 8c2ea1392d56f9e1fd08ed2643acaaaf17d8ceda Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 10 Oct 2022 11:35:53 +0800 Subject: [PATCH 10/10] bug fix --- supplier/supplierApply.go | 1 + 1 file changed, 1 insertion(+) 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 // 附件 }