huangjiajun 1 maand geleden
bovenliggende
commit
972815f2db
2 gewijzigde bestanden met toevoegingen van 17 en 9 verwijderingen
  1. +6
    -0
      app/db/db_order.go
  2. +11
    -9
      app/md/md_store.go

+ 6
- 0
app/db/db_order.go Bestand weergeven

@@ -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 Bestand weergeven

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


Laden…
Annuleren
Opslaan