feat: UI稿设计

This commit is contained in:
R524809
2025-11-12 18:06:09 +08:00
parent 75ca7f10be
commit 33b5d72461
8 changed files with 3606 additions and 360 deletions

View File

@@ -480,3 +480,34 @@ COMMIT;
- 支付相关数据需要加密存储
- 交易号等敏感信息需要脱敏处理
7. **持仓自动价格更新功能联动**
- 用户购买订阅后,需要批量更新该用户所有持仓的 `auto_price_update = true`
- 用户订阅过期或取消后,需要批量更新该用户所有持仓的 `auto_price_update = false`
- 建议在订阅状态变更时,同步更新 positions 表的 auto_price_update 字段
**示例SQL**
```sql
-- 用户购买订阅后,启用自动价格更新
UPDATE positions
SET auto_price_update = true
WHERE user_id = :user_id
AND asset_type IN ('stock', 'fund', 'bond');
-- 用户订阅过期后,禁用自动价格更新
UPDATE positions
SET auto_price_update = false
WHERE user_id = :user_id;
-- 查询付费用户的股票持仓(用于自动价格更新)
SELECT
p.position_id,
p.symbol,
p.market,
p.asset_type,
p.current_price
FROM positions p
WHERE p.auto_price_update = true
AND p.asset_type = 'stock'
AND p.status = 'active';
```