Merge branch 'main' of http://1.117.67.95:3000/team/qnc-server-v3
This commit is contained in:
@@ -36,7 +36,7 @@ $tables = @(
|
||||
# "admin_user_role",
|
||||
# "agent",
|
||||
# "agent_commission",
|
||||
# "agent_config"
|
||||
# # "agent_config"
|
||||
# "agent_freeze_task",
|
||||
# "agent_invite_code",
|
||||
# "agent_invite_code_usage",
|
||||
@@ -49,8 +49,8 @@ $tables = @(
|
||||
# "agent_short_link",
|
||||
# "agent_upgrade",
|
||||
# "agent_wallet",
|
||||
# "agent_withdrawal",
|
||||
# "agent_withdrawal_tax",
|
||||
"agent_withdrawal",
|
||||
"agent_withdrawal_tax"
|
||||
# "authorization_document",
|
||||
# "example",
|
||||
# "feature",
|
||||
@@ -70,8 +70,9 @@ $tables = @(
|
||||
# 为每个表生成模型
|
||||
foreach ($table in $tables) {
|
||||
Write-Host "正在生成表: $table" -ForegroundColor Green
|
||||
# goctl model mysql datasource -url="qnc:5vg67b3UNHu8@tcp(127.0.0.1:21201)/qnc" -table="$table" -dir="./model" --home="$HOME_DIR" -cache=true --style=goZero
|
||||
goctl model mysql datasource -url="qnc:5vg67b3UNHu8@tcp(127.0.0.1:21201)/qnc" -table="$table" -dir="./model" --home="$HOME_DIR" -cache=true --style=goZero
|
||||
|
||||
|
||||
# 移动生成的文件到目标目录
|
||||
if (Test-Path $OUTPUT_DIR) {
|
||||
$sourceFiles = Get-ChildItem -Path $OUTPUT_DIR -File
|
||||
|
||||
26
deploy/sql/withdrawal_alipay_quota_migration.sql
Normal file
26
deploy/sql/withdrawal_alipay_quota_migration.sql
Normal file
@@ -0,0 +1,26 @@
|
||||
-- ============================================
|
||||
-- 支付宝月度提现额度配置
|
||||
-- ============================================
|
||||
-- 说明:为代理系统增加支付宝每月提现额度配置,默认 800 元
|
||||
-- 执行时间:2026-01-06
|
||||
-- ============================================
|
||||
|
||||
INSERT INTO
|
||||
`agent_config` (
|
||||
`id`,
|
||||
`config_key`,
|
||||
`config_value`,
|
||||
`config_type`,
|
||||
`description`
|
||||
)
|
||||
VALUES (
|
||||
'f47ac10b-58cc-4372-a567-0e02b2c3d479',
|
||||
'alipay_month_quota',
|
||||
'800.00',
|
||||
'withdrawal',
|
||||
'支付宝每月提现额度(单位:元)'
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
`config_value` = VALUES(`config_value`),
|
||||
`config_type` = VALUES(`config_type`),
|
||||
`description` = VALUES(`description`);
|
||||
36
deploy/sql/withdrawal_bank_card_migration.sql
Normal file
36
deploy/sql/withdrawal_bank_card_migration.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- ============================================
|
||||
-- 代理提现表 - 添加银行卡提现支持
|
||||
-- ============================================
|
||||
-- 说明:为 agent_withdrawal 表添加提现方式字段和银行卡相关字段
|
||||
-- 执行时间:2024-XX-XX
|
||||
-- ============================================
|
||||
|
||||
-- 1. 添加提现方式字段(1=支付宝,2=银行卡)
|
||||
ALTER TABLE `agent_withdrawal`
|
||||
ADD COLUMN `withdrawal_type` tinyint NOT NULL DEFAULT 1 COMMENT '提现方式:1=支付宝,2=银行卡' AFTER `agent_id`;
|
||||
|
||||
-- 2. 添加银行卡号字段(银行卡提现时使用)
|
||||
ALTER TABLE `agent_withdrawal`
|
||||
ADD COLUMN `bank_card_no` varchar(100) DEFAULT NULL COMMENT '银行卡号(银行卡提现时使用)' AFTER `payee_account`;
|
||||
|
||||
-- 3. 添加开户行名称字段(银行卡提现时使用)
|
||||
ALTER TABLE `agent_withdrawal`
|
||||
ADD COLUMN `bank_name` varchar(100) DEFAULT NULL COMMENT '开户行名称(银行卡提现时使用)' AFTER `bank_card_no`;
|
||||
|
||||
-- 4. 为提现方式字段添加索引(用于按提现方式查询)
|
||||
ALTER TABLE `agent_withdrawal`
|
||||
ADD INDEX `idx_withdrawal_type` (`withdrawal_type`);
|
||||
|
||||
-- 5. 为提现方式和状态添加复合索引(用于后台审核查询)
|
||||
ALTER TABLE `agent_withdrawal`
|
||||
ADD INDEX `idx_type_status` (`withdrawal_type`, `status`);
|
||||
|
||||
|
||||
|
||||
-- ============================================
|
||||
-- 说明:
|
||||
-- 1. withdrawal_type 默认值为 1(支付宝),兼容历史数据
|
||||
-- 2. bank_card_no 和 bank_name 为可选字段,支付宝提现时为空
|
||||
-- 3. 对于支付宝提现,payee_account 存储支付宝账号
|
||||
-- 4. 对于银行卡提现,payee_account 可以存储银行卡号(与 bank_card_no 保持一致),或留空
|
||||
-- ============================================
|
||||
Reference in New Issue
Block a user