From 972815f2db3ed940a7ce1a854aebf7db90c8dc8d Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 21 Sep 2024 11:04:35 +0800 Subject: [PATCH] 1 --- app/db/db_order.go | 6 ++++++ app/md/md_store.go | 20 +++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/app/db/db_order.go b/app/db/db_order.go index db04099..927e916 100644 --- a/app/db/db_order.go +++ b/app/db/db_order.go @@ -126,6 +126,12 @@ func GetStoreOrderList(eg *xorm.Engine, req md.StoreOrder, parent_uid int) (*[]m if req.EndTime != "" { sess.And("create_at<=?", req.EndTime) } + if req.ConfirmStartTime != "" { + sess.And("confirm_at>=?", req.ConfirmStartTime) + } + if req.ConfirmEndTime != "" { + sess.And("confirm_at<=?", req.ConfirmEndTime) + } size := utils.StrToInt(req.Size) start := (utils.StrToInt(req.P) - 1) * size count, err := sess.Limit(size, start).OrderBy("create_at desc,id desc").FindAndCount(&data) diff --git a/app/md/md_store.go b/app/md/md_store.go index bc0cc98..0b253e6 100644 --- a/app/md/md_store.go +++ b/app/md/md_store.go @@ -17,15 +17,17 @@ type StoreSave struct { } type StoreOrder struct { - P string `json:"p"` - Size string `json:"size"` - Nickname string `json:"nickname"` - Phone string `json:"phone"` - StartTime string `json:"start_time"` - EndTime string `json:"end_time"` - Oid string `json:"oid"` - StoreUid string `json:"store_uid"` - StoreName string `json:"store_name"` + P string `json:"p"` + Size string `json:"size"` + Nickname string `json:"nickname"` + Phone string `json:"phone"` + StartTime string `json:"start_time"` + EndTime string `json:"end_time"` + Oid string `json:"oid"` + StoreUid string `json:"store_uid"` + StoreName string `json:"store_name"` + ConfirmStartTime string `json:"confirm_start_time"` + ConfirmEndTime string `json:"confirm_end_time"` } type StoreOrderTotal struct { StoreUid string `json:"store_uid"`