From be1ab67e7f972749b28c57b57c9e668474ed8976 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 3 Aug 2022 10:12:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9A=B4=E9=9C=B2service=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/service.go | 6 ++++++ customer/service/audit.go | 7 +++++-- customer/service/audit/supply.go | 10 +++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/customer/service.go b/customer/service.go index 1712f31..dee26e8 100644 --- a/customer/service.go +++ b/customer/service.go @@ -1,5 +1,7 @@ package customer +import "git.oa00.com/supply-chain/service/customer/service" + type serviceId uint const ( @@ -10,3 +12,7 @@ const ( UserServiceStatusAdopt = 2 // 审核通过 UserServiceStatusReject = 3 // 审核驳回 ) + +type Service struct { + Audit service.Audit +} diff --git a/customer/service/audit.go b/customer/service/audit.go index 27ee3c6..e24a879 100644 --- a/customer/service/audit.go +++ b/customer/service/audit.go @@ -3,11 +3,14 @@ package service import ( "context" "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/customer/service/audit" "git.oa00.com/supply-chain/service/lib/bean" ) -type audit struct { +type Audit struct { + Supply audit.Supply } + type AuditSearch struct { Status uint // 审核状态 1=未审核 2=通过 3=驳回 Name string // 用户名称 @@ -33,7 +36,7 @@ type ReplyAuditLists struct { } // Lists @Title 服务审核列表 -func (a *audit) Lists(ctx context.Context, args ArgsAuditLists) (reply ReplyAuditLists, err error) { +func (a *Audit) Lists(ctx context.Context, args ArgsAuditLists) (reply ReplyAuditLists, err error) { err = client.GetClient(a).Call(ctx, "Lists", args, &reply) return } diff --git a/customer/service/audit/supply.go b/customer/service/audit/supply.go index 64c7891..56c145e 100644 --- a/customer/service/audit/supply.go +++ b/customer/service/audit/supply.go @@ -5,7 +5,7 @@ import ( "git.oa00.com/supply-chain/service/client" ) -type supply struct { +type Supply struct { } type ArgsSupplyApply struct { @@ -17,7 +17,7 @@ type ArgsSupplyApply struct { } // Apply @Title 申请 -func (s *supply) Apply(ctx context.Context, args ArgsSupplyApply) error { +func (s *Supply) Apply(ctx context.Context, args ArgsSupplyApply) error { reply := 0 return client.GetClient(s).Call(ctx, "Apply", args, &reply) } @@ -28,7 +28,7 @@ type ArgsSupplyAdopt struct { } // Adopt @Title 审核通过 -func (s *supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error { +func (s *Supply) Adopt(ctx context.Context, args ArgsSupplyAdopt) error { reply := 0 return client.GetClient(s).Call(ctx, "Adopt", args, &reply) } @@ -40,7 +40,7 @@ type ArgsSupplyReject struct { } // Reject @Title 驳回 -func (s *supply) Reject(ctx context.Context, args ArgsSupplyReject) error { +func (s *Supply) Reject(ctx context.Context, args ArgsSupplyReject) error { reply := 0 return client.GetClient(s).Call(ctx, "Reject", args, &reply) } @@ -62,7 +62,7 @@ type ReplySupplyInfo struct { } // Info @Title 详情 -func (s *supply) Info(ctx context.Context, userServiceId uint) (reply ReplySupplyInfo, err error) { +func (s *Supply) Info(ctx context.Context, userServiceId uint) (reply ReplySupplyInfo, err error) { err = client.GetClient(s).Call(ctx, "Info", userServiceId, &reply) return } From 015176e15f2ecca915dc8322e739975b2722d934 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 3 Aug 2022 10:46:36 +0800 Subject: [PATCH 2/3] bug fix --- supply/sku.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/sku.go b/supply/sku.go index 79ee92f..500f3f5 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -57,6 +57,7 @@ type ArgsSkuAdd struct { Content string // 商品详情 Imgs []SkuImg // 商品图片 第一张主图 Specifications []SkuSpecification // 商品参数信息 + ImgUrl string // 商品主图 } type SkuImg struct { From f408b436a1586f5bdac0ce2fb8f623a62a631c51 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 3 Aug 2022 11:20:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/sku.go | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/supply/sku.go b/supply/sku.go index 79ee92f..a279236 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -123,30 +123,30 @@ type SkuListsSearch struct { } type ReplySkuList struct { - Lists []SkuItem - Total int64 + Lists []SkuItem `json:"lists"` + Total int64 `json:"total"` } type SkuItem struct { - Id uint - Name string // 名称 - BrandName string // 品牌名称 - FirstCategoryId uint // 一级分类id - SecondCategoryId uint // 二级分类id - ThirdCategoryId uint // 三级分类id - SupplyPrice decimal.Decimal // 采购价 - GuidePrice decimal.Decimal // 指导价 - ImgUrl string // 商品主图 - PlatformStatus uint // 平台状态 1=上架 2=下架 - SourceName string // 供应商名称 - SourceSkuId string // 源skuId - SourceStatus uint // 供应商状态 1=上架 2=下架 - CustomerPrice decimal.Decimal // 供货最高价 - CustomerProfitRate decimal.Decimal // 供货利润率 供货利润/供货最高价% - AdjustType uint // 加价类型 - AdjustPrice decimal.Decimal // 加价金额 - Handle uint // 1=未处理 2=已处理 - Reason string // 驳回原因 + Id uint `json:"id"` + Name string `json:"name"` // 名称 + BrandName string `json:"brandName"` // 品牌名称 + FirstCategoryId uint `json:"firstCategoryId"` // 一级分类id + SecondCategoryId uint `json:"secondCategoryId"` // 二级分类id + ThirdCategoryId uint `json:"thirdCategoryId"` // 三级分类id + SupplyPrice decimal.Decimal `json:"supplyPrice"` // 采购价 + GuidePrice decimal.Decimal `json:"guidePrice"` // 指导价 + ImgUrl string `json:"imgUrl"` // 商品主图 + PlatformStatus uint `json:"platformStatus"` // 平台状态 1=上架 2=下架 + SourceName string `json:"sourceName"` // 供应商名称 + SourceSkuId string `json:"sourceSkuId"` // 源skuId + SourceStatus uint `json:"sourceStatus"` // 供应商状态 1=上架 2=下架 + CustomerPrice decimal.Decimal `json:"customerPrice"` // 供货最高价 + CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价% + AdjustType uint `json:"adjustType"` // 加价类型 + AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 + Handle uint `json:"handle"` // 1=未处理 2=已处理 + Reason string `json:"reason"` // 驳回原因 } // Lists @Title 商品列表