新增订单列表
This commit is contained in:
parent
556fc46dc2
commit
13266ffd48
@ -893,7 +893,7 @@ class Auth extends BaseController
|
||||
$districtCode = $this->request->param('district_code', '');
|
||||
$streetCode = $this->request->param('street_code');
|
||||
$villageCode = $this->request->param('village_code', '');
|
||||
$brigadeId = $this->request->param('brigade_id', -1);
|
||||
$brigadeId = $this->request->param('brigade_id', 0);
|
||||
$startDate = $this->request->param('start_date', date('Y-m-d'));
|
||||
$endDate = $this->request->param('end_date', date('Y-m-d'));
|
||||
$queryBuilder = Db::name('ProductOrderLog')->where('status', 1);
|
||||
@ -938,7 +938,7 @@ class Auth extends BaseController
|
||||
$districtCode = $this->request->param('district_code', '');
|
||||
$streetCode = $this->request->param('street_code');
|
||||
$villageCode = $this->request->param('village_code', '');
|
||||
$brigadeId = $this->request->param('brigade_id', -1);
|
||||
$brigadeId = $this->request->param('brigade_id', 0);
|
||||
$startDate = $this->request->param('start_date', date('Y-m-d'));
|
||||
$endDate = $this->request->param('end_date', date('Y-m-d'));
|
||||
$queryBuilder = Db::name('ProductOrderLog')->where('status', 1);
|
||||
@ -964,7 +964,21 @@ class Auth extends BaseController
|
||||
$queryBuilder = $queryBuilder->whereTime('create_time', '<=', trim($endDate) . ' 23:59:59');
|
||||
}
|
||||
$count = $queryBuilder->count();
|
||||
$list = $queryBuilder->setOption('field', [])->field([''])->order('id', 'desc')->page($page, $limit)->fetchSql(false)->select();
|
||||
$list = $queryBuilder->setOption('field', [])->field(['id', 'order_id', 'product_num', 'product_price', 'total_price', 'city_code', 'district_code', 'street_code', 'village_code', 'brigade_id', 'create_time'])->order('id', 'desc')->page($page, $limit)->fetchSql(false)->select();
|
||||
$orderIdList = [];
|
||||
if ($list) {
|
||||
$orderIdArray = $list->column('order_id');
|
||||
if (count($orderIdArray) > 0) {
|
||||
$orderIdList = Db::name('store_order')->whereIn('order_id', $orderIdArray)->fetchSql(false)->column('order_sn', 'order_id');
|
||||
}
|
||||
$list = $list->toArray();
|
||||
};
|
||||
foreach($list as $k=>$v) {
|
||||
$list[$k]['order_sn'] = '';
|
||||
if (!empty($orderIdList[$v['order_id']])) {
|
||||
$list[$k]['order_sn'] = $orderIdList[$v['order_id']];
|
||||
}
|
||||
}
|
||||
return app('json')->success(compact('count', 'list'));
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ Route::group('api/', function () {
|
||||
Route::any('dotest', 'api.Auth/dotest');
|
||||
Route::post('goods/take/:id', 'api.Auth/deliveryGoods');
|
||||
Route::get('order/statistics', 'api.Auth/orderStatistics');
|
||||
Route::get('order/list', 'api.Auth/orderList');
|
||||
Route::get('region/order', 'api.Auth/orderList');
|
||||
Route::resource('upload', 'api.Upload');
|
||||
Route::post('articleCatch', 'api.Upload/article');
|
||||
//强制登录
|
||||
|
Loading…
x
Reference in New Issue
Block a user