重命名包为 core

This commit is contained in:
2025-05-07 17:38:27 +08:00
parent 60bbe47368
commit 0a16f9923c
43 changed files with 349 additions and 347 deletions

View File

@@ -2,7 +2,7 @@ package handlers
import (
"platform/web/auth"
"platform/web/common"
"platform/web/core"
q "platform/web/queries"
"platform/web/services"
"time"
@@ -13,7 +13,7 @@ import (
// region ListBill
type ListBillReq struct {
common.PageReq
core.PageReq
BillNo *string `json:"bill_no"`
Type *int `json:"type"`
CreateAfter *time.Time `json:"create_after"`
@@ -42,10 +42,10 @@ func ListBill(c *fiber.Ctx) error {
do.Where(q.Bill.Type.Eq(int32(*req.Type)))
}
if req.CreateAfter != nil {
do.Where(q.Bill.CreatedAt.Gte(common.LocalDateTime(*req.CreateAfter)))
do.Where(q.Bill.CreatedAt.Gte(core.LocalDateTime(*req.CreateAfter)))
}
if req.CreateBefore != nil {
do.Where(q.Bill.CreatedAt.Lte(common.LocalDateTime(*req.CreateBefore)))
do.Where(q.Bill.CreatedAt.Lte(core.LocalDateTime(*req.CreateBefore)))
}
if req.BillNo != nil && *req.BillNo != "" {
do.Where(q.Bill.BillNo.Eq(*req.BillNo))
@@ -72,7 +72,7 @@ func ListBill(c *fiber.Ctx) error {
}
}
return c.JSON(common.PageResp{
return c.JSON(core.PageResp{
Total: int(total),
Page: req.GetPage(),
Size: req.GetSize(),