切换主体

This commit is contained in:
ziming 2026-03-26 14:03:03 +08:00
parent 8cf3c66cb3
commit 2e364f0332
1 changed files with 3 additions and 5 deletions

View File

@ -2,9 +2,7 @@ package biz
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"gorm.io/gorm"
errPb "voucher/api/err" errPb "voucher/api/err"
"voucher/internal/biz/bo" "voucher/internal/biz/bo"
"voucher/internal/biz/vo" "voucher/internal/biz/vo"
@ -20,9 +18,9 @@ func (this *VoucherBiz) WechatNotifyConsumer(ctx context.Context, ip string, req
// 商品数据量较少,先查询商品是否存在,过滤多余的通知信息 // 商品数据量较少,先查询商品是否存在,过滤多余的通知信息
_, err := this.ProductRepo.GetByMchStockId(ctx, req.PlainText.StockCreatorMchid, req.PlainText.StockID) _, err := this.ProductRepo.GetByMchStockId(ctx, req.PlainText.StockCreatorMchid, req.PlainText.StockID)
if err != nil { if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) { //if errors.Is(err, gorm.ErrRecordNotFound) {
return nil // return nil
} //}
return fmt.Errorf("商品查询错误 error: %w", err) return fmt.Errorf("商品查询错误 error: %w", err)
} }