fix: close business flow regressions

This commit is contained in:
david
2026-07-31 11:33:28 +08:00
parent 42a2322c8e
commit a47e9025d0
18 changed files with 403 additions and 30 deletions

View File

@@ -15,6 +15,7 @@ import (
"github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt"
"gorm.io/gorm"
"gorm.io/gorm/clause"
)
// AccountPasswordMinLength 是账号密码允许的最低字符数。
@@ -79,7 +80,10 @@ func IsGenericRecordStatus(status int) bool {
// ActiveRecords excludes logically archived records from operational queries.
func ActiveRecords(query *gorm.DB) *gorm.DB {
return query.Where("status <> ?", StatusArchived)
return query.Where(clause.Neq{
Column: clause.Column{Table: clause.CurrentTable, Name: "status"},
Value: StatusArchived,
})
}
func ListPage[T any](ctx *gin.Context) {