6.0 KiB
Requirements Document
Introduction
本文档定义了后台管理系统中 9 个未修复 BUG 的修复需求。这些 BUG 涉及统计报表、商品管理、营销活动和内容管理四个模块,主要问题类型包括接口请求失败、服务器内部错误、数据显示异常和功能不可用。
Glossary
- Admin_System: 后台管理系统
- Statistics_Module: 统计报表模块
- Goods_Module: 商品管理模块
- Marketing_Module: 营销活动模块
- Content_Module: 内容管理模块
- User_Profit_Stats: 用户盈亏统计
- User_Invite_Stats: 用户邀请统计
- Box_Management: 盒子管理
- Prize_Management: 奖品管理
- Claim_Record: 领取记录
- Weekly_Rank: 周榜记录
- Monthly_Rank: 月榜记录
- Danye_Management: 单页管理
Requirements
Requirement 1: 用户盈亏统计搜索修复 (cs100_2)
User Story: As an administrator, I want to search user profit/loss statistics by user ID, so that I can analyze individual user's financial performance.
Acceptance Criteria
- WHEN an administrator enters a user ID in the search field, THE Admin_System SHALL return the profit/loss statistics for that user
- WHEN the search is executed, THE Admin_System SHALL NOT display "请求失败" error
- THE Admin_System SHALL validate the user ID parameter before sending the request
- THE Admin_System SHALL display appropriate message when no results are found
Requirement 2: 用户邀请统计搜索修复 (cs100_3)
User Story: As an administrator, I want to search user invitation statistics by user ID, so that I can track user referral performance.
Acceptance Criteria
- WHEN an administrator enters a user ID in the search field, THE Admin_System SHALL return the invitation statistics for that user
- WHEN the search is executed, THE Admin_System SHALL NOT display "请求失败" error
- THE Admin_System SHALL validate the user ID parameter before sending the request
- THE Admin_System SHALL display appropriate message when no results are found
Requirement 3: 盒子类型全部搜索修复 (cs100_4)
User Story: As an administrator, I want to search all box types when selecting "全部" filter, so that I can view the complete box list.
Acceptance Criteria
- WHEN an administrator selects "全部" as box type filter, THE Admin_System SHALL return all boxes regardless of type
- WHEN box type is "全部" (value 0 or empty), THE Admin_System SHALL skip the type filter condition in the query
- THE Admin_System SHALL display the complete box list when "全部" is selected
- THE Admin_System SHALL NOT return empty results when boxes exist in the database
Requirement 4: 自动下架配置修复 (cs100_5)
User Story: As an administrator, I want to configure auto-delist settings when editing/creating a box, so that boxes can be automatically removed from listing.
Acceptance Criteria
- WHEN an administrator enables "自动下架配置", THE Admin_System SHALL display the configuration parameters
- THE Admin_System SHALL allow setting auto-delist time or conditions
- WHEN the form is submitted, THE Admin_System SHALL save the auto-delist configuration correctly
- THE Admin_System SHALL return auto-delist fields in the box detail response
Requirement 5: 奖品等级分类显示修复 (cs100_6)
User Story: As an administrator, I want to see correct prize level and category names in the prize list, so that I can manage prizes effectively.
Acceptance Criteria
- WHEN an administrator views the prize list, THE Admin_System SHALL display the correct level name (not "0级")
- WHEN an administrator views the prize list, THE Admin_System SHALL display the correct category name (not "未知" or empty)
- THE Admin_System SHALL perform proper join queries to fetch level and category information
- THE Admin_System SHALL map the level and category fields correctly in the response DTO
Requirement 6: 领取记录搜索修复 (cs100_11)
User Story: As an administrator, I want to search claim records by user ID, so that I can track user reward claims.
Acceptance Criteria
- WHEN an administrator enters a user ID in the search field, THE Admin_System SHALL return the claim records for that user
- WHEN the search is executed, THE Admin_System SHALL NOT display "请求失败" error
- THE Admin_System SHALL validate the user ID parameter before sending the request
- THE Admin_System SHALL display appropriate message when no results are found
Requirement 7: 周榜记录修复 (cs100_13)
User Story: As an administrator, I want to view weekly ranking records, so that I can monitor weekly user performance.
Acceptance Criteria
- WHEN an administrator accesses the weekly rank page, THE Admin_System SHALL display the ranking data
- THE Admin_System SHALL NOT display "服务器内部错误"
- THE Admin_System SHALL handle empty data gracefully
- THE Admin_System SHALL calculate date ranges correctly for weekly data
Requirement 8: 月榜记录修复 (cs100_14)
User Story: As an administrator, I want to view monthly ranking records, so that I can monitor monthly user performance.
Acceptance Criteria
- WHEN an administrator accesses the monthly rank page, THE Admin_System SHALL display the ranking data
- THE Admin_System SHALL NOT display "服务器内部错误"
- THE Admin_System SHALL handle empty data gracefully
- THE Admin_System SHALL calculate date ranges correctly for monthly data
Requirement 9: 单页文章内容渲染修复 (cs100_15)
User Story: As an administrator, I want to view article content as rendered HTML, so that I can preview the actual display.
Acceptance Criteria
- WHEN an administrator clicks on an article, THE Admin_System SHALL display rendered content (not raw HTML code)
- THE Admin_System SHALL use v-html or equivalent to render HTML content
- THE Admin_System SHALL sanitize HTML content to prevent XSS attacks
- THE Admin_System SHALL preserve formatting and images in the rendered content