From 5abc4151ea09910d8dbd4d08a38919f741f86803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Thu, 6 Mar 2025 16:15:55 +0800 Subject: [PATCH] cmb --- internal/biz/bo/product_bo.go | 2 +- internal/biz/cmb.go | 2 +- internal/biz/cmb/voucher.go | 2 +- internal/data/model/product.gen.go | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/biz/bo/product_bo.go b/internal/biz/bo/product_bo.go index 39692a5..70944dc 100644 --- a/internal/biz/bo/product_bo.go +++ b/internal/biz/bo/product_bo.go @@ -12,7 +12,7 @@ type ProductBo struct { ProductNo string BatchName string BatchNo string - MerchantNo string + MchId string Channel vo.Channel CreateTime *time.Time UpdateTime *time.Time diff --git a/internal/biz/cmb.go b/internal/biz/cmb.go index d497677..b84e362 100644 --- a/internal/biz/cmb.go +++ b/internal/biz/cmb.go @@ -59,7 +59,7 @@ func (v *VoucherBiz) CmbProductQuery(ctx context.Context, productNo string) (rep return fmt.Errorf("只支持微信") } - wechatResp, err := v.WechatCpnRepo.QueryProduct(ctx, product.BatchNo, product.MerchantNo) + wechatResp, err := v.WechatCpnRepo.QueryProduct(ctx, product.BatchNo, product.MchId) if err != nil { return err } diff --git a/internal/biz/cmb/voucher.go b/internal/biz/cmb/voucher.go index 9ba42ec..288bda0 100644 --- a/internal/biz/cmb/voucher.go +++ b/internal/biz/cmb/voucher.go @@ -20,7 +20,7 @@ func (v *Cmb) Order(ctx context.Context, req *bo.OrderCreateReqBo, product *bo.P ProductNo: req.ProductNo, Account: req.Account, AppID: req.AppID, - MerchantNo: product.MerchantNo, + MerchantNo: product.MchId, Channel: product.Channel, BatchNo: product.BatchNo, NotifyUrl: v.bc.Cmb.NotifyUrl, diff --git a/internal/data/model/product.gen.go b/internal/data/model/product.gen.go index ae94104..598ddac 100644 --- a/internal/data/model/product.gen.go +++ b/internal/data/model/product.gen.go @@ -13,12 +13,12 @@ const TableNameProduct = "product" // Product mapped from table type Product struct { ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` - Name string `gorm:"column:name;not null;comment:商品名称" json:"name"` // 商品名称 - ProductNo string `gorm:"column:product_no;not null;comment:商品编号" json:"product_no"` // 商品编号 - BatchName string `gorm:"column:batch_name;not null;comment:批次名称" json:"batch_name"` // 批次名称 - BatchNo string `gorm:"column:batch_no;not null;comment:立减金批次号" json:"batch_no"` // 立减金批次号 - MerchantNo string `gorm:"column:merchant_no;not null;comment:商户号,创建批次的商户号" json:"merchant_no"` // 商户号,创建批次的商户号 - Channel uint8 `gorm:"column:channel;not null;comment:1:微信 2:支付宝" json:"channel"` // 1:微信 2:支付宝 + Name string `gorm:"column:name;not null;comment:商品名称" json:"name"` // 商品名称 + ProductNo string `gorm:"column:product_no;not null;comment:商品编号" json:"product_no"` // 商品编号 + BatchName string `gorm:"column:batch_name;not null;comment:批次名称" json:"batch_name"` // 批次名称 + BatchNo string `gorm:"column:batch_no;not null;comment:立减金批次号" json:"batch_no"` // 立减金批次号 + MchId string `gorm:"column:mch_id;not null;comment:商户号,创建批次的商户号" json:"mch_id"` // 商户号,创建批次的商户号 + Channel uint8 `gorm:"column:channel;not null;comment:1:微信 2:支付宝" json:"channel"` // 1:微信 2:支付宝 CreateTime *time.Time `gorm:"column:create_time;not null" json:"create_time"` UpdateTime *time.Time `gorm:"column:update_time" json:"update_time"` }