From a6c9c0b4481b69536d78716195a53ce39c7d4b3e Mon Sep 17 00:00:00 2001 From: timerzz Date: Sat, 31 Aug 2024 18:31:24 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E4=BF=AE=E6=94=B9sellerId=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/storage/provider-article.go | 12 ++++++------ structs/storage/provider.go | 6 +++--- structs/storage/seller-article.go | 12 ++++++------ structs/storage/seller.go | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/structs/storage/provider-article.go b/structs/storage/provider-article.go index fcd20eb..2292a96 100644 --- a/structs/storage/provider-article.go +++ b/structs/storage/provider-article.go @@ -26,11 +26,11 @@ func NewProviderArticleApi(db *gorm.DB) ProviderArticleApi { // ******************GET type GetProviderArticleQuery struct { - ID uint `query:"id"` - Brand v2.Brand `query:"brand"` - Pid string `query:"pid"` - ProviderId string `query:"providerId"` - SkuId string `query:"skuId"` + ID uint `query:"id"` + Brand v2.Brand `query:"brand"` + Pid string `query:"pid"` + ProviderId v2.ProviderId `query:"providerId"` + SkuId string `query:"skuId"` } func NewGetProviderArticleQuery() *GetProviderArticleQuery { @@ -50,7 +50,7 @@ func (g *GetProviderArticleQuery) SetPid(pid string) *GetProviderArticleQuery { return g } -func (g *GetProviderArticleQuery) SetProviderId(providerId string) *GetProviderArticleQuery { +func (g *GetProviderArticleQuery) SetProviderId(providerId v2.ProviderId) *GetProviderArticleQuery { g.ProviderId = providerId return g } diff --git a/structs/storage/provider.go b/structs/storage/provider.go index c1e9b2e..4ea1c76 100644 --- a/structs/storage/provider.go +++ b/structs/storage/provider.go @@ -30,9 +30,9 @@ type providerApi struct { } type ListProviderQuery struct { - ID uint `query:"id"` - ProviderId string `query:"providerId"` - Keyword string `query:"keyword"` + ID uint `query:"id"` + ProviderId v2.ProviderId `query:"providerId"` + Keyword string `query:"keyword"` } func (g *ListProviderQuery) Scope(db *gorm.DB) *gorm.DB { diff --git a/structs/storage/seller-article.go b/structs/storage/seller-article.go index b16f84f..6095533 100644 --- a/structs/storage/seller-article.go +++ b/structs/storage/seller-article.go @@ -23,11 +23,11 @@ func NewSellerArticleApi(db *gorm.DB) SellerArticleApi { } type GetSellerArticleQuery struct { - ID uint `query:"id"` - Brand v2.Brand `query:"brand"` - Pid string `query:"pid"` - SellerId string `query:"sellerId"` - SkuId string `query:"skuId"` + ID uint `query:"id"` + Brand v2.Brand `query:"brand"` + Pid string `query:"pid"` + SellerId v2.SellerId `query:"sellerId"` + SkuId string `query:"skuId"` } func NewGetSellerArticleQuery() *GetSellerArticleQuery { @@ -47,7 +47,7 @@ func (g *GetSellerArticleQuery) SetPid(pid string) *GetSellerArticleQuery { g.Pid = pid return g } -func (g *GetSellerArticleQuery) SetSellerId(sellerId string) *GetSellerArticleQuery { +func (g *GetSellerArticleQuery) SetSellerId(sellerId v2.SellerId) *GetSellerArticleQuery { g.SellerId = sellerId return g } diff --git a/structs/storage/seller.go b/structs/storage/seller.go index d9f168f..ed54896 100644 --- a/structs/storage/seller.go +++ b/structs/storage/seller.go @@ -30,9 +30,9 @@ type sellerApi struct { } type ListSellerQuery struct { - ID uint `query:"id"` - SellerId string `query:"sellerId"` - Keyword string `query:"keyword"` + ID uint `query:"id"` + SellerId v2.SellerId `query:"sellerId"` + Keyword string `query:"keyword"` } func (g *ListSellerQuery) Scope(db *gorm.DB) *gorm.DB {