This commit is contained in:
liangzai 2025-06-26 17:18:01 +08:00
parent 6a1d18926d
commit 0384d007bc
2 changed files with 7 additions and 6 deletions

View File

@ -64,6 +64,7 @@ func (l *GeneratingLinkLogic) GeneratingLink(req *types.AgentGeneratingLinkReq)
squirrel.Eq{"product_id": productModel.Id}, // 添加 product_id 的匹配条件
squirrel.Eq{"price": price}, // 添加 price 的匹配条件
squirrel.Eq{"agent_id": agentModel.Id}, // 添加 agent_id 的匹配条件
squirrel.Eq{"show_price": req.ShowPrice}, // 添加 show_price 的匹配条件
})
agentLinkModel, err := l.svcCtx.AgentLinkModel.FindAll(l.ctx, build, "")

View File

@ -106,12 +106,12 @@ func newWechatPayServiceWithPlatformCert(c config.Config, userAuthModel model.Us
// newWechatPayServiceWithWxPayPubKey 使用微信支付公钥初始化微信支付服务
func newWechatPayServiceWithWxPayPubKey(c config.Config, userAuthModel model.UserAuthModel) *WechatPayService {
// 从配置中加载商户信息
mchID := c.Wxpay.MchID // 商户号
mchCertificateSerialNumber := c.Wxpay.MchCertificateSerialNumber // 商户证书序列号
mchAPIv3Key := c.Wxpay.MchApiv3Key // 商户APIv3密钥
mchPrivateKeyPath := c.Wxpay.MchPrivateKeyPath // 商户私钥路径
mchPublicKeyID := c.Wxpay.MchPublicKeyID // 商户公钥ID
mchPublicKeyPath := c.Wxpay.MchPublicKeyPath // 商户公钥路径
mchID := c.Wxpay.MchID
mchCertificateSerialNumber := c.Wxpay.MchCertificateSerialNumber
mchAPIv3Key := c.Wxpay.MchApiv3Key
mchPrivateKeyPath := c.Wxpay.MchPrivateKeyPath
mchPublicKeyID := c.Wxpay.MchPublicKeyID
mchPublicKeyPath := c.Wxpay.MchPublicKeyPath
// 从文件中加载商户私钥
mchPrivateKey, err := utils.LoadPrivateKeyWithPath(mchPrivateKeyPath)
if err != nil {