refactor: 文件行数超标拆解(7个文件→14个文件,全部≤200行)

- 移动本地接口定义到 interfaces.go 和 admin/interfaces.go
- favorite_controller.go → favorite_item_controller.go
- space_controller.go → space_loaders.go
- settings_controller.go → settings_api_audit.go
- admin_energy_controller.go → admin_energy_api_controller.go
- admin_post_controller.go → admin_post_action_controller.go
- comment_repo.go → comment_mention_repo.go
- post_repo.go → post_stats_repo.go
This commit is contained in:
2026-06-02 15:58:52 +08:00
parent ff9886f08b
commit 9477155bcf
17 changed files with 905 additions and 844 deletions

View File

@ -9,12 +9,6 @@ import (
"github.com/gin-gonic/gin"
)
// notifyPrefReader 通知偏好读写的接口ISP
type notifyPrefReader interface {
GetNotifyPrefs(userID uint) (map[string]bool, error)
UpdateNotifyPref(userID uint, key string, enabled bool) error
}
// SetNotifyPrefReader 注入通知偏好读写器
func (sc *SettingsController) SetNotifyPrefReader(reader notifyPrefReader) {
sc.notifyPrefReader = reader