Files
iotlcm/docs/sql/seed_recharge_channel.sql
T
2026-10-29 14:59:32 +08:00

101 lines
2.5 KiB
SQL
Raw 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.
SET NAMES utf8mb4;
-- 腾宇(综合充值平台)通道初始化。
-- 字段复用约定(internal/logic/upstreamimpl/sim_recharge.go):
-- t_sim_channels.app_key = pwdkey(个人中心 > 密钥 Key)
-- t_sim_channels.app_secret = pwdiv(签名 IV,sign=md5(pwdkey+pwdiv+timestamp))
-- 执行前必须替换以下三个占位符。
SET @recharge_pwdkey = 'REPLACE_WITH_PWDKEY';
SET @recharge_pwdiv = 'REPLACE_WITH_PWDIV_OR_IV';
SET @recharge_chan_key = 'REPLACE_WITH_LOCAL_CHAN_KEY';
-- 上线前需在腾宇后台配置网关出口 IP 白名单,否则上游返回 407。
-- 上游单接口限流 60 次/分;全量同步触发 429 时由下轮重试兜底。
START TRANSACTION;
INSERT INTO `t_sim_channel_template` (
`temp_key`,
`temp_name`,
`temp_model`,
`temp_config`,
`temp_status`,
`tenant_id`,
`created_dept`,
`created_by`,
`updated_by`
) VALUES (
'sim_recharge_sdtywl_v1',
'综合充值平台 API',
'{}',
'{"baseUrl":"http://www.sdtywl.cn/"}',
0,
'000000',
100,
1,
1
)
ON DUPLICATE KEY UPDATE
`temp_name` = VALUES(`temp_name`),
`temp_model` = VALUES(`temp_model`),
`temp_config` = VALUES(`temp_config`),
`temp_status` = VALUES(`temp_status`),
`updated_by` = VALUES(`updated_by`);
INSERT INTO `t_sim_channels` (
`temp_key`,
`chan_key`,
`chan_name`,
`chan_config`,
`chan_status`,
`chan_alias`,
`region_code`,
`app_key`,
`app_secret`,
`access_token`,
`access_token_created`,
`access_token_expire`,
`refresh_token`,
`login_url`,
`tenant_id`,
`created_dept`,
`created_by`,
`updated_by`
) VALUES (
'sim_recharge_sdtywl_v1',
@recharge_chan_key,
'仟所腾宇',
'{}',
0,
'腾宇',
'',
@recharge_pwdkey,
@recharge_pwdiv,
NULL,
NULL,
NULL,
NULL,
'http://www.sdtywl.cn/',
'000000',
100,
1,
1
)
ON DUPLICATE KEY UPDATE
`temp_key` = VALUES(`temp_key`),
`chan_name` = VALUES(`chan_name`),
`chan_config` = VALUES(`chan_config`),
`chan_status` = VALUES(`chan_status`),
`chan_alias` = VALUES(`chan_alias`),
`region_code` = VALUES(`region_code`),
`app_key` = VALUES(`app_key`),
`app_secret` = VALUES(`app_secret`),
`access_token` = NULL,
`access_token_created` = NULL,
`access_token_expire` = NULL,
`refresh_token` = NULL,
`login_url` = VALUES(`login_url`),
`updated_by` = VALUES(`updated_by`);
COMMIT;