huangjiajun 3 months ago
parent
commit
972815f2db
2 changed files with 17 additions and 9 deletions
  1. +6
    -0
      app/db/db_order.go
  2. +11
    -9
      app/md/md_store.go

+ 6
- 0
app/db/db_order.go View File

@@ -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)


+ 11
- 9
app/md/md_store.go View File

@@ -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"`


Loading…
Cancel
Save