refactor(platform): remove safety management module

This commit is contained in:
2026-07-27 15:49:51 +08:00
parent 95fb27f596
commit 8739cfd4d6
25 changed files with 27 additions and 391 deletions

View File

@@ -8,7 +8,6 @@ type DashboardOverview struct {
DeliveryBasicCount int64 `json:"delivery_basic_count"` // 启用配送点数量
StaffCount int64 `json:"staff_count"` // 在岗服务人员数量
UserCount int64 `json:"user_count"` // 启用业主客户数量
PendingSafetyCount int64 `json:"pending_safety_count"` // 待处理安全事件数量
}
// GetDashboardOverview 通过独立查询返回首页概览指标。
@@ -26,9 +25,6 @@ func GetDashboardOverview() (DashboardOverview, error) {
if err := impl.DBService.Model(&UserAccount{}).Where("status = ?", "enabled").Count(&overview.UserCount).Error; err != nil {
return DashboardOverview{}, err
}
if err := impl.DBService.Model(&SafeEvent{}).Where("status = ?", "pending").Count(&overview.PendingSafetyCount).Error; err != nil {
return DashboardOverview{}, err
}
return overview, nil
}