feat: 迭代
This commit is contained in:
@@ -4,12 +4,22 @@
|
||||
USE `rent_platform`;
|
||||
|
||||
-- ============================================================
|
||||
-- 1. 平台账户(必须首先创建)
|
||||
-- 1. 系统总账户(必须首先创建,用于资金守恒验证)
|
||||
-- ============================================================
|
||||
-- 注意:初始余额为0,如果有历史订单数据,请执行相应脚本进行余额修复
|
||||
-- account_name: SYSTEM_MAIN (系统主账户)
|
||||
INSERT INTO `system_accounts` (`account_name`, `balance`, `total_income`, `total_refund`, `total_withdrawn`, `status`)
|
||||
VALUES ('SYSTEM_MAIN', 0.00, 0.00, 0.00, 0.00, 'active')
|
||||
ON DUPLICATE KEY UPDATE `account_name` = 'SYSTEM_MAIN';
|
||||
|
||||
-- ============================================================
|
||||
-- 2. 平台账户(记录平台净收益)
|
||||
-- ============================================================
|
||||
-- 注意:初始余额为0,如果有历史订单数据,请执行 scripts/init-platform-account.sql 脚本进行余额修复
|
||||
-- account_name: PLATFORM_MAIN (平台主账户)
|
||||
INSERT INTO `platform_accounts` (`account_name`, `balance`, `frozen_balance`, `total_income`, `total_expense`, `status`)
|
||||
VALUES ('主账户', 0.00, 0.00, 0.00, 0.00, 'active')
|
||||
ON DUPLICATE KEY UPDATE `account_name` = '主账户';
|
||||
VALUES ('PLATFORM_MAIN', 0.00, 0.00, 0.00, 0.00, 'active')
|
||||
ON DUPLICATE KEY UPDATE `account_name` = 'PLATFORM_MAIN';
|
||||
|
||||
-- ============================================================
|
||||
-- 2. 平台管理员账号
|
||||
@@ -55,3 +65,12 @@ INSERT INTO `platform_configs` (`config_key`, `config_value`, `description`) VAL
|
||||
('sms_enabled', 'true', '是否启用短信通知'),
|
||||
('max_images_per_room', '20', '每个房源最大图片数'),
|
||||
('max_images_per_review', '9', '每条评价最大图片数');
|
||||
|
||||
-- ============================================================
|
||||
-- 7. 营销活动 - 邀请返现活动
|
||||
-- ============================================================
|
||||
INSERT INTO `mkt_activities` (`name`, `type`, `enabled`, `config`, `start_time`, `end_time`) VALUES
|
||||
('邀请好友返现活动', 'invite_cashback', 1,
|
||||
'{"firstOrderRate": 0.05, "secondOrderRate": 0.005, "minCashback": 0.01, "maxCashback": 1000, "withdrawThreshold": 10, "maxOrderIndex": 2}',
|
||||
NOW(), NULL)
|
||||
ON DUPLICATE KEY UPDATE `enabled` = 1;
|
||||
|
||||
Reference in New Issue
Block a user