From 0ee4a5781b41d440f87be913f90b22b4c9a9426b Mon Sep 17 00:00:00 2001 From: ziming Date: Tue, 25 Mar 2025 16:00:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/data/wechatrepoimpl/cpn.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/data/wechatrepoimpl/cpn.go b/internal/data/wechatrepoimpl/cpn.go index 6ff2860..39680af 100644 --- a/internal/data/wechatrepoimpl/cpn.go +++ b/internal/data/wechatrepoimpl/cpn.go @@ -119,6 +119,10 @@ func (c *CpnRepoImpl) Query(ctx context.Context, orderWechat *bo.OrderBo) (vo.Or func (c *CpnRepoImpl) QueryProduct(ctx context.Context, stockCreatorMchId, stockId string) (*cashcoupons.Stock, error) { + if stockCreatorMchId == "" || stockId == "" { + return nil, err2.ErrorWechatFAIL("商户号或批次号不能为空") + } + client, err := c.GetClient(ctx) if err != nil { return nil, err