更新订单统计查询
@ -919,6 +919,7 @@ class Auth extends BaseController
|
||||
$typeId = $this->request->param('type_id', 0);
|
||||
$startDate = $this->request->param('start_date', '');
|
||||
$endDate = $this->request->param('end_date', '');
|
||||
$sql = $this->request->param('sql', 0);
|
||||
$queryBuilder = Db::name('ProductOrderLog')->where('status', 1);
|
||||
//根据商户分类店铺类型筛选商户
|
||||
$queryMerBuilder = Db::name('Merchant');
|
||||
@ -931,19 +932,49 @@ class Auth extends BaseController
|
||||
$merIdArray = $queryMerBuilder->fetchSql(false)->column('mer_id');
|
||||
$queryBuilder = $queryBuilder->whereIn('mer_id', $merIdArray);
|
||||
if ($cityCode) {
|
||||
$queryBuilder = $queryBuilder->where('city_code', $cityCode);
|
||||
$cityCodeArray = explode(',', $cityCode );
|
||||
if (count($cityCodeArray) == 1) {
|
||||
$queryBuilder = $queryBuilder->where('city_code', $cityCode);
|
||||
}
|
||||
if (count($cityCodeArray) > 1) {
|
||||
$queryBuilder = $queryBuilder->whereIn('city_code', $cityCodeArray);
|
||||
}
|
||||
}
|
||||
if ($districtCode) {
|
||||
$queryBuilder = $queryBuilder->where('district_code', $districtCode);
|
||||
$districtCodeArray = explode(',', $districtCode);
|
||||
if (count($districtCodeArray) == 1) {
|
||||
$queryBuilder = $queryBuilder->where('district_code', $districtCode);
|
||||
}
|
||||
if (count($districtCodeArray) > 1) {
|
||||
$queryBuilder = $queryBuilder->whereIn('district_code', $districtCodeArray);
|
||||
}
|
||||
}
|
||||
if ($streetCode) {
|
||||
$queryBuilder = $queryBuilder->where('street_code', $streetCode);
|
||||
$streetCodeArray = explode(',', $streetCode);
|
||||
if (count($streetCodeArray) == 1) {
|
||||
$queryBuilder = $queryBuilder->where('street_code', $streetCode);
|
||||
}
|
||||
if (count($streetCodeArray) > 1) {
|
||||
$queryBuilder = $queryBuilder->whereIn('street_code', $streetCodeArray);
|
||||
}
|
||||
}
|
||||
if ($villageCode) {
|
||||
$queryBuilder = $queryBuilder->where('village_code', $villageCode);
|
||||
$villageCodeArray = explode(',', $villageCode);
|
||||
if (count($villageCodeArray) == 1) {
|
||||
$queryBuilder = $queryBuilder->where('village_code', $villageCode);
|
||||
}
|
||||
if (count($villageCodeArray) > 1) {
|
||||
$queryBuilder = $queryBuilder->whereIn('village_code', $villageCodeArray);
|
||||
}
|
||||
}
|
||||
if ($brigadeId) {
|
||||
$queryBuilder = $queryBuilder->where('brigade_id', $brigadeId);
|
||||
$brigadeIdArray = explode(',', $brigadeId);
|
||||
if (count($brigadeIdArray) == 1) {
|
||||
$queryBuilder = $queryBuilder->where('brigade_id', $brigadeId);
|
||||
}
|
||||
if (count($brigadeIdArray) > 1) {
|
||||
$queryBuilder = $queryBuilder->whereIn('brigade_id', $brigadeIdArray);
|
||||
}
|
||||
}
|
||||
if ($startDate) {
|
||||
$queryBuilder = $queryBuilder->whereTime('create_time', '>=', trim($startDate));
|
||||
@ -951,7 +982,7 @@ class Auth extends BaseController
|
||||
if ($endDate) {
|
||||
$queryBuilder = $queryBuilder->whereTime('create_time', '<=', trim($endDate) . ' 23:59:59');
|
||||
}
|
||||
$orderNum = $queryBuilder->fetchSql(false)->count();
|
||||
$orderNum = $queryBuilder->fetchSql((bool)$sql)->count();
|
||||
$productNum = $queryBuilder->sum('product_num');
|
||||
$totalPrice = $queryBuilder->sum('total_price');
|
||||
$data = [
|
||||
|
@ -2,4 +2,4 @@
|
||||
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
|
||||
if(window.location.protocol == 'https:'){
|
||||
document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">')
|
||||
}</script><link rel=stylesheet href=/static/index.5841170f.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.3f0852cf.js></script><script src=/static/js/index.f102bb5d.js></script></body></html>
|
||||
}</script><link rel=stylesheet href=/static/index.97465e7b.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c21fc11a.js></script><script src=/static/js/index.3dcb2e7f.js></script></body></html>
|
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB |
@ -54,7 +54,7 @@ body {overflow-x: hidden;}
|
||||
-o-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.acea-row.row-left {
|
||||
-webkit-box-pack: start;
|
||||
|
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 297 B |
Before Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 290 B |
Before Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 282 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 403 B |
Before Width: | Height: | Size: 398 B |
Before Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 238 B |
Before Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 223 B |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 235 B |
Before Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 420 B |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 8.8 KiB |