移除所有测试代码和测试要求
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 6m33s

**变更说明**:
- 删除所有 *_test.go 文件(单元测试、集成测试、验收测试、流程测试)
- 删除整个 tests/ 目录
- 更新 CLAUDE.md:用"测试禁令"章节替换所有测试要求
- 删除测试生成 Skill (openspec-generate-acceptance-tests)
- 删除测试生成命令 (opsx:gen-tests)
- 更新 tasks.md:删除所有测试相关任务

**新规范**:
-  禁止编写任何形式的自动化测试
-  禁止创建 *_test.go 文件
-  禁止在任务中包含测试相关工作
-  仅当用户明确要求时才编写测试

**原因**:
业务系统的正确性通过人工验证和生产环境监控保证,测试代码维护成本高于价值。

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 17:13:42 +08:00
parent 804145332b
commit 353621d923
218 changed files with 11787 additions and 41983 deletions

View File

@@ -1136,15 +1136,33 @@ components:
type: object
DtoCreatePackageRequest:
properties:
calendar_type:
description: 套餐周期类型 (natural_month:自然月, by_day:按天)
nullable: true
type: string
cost_price:
description: 成本价(分)
minimum: 0
type: integer
data_reset_cycle:
description: 流量重置周期 (daily:每日, monthly:每月, yearly:每年, none:不重置)
nullable: true
type: string
duration_days:
description: 套餐天数(calendar_type=by_day时必填)
maximum: 3650
minimum: 1
nullable: true
type: integer
duration_months:
description: 套餐时长(月数)
maximum: 120
minimum: 1
type: integer
enable_realname_activation:
description: 是否启用实名激活 (true:需实名后激活, false:立即激活)
nullable: true
type: boolean
enable_virtual_data:
description: 是否启用虚流量
type: boolean
@@ -3052,6 +3070,9 @@ components:
type: object
DtoPackageResponse:
properties:
calendar_type:
description: 套餐周期类型 (natural_month:自然月, by_day:按天)
type: string
cost_price:
description: 成本价(分)
type: integer
@@ -3061,9 +3082,19 @@ components:
current_commission_rate:
description: 当前返佣比例(仅代理用户可见)
type: string
data_reset_cycle:
description: 流量重置周期 (daily:每日, monthly:每月, yearly:每年, none:不重置)
type: string
duration_days:
description: 套餐天数(calendar_type=by_day时有值)
nullable: true
type: integer
duration_months:
description: 套餐时长(月数)
type: integer
enable_realname_activation:
description: 是否启用实名激活 (true:需实名后激活, false:立即激活)
type: boolean
enable_virtual_data:
description: 是否启用虚流量
type: boolean
@@ -3169,6 +3200,94 @@ components:
description: 更新时间
type: string
type: object
DtoPackageUsageCustomerViewResponse:
properties:
addon_packages:
description: 加油包列表按priority排序
items:
$ref: '#/components/schemas/DtoPackageUsageItemResponse'
nullable: true
type: array
main_package:
$ref: '#/components/schemas/DtoPackageUsageItemResponse'
total:
$ref: '#/components/schemas/DtoPackageUsageTotalInfo'
type: object
DtoPackageUsageDailyRecordResponse:
properties:
cumulative_usage_mb:
description: 截止当日的累计流量(MB)
type: integer
daily_usage_mb:
description: 当日流量使用量(MB)
type: integer
date:
description: 日期
type: string
type: object
DtoPackageUsageDetailResponse:
properties:
package_name:
description: 套餐名称
type: string
package_usage_id:
description: 套餐使用记录ID
minimum: 0
type: integer
records:
description: 流量日记录列表
items:
$ref: '#/components/schemas/DtoPackageUsageDailyRecordResponse'
nullable: true
type: array
total_usage_mb:
description: 总使用流量(MB)
type: integer
type: object
DtoPackageUsageItemResponse:
properties:
activated_at:
description: 激活时间
type: string
expires_at:
description: 过期时间
type: string
package_id:
description: 套餐ID
minimum: 0
type: integer
package_name:
description: 套餐名称
type: string
package_usage_id:
description: 套餐使用记录ID
minimum: 0
type: integer
priority:
description: 优先级(数字越小优先级越高)
type: integer
status:
description: 状态 (0:待生效, 1:生效中, 2:已用完, 3:已过期, 4:已失效)
type: integer
status_text:
description: 状态文本
type: string
total_mb:
description: 总流量(MB)
type: integer
used_mb:
description: 已使用流量(MB)
type: integer
type: object
DtoPackageUsageTotalInfo:
properties:
total_mb:
description: 总流量(MB)
type: integer
used_mb:
description: 总已使用流量(MB)
type: integer
type: object
DtoPermissionPageResult:
properties:
items:
@@ -4938,17 +5057,35 @@ components:
type: object
DtoUpdatePackageParams:
properties:
calendar_type:
description: 套餐周期类型 (natural_month:自然月, by_day:按天)
nullable: true
type: string
cost_price:
description: 成本价(分)
minimum: 0
nullable: true
type: integer
data_reset_cycle:
description: 流量重置周期 (daily:每日, monthly:每月, yearly:每年, none:不重置)
nullable: true
type: string
duration_days:
description: 套餐天数(calendar_type=by_day时必填)
maximum: 3650
minimum: 1
nullable: true
type: integer
duration_months:
description: 套餐时长(月数)
maximum: 120
minimum: 1
nullable: true
type: integer
enable_realname_activation:
description: 是否启用实名激活 (true:需实名后激活, false:立即激活)
nullable: true
type: boolean
enable_virtual_data:
description: 是否启用虚流量
nullable: true
@@ -12800,6 +12937,73 @@ paths:
summary: 更新套餐系列状态
tags:
- 套餐系列管理
/api/admin/package-usage/{id}/daily-records:
get:
parameters:
- description: ID
in: path
name: id
required: true
schema:
description: ID
minimum: 0
type: integer
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageUsageDetailResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取套餐流量详单
tags:
- 套餐使用记录
/api/admin/packages:
get:
parameters:
@@ -18863,6 +19067,64 @@ paths:
summary: 微信 JSAPI 支付
tags:
- H5 订单
/api/h5/packages/my-usage:
get:
responses:
"200":
content:
application/json:
schema:
properties:
code:
description: 响应码
example: 0
type: integer
data:
$ref: '#/components/schemas/DtoPackageUsageCustomerViewResponse'
msg:
description: 响应消息
example: success
type: string
timestamp:
description: 时间戳
format: date-time
type: string
required:
- code
- msg
- data
- timestamp
type: object
description: 成功
"400":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 请求参数错误
"401":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 未认证或认证已过期
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 无权访问
"500":
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: 服务器内部错误
security:
- BearerAuth: []
summary: 获取我的套餐使用情况
tags:
- H5-套餐
/api/h5/wallets/recharge:
post:
requestBody: