Files
verify/backend/scripts/check_all_deleted.go
admin ea8ffb6c74 fix: 订阅模式登录验证、永久会员类型区分、动态代码HTTP返回值修复、侧边栏滚动位置保持
- 修复订阅模式登录时错误检查余额的问题
- 区分无限余额和永久订阅两种永久会员类型
- 修复动态代码HTTP请求返回值在JS中无法正确访问的问题
- 添加侧边栏滚动位置保持功能
- 移除developer角色相关代码,统一使用admin
- 添加缺失的i18n翻译key
2026-05-01 16:39:31 +08:00

44 lines
1011 B
Go

package main
import (
"fmt"
"verification-platform-backend/internal/database"
"verification-platform-backend/internal/model"
)
func main() {
database.Init()
models := []struct {
name string
query interface{}
}{
{"User", &[]model.User{}},
{"AppUser", &[]model.AppUser{}},
{"DynamicCode", &[]model.DynamicCode{}},
{"Application", &[]model.Application{}},
{"Card", &[]model.Card{}},
{"Order", &[]model.Order{}},
{"RechargeRecord", &[]model.RechargeRecord{}},
{"ConsumptionRecord", &[]model.ConsumptionRecord{}},
{"DocCategory", &[]model.DocCategory{}},
{"Doc", &[]model.Doc{}},
{"Setting", &[]model.Setting{}},
}
for _, m := range models {
var allCount int64
var activeCount int64
database.DB.Unscoped().Model(m.query).Count(&allCount)
database.DB.Model(m.query).Count(&activeCount)
deletedCount := allCount - activeCount
if deletedCount > 0 {
fmt.Printf("%s: 总数=%d, 活跃=%d, 已删除=%d\n", m.name, allCount, activeCount, deletedCount)
}
}
}