From 8c5a8b8e35df0bf4c237c9c5fe0feaa20d539ac6 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 16 Apr 2024 11:23:42 +0800 Subject: [PATCH] =?UTF-8?q?1ipad=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/db_order_list.go | 2 +- app/ipad/svc/svc_order.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/db/db_order_list.go b/app/db/db_order_list.go index c533770..bc9582a 100644 --- a/app/db/db_order_list.go +++ b/app/db/db_order_list.go @@ -168,7 +168,7 @@ func GetOrderListByIpad(eg *xorm.Engine, param map[string]string) (*[]model.Orde } size := utils.StrToInt(param["limit"]) start := (utils.StrToInt(param["page"]) - 1) * size - count, err := sess.Limit(size, start).OrderBy("id asc").FindAndCount(&order) + count, err := sess.Limit(size, start).OrderBy("time desc,id desc").FindAndCount(&order) if err != nil { return nil, count } diff --git a/app/ipad/svc/svc_order.go b/app/ipad/svc/svc_order.go index f6ca1d0..16ebd47 100644 --- a/app/ipad/svc/svc_order.go +++ b/app/ipad/svc/svc_order.go @@ -40,6 +40,7 @@ func Order(c *gin.Context) { "btn_str": btnArr[v.State], "state": utils.IntToStr(v.State), "enterprise_name": enterpriseName, + "time": v.CreateAt.Format("2006-01-02 15:04:05"), } list = append(list, tmp)