-- 修复租户10547的公钥路径配置

-- 1. 查看当前配置
SELECT 
    id,
    tenant_id,
    mch_id,
    pub_key,
    pub_key_id
FROM sys_payment 
WHERE tenant_id = 10547 AND type = 0;

-- 2. 修复公钥路径配置
UPDATE sys_payment SET 
    pub_key = 'wechatpay_public_key.pem'
WHERE tenant_id = 10547 AND type = 0;

-- 3. 验证修复结果
SELECT 
    id,
    tenant_id,
    mch_id,
    pub_key,
    pub_key_id,
    CASE 
        WHEN pub_key = 'wechatpay_public_key.pem' 
        THEN '✅ 路径已修复'
        ELSE '❌ 路径仍有问题'
    END AS path_status
FROM sys_payment 
WHERE tenant_id = 10547 AND type = 0;
