diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 0f78755d1..5306bc473 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -122,9 +122,9 @@ class BehaviorLogController extends ThinkController if(!empty(I('get.order_number'))) { $map['tab_spend.order_number'] = I('get.order_number'); - $data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->select(); + $data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select(); } else { - $data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->select(); + $data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select(); } $show_data = []; diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 7c37adf2d..2a87bac71 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -2134,9 +2134,9 @@ class ExportController extends Controller if(!empty(I('get.order_number'))) { $map['tab_spend.order_number'] = I('get.order_number'); - $data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->select(); + $data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select(); } else { - $data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->select(); + $data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select(); } $xlsData = [];