diff --git a/app/statistics/controller/IndexController.php b/app/statistics/controller/IndexController.php index 5e1cf7134..cc804aa1d 100644 --- a/app/statistics/controller/IndexController.php +++ b/app/statistics/controller/IndexController.php @@ -159,12 +159,9 @@ class IndexController extends BaseLikeController // if (ProductLogic::hasError()) { // return $this->fail(ProductLogic::getError()); //获取错误信息并返回错误信息 // } - $select = Db::connect('demo')->name('store_order')->where($where); - if ($time) { - $select->whereDay('create_time', $time); - } - $res = $select->limit(20)->order('id desc')->field('id,order_id,pay_price,create_time')->select()->toArray(); - return $this->success('ok', $res); + $select = Db::connect('demo')->name('store_order')->where($where)->limit(20)->order('id desc') + ->field('id,order_id,pay_price,create_time')->select()->toArray(); + return $this->success('ok', $select); } /** * 成交用户数据