Files
java-10561/docs/检查微信小程序配置.sql
2025-09-06 11:58:18 +08:00

74 lines
1.5 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 检查微信小程序配置问题
-- 用于排查"租户 10550 的小程序未配置"的问题
-- 1. 查看你提到的配置记录
SELECT
setting_id,
setting_key,
tenant_id,
content,
deleted,
comments
FROM gxwebsoft_core.sys_setting
WHERE setting_id = 292;
-- 2. 查看租户10550的所有配置
SELECT
setting_id,
setting_key,
tenant_id,
content,
deleted,
comments
FROM gxwebsoft_core.sys_setting
WHERE tenant_id = 10550
ORDER BY setting_key;
-- 3. 查看所有mp-weixin相关的配置
SELECT
setting_id,
setting_key,
tenant_id,
content,
deleted,
comments
FROM gxwebsoft_core.sys_setting
WHERE setting_key = 'mp-weixin'
ORDER BY tenant_id;
-- 4. 查看租户10550的mp-weixin配置这是代码实际查询的条件
SELECT
setting_id,
setting_key,
tenant_id,
content,
deleted,
comments
FROM gxwebsoft_core.sys_setting
WHERE setting_key = 'mp-weixin'
AND tenant_id = 10550
AND deleted = 0;
-- 5. 检查是否有其他租户的mp-weixin配置可以参考
SELECT
setting_id,
setting_key,
tenant_id,
content,
deleted,
comments
FROM gxwebsoft_core.sys_setting
WHERE setting_key = 'mp-weixin'
AND deleted = 0
ORDER BY tenant_id;
-- 6. 查看所有租户的配置情况
SELECT
tenant_id,
COUNT(*) as config_count,
GROUP_CONCAT(setting_key) as setting_keys
FROM gxwebsoft_core.sys_setting
WHERE deleted = 0
GROUP BY tenant_id
ORDER BY tenant_id;