Add aftersales stats to dashboard and service-layer tests
- CompanyStatsOverviewDTO and GetStats() now include aftersales counts (total, pending confirmation, closed, rejected) and a recentAftersales list - aftersales_service_test.go covers YYMMNN sequence, owner-only submit, state machine, phone last-4 check, reject increment, force-close - users_service_test.go covers duplicate username, self-demotion guard, last-admin guard, password reset, assignable filter Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+13
-9
@@ -187,15 +187,19 @@ type CompanyUpdateRequest struct {
|
||||
|
||||
// CompanyStatsOverviewDTO 企业统计概览
|
||||
type CompanyStatsOverviewDTO struct {
|
||||
TotalCompanies int64 `json:"totalCompanies"`
|
||||
ActiveCompanies int64 `json:"activeCompanies"`
|
||||
InactiveCompanies int64 `json:"inactiveCompanies"`
|
||||
TotalSerials int64 `json:"totalSerials"`
|
||||
ActiveSerials int64 `json:"activeSerials"`
|
||||
RevokedSerials int64 `json:"revokedSerials"`
|
||||
TotalEmployeeSerials int64 `json:"totalEmployeeSerials"`
|
||||
ActiveEmployeeSerials int64 `json:"activeEmployeeSerials"`
|
||||
RevokedEmployeeSerials int64 `json:"revokedEmployeeSerials"`
|
||||
TotalCompanies int64 `json:"totalCompanies"`
|
||||
ActiveCompanies int64 `json:"activeCompanies"`
|
||||
InactiveCompanies int64 `json:"inactiveCompanies"`
|
||||
TotalSerials int64 `json:"totalSerials"`
|
||||
ActiveSerials int64 `json:"activeSerials"`
|
||||
RevokedSerials int64 `json:"revokedSerials"`
|
||||
TotalEmployeeSerials int64 `json:"totalEmployeeSerials"`
|
||||
ActiveEmployeeSerials int64 `json:"activeEmployeeSerials"`
|
||||
RevokedEmployeeSerials int64 `json:"revokedEmployeeSerials"`
|
||||
TotalAftersales int64 `json:"totalAftersales"`
|
||||
PendingConfirmation int64 `json:"pendingConfirmation"`
|
||||
ClosedAftersales int64 `json:"closedAftersales"`
|
||||
RejectedAftersales int64 `json:"rejectedAftersales"`
|
||||
}
|
||||
|
||||
// EmployeeSerial 员工序列号模型
|
||||
|
||||
Reference in New Issue
Block a user