From b03f87c91904cebc6f63b81156ae778b85a87fad Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 28 Aug 2023 15:40:56 +0800 Subject: [PATCH] 1 --- .../internal/logic/homepagerecommendproductlistlogic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/product/internal/logic/homepagerecommendproductlistlogic.go b/server/product/internal/logic/homepagerecommendproductlistlogic.go index 389a01e0..2b5f27fa 100644 --- a/server/product/internal/logic/homepagerecommendproductlistlogic.go +++ b/server/product/internal/logic/homepagerecommendproductlistlogic.go @@ -56,7 +56,7 @@ func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *ty merchantInfo, err = l.svcCtx.AllModels.FsMerchantCategory.FindOne(l.ctx, req.MerchantType) if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { - return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "the merchant category is not exists") + return resp.SetStatusWithMessage(basic.CodeOK, "the merchant category is not exists", []interface{}{}) } logx.Error(err) return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get merchant category") @@ -66,7 +66,7 @@ func (l *HomePageRecommendProductListLogic) HomePageRecommendProductList(req *ty merchantInfo, err = l.svcCtx.AllModels.FsMerchantCategory.FindDefualtOne(l.ctx) if err != nil { if errors.Is(err, gorm.ErrRecordNotFound) { - return resp.SetStatusWithMessage(basic.CodeDbRecordNotFoundErr, "the default merchant category is not exists") + return resp.SetStatusWithMessage(basic.CodeOK, "the default merchant category is not exists", []interface{}{}) } logx.Error(err) return resp.SetStatusWithMessage(basic.CodeDbSqlErr, "failed to get default merchant category")