From 55e2e6abdea194ca86fef34e5ca3424706eef0d5 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 8 Feb 2023 15:44:31 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/task.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jd/task.go b/jd/task.go index a8bf25c..5175506 100644 --- a/jd/task.go +++ b/jd/task.go @@ -39,8 +39,9 @@ func (t *task) RefreshToken(ctx context.Context) error { } type ReplySkuAddStatus struct { - Total uint - Count uint + Total uint + Count uint + StartTime int64 } // GetSkuAddStatus @Title 获取同步状态 From acb766a5f9d73155c1a26723f25b39fa356d9b0c Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 9 Feb 2023 17:15:32 +0800 Subject: [PATCH 02/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/afsAudit.go | 84 ++++++++++++++++++++++++++++++++++++++++++++ supplier/supplier.go | 1 + 2 files changed, 85 insertions(+) create mode 100644 supplier/afsAudit.go diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go new file mode 100644 index 0000000..300e201 --- /dev/null +++ b/supplier/afsAudit.go @@ -0,0 +1,84 @@ +package supplier + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" + "github.com/shopspring/decimal" +) + +type afsAudit struct { +} +type ArgsAfsAuditLists struct { + Search AfsAuditSearch + Page bean.Page +} +type AfsAuditSearch struct { + Status uint // 0=全部 1=待审核 2=审核通过 3=审核驳回 + AfsSn string + OrderSubSn string + CreatedStartDate string + CreatedEndDate string +} + +type ReplyAfsAuditLists struct { + Lists []AfsAuditItem + Total int64 +} +type AfsAuditItem struct { + Id uint `json:"id"` + AfsSn uint64 `json:"afsSn"` + OrderSubSn uint64 `json:"orderSubSn"` + Status uint `json:"status"` + Quantity uint `json:"quantity"` + OrderSubAfsId uint `json:"orderSubAfsId"` + RefundFee decimal.Decimal `json:"refundFee"` + Remark string `json:"remark"` + Result string `json:"result"` + Notes string `json:"notes"` + RefundId uint `json:"refundId"` + ApplyUserId uint `json:"applyUserId"` + AuditUserId uint `json:"auditUserId"` + AuditAt int64 `json:"auditAt"` +} + +// Lists @Title 售后审核列表 +func (a *afsAudit) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} + +type ArgsAfsAuditAdopt struct { + AuditUserId uint + AfsAuditId uint +} + +// Adopt @Title 审核通过 +func (a *afsAudit) Adopt(ctx context.Context, args ArgsAfsAuditAdopt) error { + xClient, err := client.GetClient(a) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Adopt", args, &reply) +} + +type ArgsAfsAuditReject struct { + AuditUserId uint + Remark string + AfsAuditId uint +} + +// Reject @Title 审核驳回 +func (a *afsAudit) Reject(ctx context.Context, args ArgsAfsAuditReject) error { + xClient, err := client.GetClient(a) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Reject", args, &reply) +} diff --git a/supplier/supplier.go b/supplier/supplier.go index 746c54d..306f22f 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -17,6 +17,7 @@ type Supplier struct { LogisticsCompany logisticsCompany ReturnAddress returnAddress Afs afs + AfsAudit afsAudit BatchGoods batch.Goods } From 25c4f065314c2c5e38de51057c1d3a07a99306c4 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 9 Feb 2023 17:17:01 +0800 Subject: [PATCH 03/13] =?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/goods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/goods.go b/supplier/goods.go index 400d922..41a7929 100644 --- a/supplier/goods.go +++ b/supplier/goods.go @@ -180,7 +180,7 @@ func (g *goods) ReHandle(ctx context.Context, goodsIds []uint) (reply []AdoptIte type ReplyByIdItem struct { SkuId uint `json:"skuId"` - SupplierId uint `json:"supplierIds"` + SupplierId uint `json:"supplierId"` SupplierName string `json:"supplierName"` } From a511f376e29125b13c699b3af4e25685350249e7 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 09:33:19 +0800 Subject: [PATCH 04/13] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/afsAudit.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go index 300e201..24dcaa5 100644 --- a/supplier/afsAudit.go +++ b/supplier/afsAudit.go @@ -82,3 +82,18 @@ func (a *afsAudit) Reject(ctx context.Context, args ArgsAfsAuditReject) error { reply := 0 return xClient.Call(ctx, "Reject", args, &reply) } + +type ArgsSetAfsAuditPrice struct { + Price decimal.Decimal + Switch uint +} + +// SetAfsAuditPrice @Title 设置需要审核金额 +func (a *afsAudit) SetAfsAuditPrice(ctx context.Context, args ArgsSetAfsAuditPrice) error { + xClient, err := client.GetClient(a) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "SetAfsAuditPrice", args, &reply) +} From 7f24bf8fa14b3a5f6ade826d64ec43f4efef6f43 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 09:39:08 +0800 Subject: [PATCH 05/13] =?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/afsAudit.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go index 24dcaa5..dedd1a0 100644 --- a/supplier/afsAudit.go +++ b/supplier/afsAudit.go @@ -7,6 +7,11 @@ import ( "github.com/shopspring/decimal" ) +const ( + AfsAuditSwitchOn = 1 // 开 + AfsAuditSwitchOff = 2 // 关 +) + type afsAudit struct { } type ArgsAfsAuditLists struct { From c220a0410b97dae740307804d20c08f454058894 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 09:52:56 +0800 Subject: [PATCH 06/13] =?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/afsAudit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go index dedd1a0..647f59b 100644 --- a/supplier/afsAudit.go +++ b/supplier/afsAudit.go @@ -48,7 +48,7 @@ type AfsAuditItem struct { } // Lists @Title 售后审核列表 -func (a *afsAudit) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists, err error) { +func (a *afsAudit) Lists(ctx context.Context, args ArgsAfsAuditLists) (reply ReplyAfsAuditLists, err error) { xClient, err := client.GetClient(a) if err != nil { return From f8b767507b35a55bb9d36a30042e2c590dcfa36a Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 10:12:50 +0800 Subject: [PATCH 07/13] =?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/afsAudit.go | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go index 647f59b..185b8c1 100644 --- a/supplier/afsAudit.go +++ b/supplier/afsAudit.go @@ -93,12 +93,28 @@ type ArgsSetAfsAuditPrice struct { Switch uint } -// SetAfsAuditPrice @Title 设置需要审核金额 -func (a *afsAudit) SetAfsAuditPrice(ctx context.Context, args ArgsSetAfsAuditPrice) error { +// SetAfsAuditConfig @Title 设置售后审核配置 +func (a *afsAudit) SetAfsAuditConfig(ctx context.Context, args ArgsSetAfsAuditPrice) error { xClient, err := client.GetClient(a) if err != nil { return err } reply := 0 - return xClient.Call(ctx, "SetAfsAuditPrice", args, &reply) + return xClient.Call(ctx, "SetAfsAuditConfig", args, &reply) +} + +type ReplyAfsAuditConfig struct { + Price decimal.Decimal + Switch uint +} + +// GetAfsAuditConfig @Title 获取售后审核配置 +func (a *afsAudit) GetAfsAuditConfig(ctx context.Context) (reply ReplyAfsAuditConfig, err error) { + xClient, err := client.GetClient(a) + if err != nil { + return + } + args := 0 + err = xClient.Call(ctx, "GetAfsAuditConfig", args, &reply) + return } From 5fc172010d685058d6a27a84bc78ef5c0007f8b0 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 11:21:07 +0800 Subject: [PATCH 08/13] =?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/afsAudit.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go index 185b8c1..a14f4b3 100644 --- a/supplier/afsAudit.go +++ b/supplier/afsAudit.go @@ -34,6 +34,7 @@ type AfsAuditItem struct { Id uint `json:"id"` AfsSn uint64 `json:"afsSn"` OrderSubSn uint64 `json:"orderSubSn"` + SkuName string `json:"skuName"` Status uint `json:"status"` Quantity uint `json:"quantity"` OrderSubAfsId uint `json:"orderSubAfsId"` @@ -41,9 +42,6 @@ type AfsAuditItem struct { Remark string `json:"remark"` Result string `json:"result"` Notes string `json:"notes"` - RefundId uint `json:"refundId"` - ApplyUserId uint `json:"applyUserId"` - AuditUserId uint `json:"auditUserId"` AuditAt int64 `json:"auditAt"` } From a9599eb0a0242d4e8dbd3efc51dbab84af9fe924 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 11:24:34 +0800 Subject: [PATCH 09/13] =?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/afs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplier/afs.go b/supplier/afs.go index 08ce9dd..4d4bad3 100644 --- a/supplier/afs.go +++ b/supplier/afs.go @@ -32,10 +32,10 @@ type AfsItem struct { Id uint `json:"id"` AfsSn string `json:"afsSn"` OrderSubSn string `json:"orderSubSn"` - SkuId uint `json:"skuId"` SkuName string `json:"skuName"` Quantity uint `json:"quantity"` Status uint `json:"status"` + AuditStatus uint `json:"manageStatus"` Result string `json:"result"` OrderFee decimal.Decimal `json:"orderFee"` CreatedAt int64 `json:"createdAt"` From 00eeecef7b777120775473119d5cfba3ce954905 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 11:28:30 +0800 Subject: [PATCH 10/13] =?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/afs.go | 1 + supplier/afsAudit.go | 1 + 2 files changed, 2 insertions(+) diff --git a/supplier/afs.go b/supplier/afs.go index 4d4bad3..94adc87 100644 --- a/supplier/afs.go +++ b/supplier/afs.go @@ -57,6 +57,7 @@ type ReplyAfsDetail struct { Id uint `json:"id"` AfsSn string `json:"afsSn"` Status uint `json:"status"` + AuditStatus uint `json:"auditStatus"` ApproveNotes string `json:"approveNotes"` Result string `json:"result"` CreatedAt int64 `json:"createdAt"` diff --git a/supplier/afsAudit.go b/supplier/afsAudit.go index a14f4b3..c5af126 100644 --- a/supplier/afsAudit.go +++ b/supplier/afsAudit.go @@ -43,6 +43,7 @@ type AfsAuditItem struct { Result string `json:"result"` Notes string `json:"notes"` AuditAt int64 `json:"auditAt"` + CreatedAt int64 `json:"createdAt"` } // Lists @Title 售后审核列表 From 77542de578d907a36e2b3d5c0f1c85b2673bde6d Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 14:01:53 +0800 Subject: [PATCH 11/13] =?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/afs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/afs.go b/supplier/afs.go index 94adc87..df04bec 100644 --- a/supplier/afs.go +++ b/supplier/afs.go @@ -55,6 +55,7 @@ func (a *afs) Lists(ctx context.Context, args ArgsAfsLists) (reply ReplyAfsLists type ReplyAfsDetail struct { Id uint `json:"id"` + AuditId uint `json:"auditId"` AfsSn string `json:"afsSn"` Status uint `json:"status"` AuditStatus uint `json:"auditStatus"` From 40663ccfbc238db1d82e064eb043bf473db1f087 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 14:16:05 +0800 Subject: [PATCH 12/13] =?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/afs.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/supplier/afs.go b/supplier/afs.go index df04bec..0a2c308 100644 --- a/supplier/afs.go +++ b/supplier/afs.go @@ -176,9 +176,10 @@ func (a *afs) Refund(ctx context.Context, args ArgsAfsRefund) (err error) { } type ArgsAfsCompensate struct { - AfsSn string `json:"afsSn"` - RefundFee decimal.Decimal `json:"refundFee"` - Notes string `json:"notes"` + ApplyUserId uint `json:"applyUserId"` + AfsSn string `json:"afsSn"` + RefundFee decimal.Decimal `json:"refundFee"` + Notes string `json:"notes"` } // Compensate @Title 订单赔偿 From dad4fdd766e3e35caf7c057205813a962cf709f1 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 10 Feb 2023 14:17:43 +0800 Subject: [PATCH 13/13] =?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/afs.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supplier/afs.go b/supplier/afs.go index 0a2c308..ec1b7b1 100644 --- a/supplier/afs.go +++ b/supplier/afs.go @@ -180,6 +180,7 @@ type ArgsAfsCompensate struct { AfsSn string `json:"afsSn"` RefundFee decimal.Decimal `json:"refundFee"` Notes string `json:"notes"` + RefundId uint `json:"refundId"` } // Compensate @Title 订单赔偿