将 LocalDateTime 迁移到 orm

This commit is contained in:
2025-05-10 15:00:03 +08:00
parent 3140d35a95
commit 37e6e58816
39 changed files with 414 additions and 425 deletions

View File

@@ -2,6 +2,7 @@ package handlers
import (
"fmt"
"platform/pkg/orm"
"platform/web/auth"
"platform/web/core"
channel2 "platform/web/domains/channel"
@@ -47,10 +48,10 @@ func ListChannels(c *fiber.Ctx) error {
}
if req.ExpireAfter != nil {
cond.Where(q.Channel.Expiration.Gte(core.LocalDateTime(*req.ExpireAfter)))
cond.Where(q.Channel.Expiration.Gte(orm.LocalDateTime(*req.ExpireAfter)))
}
if req.ExpireBefore != nil {
cond.Where(q.Channel.Expiration.Lte(core.LocalDateTime(*req.ExpireBefore)))
cond.Where(q.Channel.Expiration.Lte(orm.LocalDateTime(*req.ExpireBefore)))
}
// 查询数据