diff --git a/server/product/internal/logic/getrecommandproductlistlogic.go b/server/product/internal/logic/getrecommandproductlistlogic.go index 018d68a4..d73206c7 100644 --- a/server/product/internal/logic/getrecommandproductlistlogic.go +++ b/server/product/internal/logic/getrecommandproductlistlogic.go @@ -36,7 +36,7 @@ func NewGetRecommandProductListLogic(ctx context.Context, svcCtx *svc.ServiceCon func (l *GetRecommandProductListLogic) GetRecommandProductList(req *types.GetRecommandProductListReq, userinfo *auth.UserInfo) (resp *basic.Response) { req.Num = 4 //写死4个 if req.Size > 0 { - req.Size = image.GetCurrentSize(req.Size) + req.Size = int32(image.GetCurrentSize(uint32(req.Size))) } productInfo, err := l.svcCtx.AllModels.FsProduct.FindOneBySn(l.ctx, req.Sn) if err != nil { diff --git a/server/product/internal/types/types.go b/server/product/internal/types/types.go index e44a240f..6adf44d2 100644 --- a/server/product/internal/types/types.go +++ b/server/product/internal/types/types.go @@ -228,7 +228,7 @@ type OtherProductListRsp struct { } type GetRecommandProductListReq struct { - Size uint32 `form:"size,optional"` + Size int32 `form:"size,optional"` Num int64 `form:"num,optional"` Sn string `form:"sn"` } diff --git a/server_api/product.api b/server_api/product.api index cbdc734f..9e8626c5 100644 --- a/server_api/product.api +++ b/server_api/product.api @@ -281,7 +281,7 @@ type OtherProductListRsp { } //获取详情页推荐产品列表 type GetRecommandProductListReq { - Size uint32 `form:"size,optional"` + Size int32 `form:"size,optional"` Num int64 `form:"num,optional"` Sn string `form:"sn"` }