纯新增实现,不修改任何现有业务逻辑,对现有系统零风险。 ## 后端 — referral-service 新建 TeamPrePlantingController(JWT 认证),2 个公开端点: 1. GET /referral/me/team-pre-planting - 返回当前用户的个人预种份数、团队预种总量 - 返回直推成员列表及每人的预种份数 - 从 TeamStatistics 表读取(CDC 事件维护的数据) 2. GET /referral/me/team-pre-planting/members?limit=20&offset=0 - 分页返回全部团队成员的预种明细(仅有预种份数 > 0 的成员) - 使用 ancestor_path 数组查询所有下级用户 - JOIN team_statistics 获取每人的 selfPrePlantingPortions Kong 网关无需修改(/api/v1/referral/* 已覆盖)。 ## 前端 — Flutter mobile-app 新建 TeamPrePlantingPage 页面: - 顶部统计卡片:个人预种 + 团队预种总量 - 直推预种明细列表(所有用户可见) - 全部团队成员预种明细(仅市/省公司管理者可见,分页加载更多) - 普通用户看到锁定提示"仅市公司/省公司管理者可查看" 入口:个人中心页预种按钮行新增绿色「团队预种」按钮。 ## 文件清单 新建文件: - backend/.../controllers/team-pre-planting.controller.ts(核心后端控制器) - frontend/.../pages/team_pre_planting_page.dart(Flutter 团队预种页面) 微量修改(仅追加新行): - controllers/index.ts: +1 行 export - api.module.ts: +2 行 import/注册 - api_endpoints.dart: +2 行端点常量 - referral_service.dart: +4 模型类 +2 API 方法 - route_paths.dart, route_names.dart: +1 行路由定义 - app_router.dart: +1 import +1 GoRoute - profile_page.dart: 预种按钮行追加第三个按钮 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .claude | ||
| android | ||
| assets | ||
| docs | ||
| ios | ||
| lib | ||
| linux | ||
| macos | ||
| scripts | ||
| test | ||
| web | ||
| windows | ||
| .gitignore | ||
| .metadata | ||
| CLAUDE.md | ||
| README.MD | ||
| analysis_options.yaml | ||
| flutter_android_update_guide.md | ||
| flutter_telemetry_solution.md | ||
| pubspec.lock | ||
| pubspec.yaml | ||
| quickly.lottie | ||
| stickman.lottie | ||
README.MD
Create Flutter Framework
C:\Users\ph\Desktop\app>flutter create --org com.rwadurian rwa_android_app
Creating project rwa_android_app...
Resolving dependencies in `rwa_android_app`... (3.7s)
Downloading packages...
Got dependencies in `rwa_android_app`.
Wrote 130 files.
All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev
In order to run your application, type:
$ cd rwa_android_app
$ flutter run
Your application code is in rwa_android_app\lib\main.dart.
rwa_android_app
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.