This commit is contained in:
zhx 2026-05-26 01:58:08 +08:00
parent b496a87b84
commit 144cd3d781
2 changed files with 4 additions and 121 deletions

View File

@ -40,7 +40,7 @@ wallet_service:
addr: "10.2.1.15:13004"
request_timeout: "3s"
room_service:
addr: "10.2.1.15:13001"
addr: "10.2.1.16:13001"
request_timeout: "3s"
activity_service:
addr: "10.2.1.16:13006"

View File

@ -833,95 +833,13 @@ CREATE TABLE IF NOT EXISTS user_vip_history (
KEY idx_user_vip_history_user_time (app_code, user_id, created_at_ms)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户 VIP 历史表';
INSERT IGNORE INTO wallet_gift_prices (
app_code, gift_id, price_version, status, charge_asset_type, coin_price, gift_point_amount, heat_value,
effective_at_ms, created_at_ms, updated_at_ms
) VALUES
('lalu', 'rose', 'v1', 'active', 'COIN', 10, 10, 10, 0, 0, 0),
('lalu', 'rocket', 'v1', 'active', 'COIN', 100, 100, 100, 0, 0, 0);
INSERT IGNORE INTO resources (
app_code, resource_code, resource_type, name, status, grantable, grant_strategy,
wallet_asset_type, wallet_asset_amount, price_type, coin_price, gift_point_amount, usage_scope_json, asset_url, preview_url,
animation_url, metadata_json, sort_order, created_by_user_id, updated_by_user_id,
created_at_ms, updated_at_ms
) VALUES
('lalu', 'gift_rose', 'gift', 'Rose', 'active', TRUE, 'increase_quantity', '', 0, 'coin', 10, 10, JSON_ARRAY('gift'), '', '', '', JSON_OBJECT(), 10, 0, 0, 0, 0),
('lalu', 'gift_rocket', 'gift', 'Rocket', 'active', TRUE, 'increase_quantity', '', 0, 'coin', 100, 100, JSON_ARRAY('gift'), '', '', '', JSON_OBJECT(), 20, 0, 0, 0, 0);
INSERT IGNORE INTO resources (
app_code, resource_code, resource_type, name, status, grantable, grant_strategy,
wallet_asset_type, wallet_asset_amount, price_type, coin_price, gift_point_amount, usage_scope_json, asset_url, preview_url,
animation_url, metadata_json, sort_order, created_by_user_id, updated_by_user_id,
created_at_ms, updated_at_ms
) VALUES
('lalu', 'vip1_avatar_frame', 'avatar_frame', 'VIP1 Avatar Frame', 'active', TRUE, 'set_active_flag', '', 0, 'free', 0, 0, JSON_ARRAY('profile', 'room'), '', '', '', JSON_OBJECT(), 101, 0, 0, 0, 0),
('lalu', 'vip2_avatar_frame', 'avatar_frame', 'VIP2 Avatar Frame', 'active', TRUE, 'set_active_flag', '', 0, 'free', 0, 0, JSON_ARRAY('profile', 'room'), '', '', '', JSON_OBJECT(), 102, 0, 0, 0, 0),
('lalu', 'vip3_vehicle', 'vehicle', 'VIP3 Vehicle', 'active', TRUE, 'set_active_flag', '', 0, 'free', 0, 0, JSON_ARRAY('room_entry'), '', '', '', JSON_OBJECT(), 103, 0, 0, 0, 0);
INSERT IGNORE INTO resource_groups (
app_code, group_code, name, status, description, sort_order,
created_by_user_id, updated_by_user_id, created_at_ms, updated_at_ms
) VALUES
('lalu', 'vip1_rewards', 'VIP1 Rewards', 'active', 'VIP1 purchase rewards', 101, 0, 0, 0, 0),
('lalu', 'vip2_rewards', 'VIP2 Rewards', 'active', 'VIP2 purchase rewards', 102, 0, 0, 0, 0),
('lalu', 'vip3_rewards', 'VIP3 Rewards', 'active', 'VIP3 purchase rewards', 103, 0, 0, 0, 0);
INSERT IGNORE INTO resource_group_items (
app_code, group_id, item_type, resource_id, wallet_asset_type, wallet_asset_amount,
quantity, duration_ms, sort_order, created_at_ms, updated_at_ms
)
SELECT 'lalu', g.group_id, 'resource', r.resource_id, '', 0, 1, 604800000, 10, 0, 0
FROM resource_groups g
JOIN resources r ON r.app_code = g.app_code AND r.resource_code = 'vip1_avatar_frame'
WHERE g.app_code = 'lalu' AND g.group_code = 'vip1_rewards';
INSERT IGNORE INTO resource_group_items (
app_code, group_id, item_type, resource_id, wallet_asset_type, wallet_asset_amount,
quantity, duration_ms, sort_order, created_at_ms, updated_at_ms
)
SELECT 'lalu', g.group_id, 'resource', r.resource_id, '', 0, 1, 604800000, 10, 0, 0
FROM resource_groups g
JOIN resources r ON r.app_code = g.app_code AND r.resource_code = 'vip2_avatar_frame'
WHERE g.app_code = 'lalu' AND g.group_code = 'vip2_rewards';
INSERT IGNORE INTO resource_group_items (
app_code, group_id, item_type, resource_id, wallet_asset_type, wallet_asset_amount,
quantity, duration_ms, sort_order, created_at_ms, updated_at_ms
)
SELECT 'lalu', g.group_id, 'resource', r.resource_id, '', 0, 1, 604800000, 10, 0, 0
FROM resource_groups g
JOIN resources r ON r.app_code = g.app_code AND r.resource_code = 'vip3_vehicle'
WHERE g.app_code = 'lalu' AND g.group_code = 'vip3_rewards';
INSERT IGNORE INTO vip_levels (
app_code, level, name, status, price_coin, duration_ms, reward_resource_group_id, required_recharge_coin_amount,
sort_order, created_at_ms, updated_at_ms
)
SELECT 'lalu', 1, 'VIP1', 'active', 1000, 604800000, group_id, 0, 10, 0, 0
FROM resource_groups
WHERE app_code = 'lalu' AND group_code = 'vip1_rewards';
INSERT IGNORE INTO vip_levels (
app_code, level, name, status, price_coin, duration_ms, reward_resource_group_id, required_recharge_coin_amount,
sort_order, created_at_ms, updated_at_ms
)
SELECT 'lalu', 2, 'VIP2', 'active', 3000, 604800000, group_id, 0, 20, 0, 0
FROM resource_groups
WHERE app_code = 'lalu' AND group_code = 'vip2_rewards';
INSERT IGNORE INTO vip_levels (
app_code, level, name, status, price_coin, duration_ms, reward_resource_group_id, required_recharge_coin_amount,
sort_order, created_at_ms, updated_at_ms
)
SELECT 'lalu', 3, 'VIP3', 'active', 8000, 604800000, group_id, 0, 30, 0, 0
FROM resource_groups
WHERE app_code = 'lalu' AND group_code = 'vip3_rewards';
INSERT IGNORE INTO vip_levels (
app_code, level, name, status, price_coin, duration_ms, reward_resource_group_id, required_recharge_coin_amount,
sort_order, created_at_ms, updated_at_ms
) VALUES
('lalu', 1, 'VIP1', 'active', 1000, 604800000, 0, 0, 10, 0, 0),
('lalu', 2, 'VIP2', 'active', 3000, 604800000, 0, 0, 20, 0, 0),
('lalu', 3, 'VIP3', 'active', 8000, 604800000, 0, 0, 30, 0, 0),
('lalu', 4, 'VIP4', 'disabled', 0, 604800000, 0, 0, 40, 0, 0),
('lalu', 5, 'VIP5', 'disabled', 0, 604800000, 0, 0, 50, 0, 0),
('lalu', 6, 'VIP6', 'disabled', 0, 604800000, 0, 0, 60, 0, 0),
@ -951,38 +869,3 @@ INSERT IGNORE INTO gift_type_configs (
('lalu', 'activity', '活动礼物', 'Activity', 'active', 80, 0, 0, 0, 0),
('lalu', 'magic', '魔法礼物', 'Magic', 'active', 90, 0, 0, 0, 0),
('lalu', 'custom', '定制礼物', 'Custom', 'active', 100, 0, 0, 0, 0);
INSERT IGNORE INTO gift_configs (
app_code, gift_id, resource_id, status, name, sort_order, presentation_json,
gift_type_code, effective_from_ms, effective_to_ms, effect_types_json,
created_by_user_id, updated_by_user_id, created_at_ms, updated_at_ms
)
SELECT 'lalu', 'rose', resource_id, 'active', 'Rose', 10, JSON_OBJECT(),
'normal', 0, 0, JSON_ARRAY(),
0, 0, 0, 0
FROM resources
WHERE app_code = 'lalu' AND resource_code = 'gift_rose'
LIMIT 1;
INSERT IGNORE INTO gift_configs (
app_code, gift_id, resource_id, status, name, sort_order, presentation_json,
gift_type_code, effective_from_ms, effective_to_ms, effect_types_json,
created_by_user_id, updated_by_user_id, created_at_ms, updated_at_ms
)
SELECT 'lalu', 'rocket', resource_id, 'active', 'Rocket', 20, JSON_OBJECT(),
'normal', 0, 0, JSON_ARRAY('animation', 'global_broadcast'),
0, 0, 0, 0
FROM resources
WHERE app_code = 'lalu' AND resource_code = 'gift_rocket'
LIMIT 1;
INSERT IGNORE INTO gift_config_regions (
app_code, gift_id, region_id, created_at_ms, updated_at_ms
)
SELECT gc.app_code, gc.gift_id, 0, 0, 0
FROM gift_configs gc
LEFT JOIN gift_config_regions existing
ON existing.app_code = gc.app_code AND existing.gift_id = gc.gift_id
WHERE existing.gift_id IS NULL
AND gc.app_code = 'lalu'
AND gc.gift_id IN ('rose', 'rocket');