feat: 管理端板块管理与旧版数据导入,补充部署运营文档

- 新增管理端板块管理页面与后端接口(admin_board)
- 新增旧版数据导入:legacyimport 服务、导入面板、importusers 命令行工具
- 聊天用户卡片、板块图标等 UI 组件与界面优化
- 补充 about/公告/1Panel 部署等文档
- gitignore 排除 dist/ 构建产物与 .agents/ 本地工具目录
This commit is contained in:
2026-09-24 03:37:44 +08:00
parent c1f6a6636b
commit 3e55b5d230
53 changed files with 5078 additions and 409 deletions

View File

@@ -828,7 +828,11 @@ func (s *PostService) lotteryEligibleIDs(postID, authorID uint) ([]uint, error)
Group("c.user_id")
if hours > 0 {
cutoff := time.Now().UTC().Add(-time.Duration(hours) * time.Hour)
q = q.Where("u.created_at <= ?", cutoff)
// 管理角色不受新号冷静期限制
q = q.Where("u.created_at <= ? OR u.role IN ?", cutoff, []string{
string(model.RoleBoardAdmin), string(model.RoleAdmin),
string(model.RoleSuperAdmin), string(model.RoleOwner),
})
}
var ids []uint
if err := q.Pluck("c.user_id", &ids).Error; err != nil {