feat(M05-D): 完成收款配置与幂等分账
This commit is contained in:
@@ -60,6 +60,9 @@ const wechatRefundVerifySql = read('database/migrations/2026062216_m05b_wechat_r
|
||||
const thirdPartyUpSql = read('database/migrations/2026062217_m05c_third_party.up.sql');
|
||||
const thirdPartyDownSql = read('database/migrations/2026062217_m05c_third_party.down.sql');
|
||||
const thirdPartyVerifySql = read('database/migrations/2026062217_m05c_third_party.verify.sql');
|
||||
const profitSharingUpSql = read('database/migrations/2026062218_m05d_profit_sharing.up.sql');
|
||||
const profitSharingDownSql = read('database/migrations/2026062218_m05d_profit_sharing.down.sql');
|
||||
const profitSharingVerifySql = read('database/migrations/2026062218_m05d_profit_sharing.verify.sql');
|
||||
|
||||
const coreTables = [
|
||||
'qipai_schema_migrations',
|
||||
@@ -267,5 +270,20 @@ assert.match(thirdPartyUpSql, /voucher_hash CHAR\(64\)/);
|
||||
assert.match(thirdPartyUpSql, /UNIQUE KEY uq_qipai_group_redemption_voucher/);
|
||||
assert.match(thirdPartyUpSql, /UNIQUE KEY uq_qipai_direct_booking_event/);
|
||||
assert.doesNotMatch(thirdPartyUpSql, /voucher_code|api_token|webhook_secret/i);
|
||||
for (const table of [
|
||||
'qipai_collection_accounts', 'qipai_profit_share_receivers',
|
||||
'qipai_profit_share_policies'
|
||||
]) {
|
||||
assert.match(profitSharingUpSql, new RegExp(`CREATE TABLE IF NOT EXISTS ${table}`));
|
||||
assert.match(profitSharingDownSql, new RegExp(`DROP TABLE IF EXISTS ${table}`));
|
||||
assert.match(profitSharingVerifySql, new RegExp(`'${table}'`));
|
||||
}
|
||||
assert.match(profitSharingUpSql, /receiver_hash CHAR\(64\)/);
|
||||
assert.match(profitSharingUpSql, /percentage_bps SMALLINT UNSIGNED/);
|
||||
assert.match(profitSharingUpSql, /uq_qipai_profit_share_payment_receiver/);
|
||||
assert.doesNotMatch(
|
||||
profitSharingUpSql,
|
||||
/\bprivate_key\b|\bapi_v3_key\b|\breceiver_account\b/i
|
||||
);
|
||||
|
||||
console.log('PASS: M01-B through M05-C migration contracts are present.');
|
||||
console.log('PASS: M01-B through M05-D migration contracts are present.');
|
||||
|
||||
Reference in New Issue
Block a user