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