From 5aa853da17022515444e40db3b230f6eec1b6111 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 1 Nov 2022 11:54:11 +0800 Subject: [PATCH] =?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/skuAudit.go | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/supply/skuAudit.go b/supply/skuAudit.go index e714cb8..c49e7db 100644 --- a/supply/skuAudit.go +++ b/supply/skuAudit.go @@ -2,11 +2,9 @@ package supply import ( "context" - "database/sql" "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" - "time" ) type skuAudit struct { @@ -22,26 +20,41 @@ type SkuAuditSearch struct { AdjustType uint // 加价类型 Status uint // 状态 1=未审核 2=通过 3=驳回 } + +type ArgsSkuAuditEsLists struct { + Search SkuAuditEsSearch + Page bean.Page +} + +type SkuAuditEsSearch struct { + SourceId uint // 供应商id + SourceSonId uint // 沙马供应商的供应商 + AdjustType uint // 加价类型 + Status uint // 状态 1=未审核 2=通过 3=驳回 + AfterMinDiscount decimal.Decimal // 加价后最低折扣 + AfterMaxDiscount decimal.Decimal // 加价后最高折扣 +} + type SkuAndAuditItem struct { - AuditId uint `json:"auditId"` + Id uint `json:"id"` SkuId uint `json:"skuId"` Name string `json:"name"` SupplyPrice decimal.Decimal `json:"supplyPrice"` GuidePrice decimal.Decimal `json:"guidePrice"` AdjustType uint `json:"adjustType"` AdjustPrice decimal.Decimal `json:"adjustPrice"` - CustomerPrice decimal.Decimal `json:"customerPrice"` - Category string `json:"category"` + AfterPrice decimal.Decimal `json:"afterPrice"` + AfterDiscount decimal.Decimal `json:"afterDiscount"` BrandName string `json:"brandName"` SourceName string `json:"sourceName"` AuditUserId uint `json:"auditUserId"` - AuditAt sql.NullTime `json:"auditAt"` + AuditAt int64 `json:"auditAt"` ImgUrl string `json:"imgUrl"` Reason string `json:"reason"` FirstCategoryName string `json:"firstCategoryName"` SecondCategoryName string `json:"secondCategoryName"` ThirdCategoryName string `json:"thirdCategoryName"` - CreatedAt time.Time `json:"createdAt"` + CreatedAt int64 `json:"createdAt"` } type ReplySkuAuditLists struct { @@ -59,6 +72,16 @@ func (s *skuAudit) Lists(ctx context.Context, args ArgsSkuAuditLists) (reply Rep return } +// ListsEs @Title 审核列表 +func (s *skuAudit) ListsEs(ctx context.Context, args ArgsSkuAuditEsLists) (reply ReplySkuAuditLists, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "ListsEs", args, &reply) + return +} + type ArgsSkuAuditAdopt struct { AuditUserId uint // 审核人 AuditIds []uint // 审核单id