From 08afe3f664df675d721f602fbfb9573ba7c08d01 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 3 Aug 2022 11:34:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/customer.go | 5 ++++- customer/service/audit.go | 2 ++ customer/service/audit/audit.go | 5 +++++ customer/service/audit/supply.go | 6 +++--- customer/service/service.go | 5 +++++ 5 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 customer/service/audit/audit.go create mode 100644 customer/service/service.go diff --git a/customer/customer.go b/customer/customer.go index 2ce164f..aef31de 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -1,5 +1,8 @@ package customer +import "git.oa00.com/supply-chain/service/customer/service" + type Customer struct { - User user + User user + Service service.Service } diff --git a/customer/service/audit.go b/customer/service/audit.go index bb7bd49..553b5b1 100644 --- a/customer/service/audit.go +++ b/customer/service/audit.go @@ -3,10 +3,12 @@ package service import ( "context" "git.oa00.com/supply-chain/service/client" + audit2 "git.oa00.com/supply-chain/service/customer/service/audit" "git.oa00.com/supply-chain/service/lib/bean" ) type audit struct { + audit2.Audit } type AuditSearch struct { Status uint // 审核状态 1=未审核 2=通过 3=驳回 diff --git a/customer/service/audit/audit.go b/customer/service/audit/audit.go new file mode 100644 index 0000000..ccbd49d --- /dev/null +++ b/customer/service/audit/audit.go @@ -0,0 +1,5 @@ +package audit + +type Audit struct { + Supply supply +} diff --git a/customer/service/audit/supply.go b/customer/service/audit/supply.go index 821f006..368109e 100644 --- a/customer/service/audit/supply.go +++ b/customer/service/audit/supply.go @@ -9,7 +9,7 @@ type supply struct { } type ArgsSupplyApply struct { - ApplyId uint // 申请人id + ApplyUserId uint // 申请人id CustomerId uint // 客户id RateId uint // 费率id ExpirationAt int64 // 到期时间 @@ -27,7 +27,7 @@ func (s *supply) Apply(ctx context.Context, args ArgsSupplyApply) error { } type ArgsSupplyAdopt struct { - AuditId uint // 审核人id + AuditUserId uint // 审核人id UserServiceId uint // 客户服务id } @@ -42,7 +42,7 @@ func (s *supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error { } type ArgsSupplyReject struct { - AuditId uint // 审核人id + AuditUserId uint // 审核人id UserServiceId uint // 客户服务id Reason string // 驳回原因 } diff --git a/customer/service/service.go b/customer/service/service.go new file mode 100644 index 0000000..6a8ec8c --- /dev/null +++ b/customer/service/service.go @@ -0,0 +1,5 @@ +package service + +type Service struct { + Audit audit +} From c2710b480baf77a59651708c9f40d6f7f13bd6ee Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 3 Aug 2022 14:15:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=B1=BB=E7=9B=AE?= =?UTF-8?q?=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/category.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jd/category.go b/jd/category.go index 2aad24d..93d831e 100644 --- a/jd/category.go +++ b/jd/category.go @@ -63,3 +63,21 @@ func (c *category) Select(ctx context.Context) (reply []CategoryItem, err error) err = xClient.Call(ctx, "Select", args, &reply) return } + +type ArgsCategoryImport struct { + First string + Second string + Third string + SupplyCategoryId uint +} + +// Import @Title 导入 +func (*category) Import(ctx context.Context, args ArgsCategoryImport) (err error) { + reply := 0 + xClient, err := client.GetClient(ctx) + if err != nil { + return + } + err = xClient.Call(ctx, "Import", args, &reply) + return +} From 7f8cf737e4ed03b12acf7fb9bcb7ab141428b5bb Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 3 Aug 2022 14:17:56 +0800 Subject: [PATCH 3/3] bug fix --- jd/category.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd/category.go b/jd/category.go index 93d831e..54cf054 100644 --- a/jd/category.go +++ b/jd/category.go @@ -72,7 +72,7 @@ type ArgsCategoryImport struct { } // Import @Title 导入 -func (*category) Import(ctx context.Context, args ArgsCategoryImport) (err error) { +func (*category) Import(ctx context.Context, args []ArgsCategoryImport) (err error) { reply := 0 xClient, err := client.GetClient(ctx) if err != nil {