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)