This commit is contained in:
laodaming 2023-08-28 15:40:56 +08:00
parent d4b6ef5d7c
commit b03f87c919

View File

@ -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")