From 425c0278f4caff6f6a7e338d487eda01d0dd04b2 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 19 Jun 2024 19:32:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E6=9C=9F=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/implement/installment_payment_list_db.go | 2 +- src/implement/installment_payment_repaid_flow_db.go | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/implement/installment_payment_list_db.go b/src/implement/installment_payment_list_db.go index 659a224..aa2abf0 100644 --- a/src/implement/installment_payment_list_db.go +++ b/src/implement/installment_payment_list_db.go @@ -60,7 +60,7 @@ func (i InstallmentPaymentListDb) FinInstallmentPaymentList(arg map[string]strin } size := zhios_order_relate_utils.StrToInt(arg["size"]) start := (zhios_order_relate_utils.StrToInt(arg["p"]) - 1) * size - err = sess.Limit(size, start).Find(&mm) + err = sess.Limit(size, start).Desc("id").Find(&mm) if err != nil { return nil, zhios_order_relate_logx.Error(err) } diff --git a/src/implement/installment_payment_repaid_flow_db.go b/src/implement/installment_payment_repaid_flow_db.go index d713076..cd76b6f 100644 --- a/src/implement/installment_payment_repaid_flow_db.go +++ b/src/implement/installment_payment_repaid_flow_db.go @@ -3,7 +3,6 @@ package implement import ( "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/dao" "code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models" - zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils" zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx" "xorm.io/xorm" ) @@ -26,9 +25,7 @@ func (i InstallmentPaymentRepaidFlowDb) InsertInstallmentPaymentRepaidFlowBySess func (i InstallmentPaymentRepaidFlowDb) FinInstallmentRepaidFlow(arg map[string]string) (m *[]models.InstallmentPaymentRepaidFlow, err error) { mm := make([]models.InstallmentPaymentRepaidFlow, 0) sess := i.Db.Where("uid=?", arg["uid"]).And("record_id=?", arg["id"]) - size := zhios_order_relate_utils.StrToInt(arg["size"]) - start := (zhios_order_relate_utils.StrToInt(arg["p"]) - 1) * size - err = sess.Limit(size, start).Find(&mm) + err = sess.Find(&mm) if err != nil { return nil, zhios_order_relate_logx.Error(err) }