diff --git a/backend/app/crud/collection_protocol.py b/backend/app/crud/collection_protocol.py index 5c3211b5..e8729810 100644 --- a/backend/app/crud/collection_protocol.py +++ b/backend/app/crud/collection_protocol.py @@ -1507,7 +1507,10 @@ def list_audits( page = max(1, page) page_size = min(max(1, page_size), 100) rows = ( - q_base.order_by(BizProtocolAudit.create_time.desc()) + q_base.order_by( + BizProtocolAudit.order_num.asc(), + BizProtocolAudit.create_time.desc(), + ) .offset((page - 1) * page_size) .limit(page_size) .all() @@ -1682,7 +1685,10 @@ def list_receipt_confirm_details( page = max(1, page) page_size = min(max(1, page_size), 100) rows = ( - q_base.order_by(BizProtocolPaymentDetail.create_time.desc()) + q_base.order_by( + BizProtocolPaymentDetail.order_num.asc(), + BizProtocolPaymentDetail.create_time.desc(), + ) .offset((page - 1) * page_size) .limit(page_size) .all() @@ -1835,7 +1841,10 @@ def list_refund_confirm_details( page = max(1, page) page_size = min(max(1, page_size), 100) rows = ( - q_base.order_by(BizProtocolPaymentDetail.create_time.desc()) + q_base.order_by( + BizProtocolPaymentDetail.order_num.asc(), + BizProtocolPaymentDetail.create_time.desc(), + ) .offset((page - 1) * page_size) .limit(page_size) .all()