fix: close business flow regressions
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user