Merge upstream/master into develop

Sync upstream changes from perfect-panel/server

  Includes updates from v1.0.1 to v1.2.5:
  - Currency configuration support
  - Subscribe improvements (short token, inventory check, etc.)
  - Node management enhancements
  - Database migrations
  - Bug fixes and optimizations
This commit is contained in:
EUForest
2026-01-02 12:51:55 +08:00
parent 47c41d1d14
commit 80ee9a6acf
63 changed files with 947 additions and 1509 deletions
+4
View File
@@ -62,6 +62,7 @@ type UserFilterParams struct {
SubscribeId *int64
UserSubscribeId *int64
Order string // Order by id, e.g., "desc"
Unscoped bool // Whether to include soft-deleted records
}
type customUserLogicModel interface {
@@ -148,6 +149,9 @@ func (m *customUserModel) QueryPageList(ctx context.Context, page, size int, fil
if filter.Order != "" {
conn = conn.Order(fmt.Sprintf("user.id %s", filter.Order))
}
if filter.Unscoped {
conn = conn.Unscoped()
}
}
return conn.Model(&User{}).Group("user.id").Count(&total).Limit(size).Offset((page-1)*size).Preload("UserDevices").Preload("AuthMethods", func(db *gorm.DB) *gorm.DB { return db.Order("user_auth_methods.auth_type desc") }).Find(&list).Error
})