|
@@ -354,7 +354,7 @@ class BasicPanel extends Controller
|
|
|
}
|
|
}
|
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
|
// 禁止挂网省份统计
|
|
// 禁止挂网省份统计
|
|
|
- $violationProductModel = $violationProductModel->where([['province_name','!=','']]);
|
|
|
|
|
|
|
+ $violationProductModel = $violationProductModel->where([['merge_province_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -377,8 +377,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 ViolationProductModel 中有 province 字段,表示省份信息
|
|
// 假设 ViolationProductModel 中有 province 字段,表示省份信息
|
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['province_name', DB::raw('count(province_name) as count')])
|
|
|
|
|
- ->groupby('province_name')
|
|
|
|
|
|
|
+ ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
|
|
|
|
|
+ ->groupby('merge_province_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$province_totle_count = 0;
|
|
$province_totle_count = 0;
|
|
@@ -433,7 +433,7 @@ class BasicPanel extends Controller
|
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
|
if ($province_id) $map[] = ['province_id', '=', $province_id];
|
|
if ($province_id) $map[] = ['province_id', '=', $province_id];
|
|
|
// 禁止挂网城市统计
|
|
// 禁止挂网城市统计
|
|
|
- $violationProductModel = $violationProductModel->where([['city_name','!=','']]);
|
|
|
|
|
|
|
+ $violationProductModel = $violationProductModel->where([['merge_city_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -456,8 +456,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 ViolationProductModel 中有 city 字段,表示城市信息
|
|
// 假设 ViolationProductModel 中有 city 字段,表示城市信息
|
|
|
// 查询指定时间范围内的数据,并按 city 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 city 分组统计数量
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['city_name', DB::raw('count(city_name) as count')])
|
|
|
|
|
- ->groupby('city_name')
|
|
|
|
|
|
|
+ ->select(['merge_city_name', DB::raw('count(merge_city_name) as count')])
|
|
|
|
|
+ ->groupby('merge_city_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$city_totle_count = 0;
|
|
$city_totle_count = 0;
|
|
@@ -700,7 +700,7 @@ class BasicPanel extends Controller
|
|
|
}
|
|
}
|
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
|
// 禁止挂网省份统计
|
|
// 禁止挂网省份统计
|
|
|
- $LowPriceGoodsModel = $LowPriceGoodsModel->where([['province_name','!=','']]);
|
|
|
|
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->where([['merge_province_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -723,8 +723,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 LowPriceGoodsModel 中有 province 字段,表示省份信息
|
|
// 假设 LowPriceGoodsModel 中有 province 字段,表示省份信息
|
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['province_name', DB::raw('count(province_name) as count')])
|
|
|
|
|
- ->groupby('province_name')
|
|
|
|
|
|
|
+ ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
|
|
|
|
|
+ ->groupby('merge_province_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$province_totle_count = 0;
|
|
$province_totle_count = 0;
|
|
@@ -779,7 +779,7 @@ class BasicPanel extends Controller
|
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
|
if ($province_id) $map[] = ['province_id', '=', $province_id];
|
|
if ($province_id) $map[] = ['province_id', '=', $province_id];
|
|
|
// 禁止挂网城市统计
|
|
// 禁止挂网城市统计
|
|
|
- $LowPriceGoodsModel = $LowPriceGoodsModel->where([['city_name','!=','']]);
|
|
|
|
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->where([['merge_city_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -802,8 +802,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 LowPriceGoodsModel 中有 city 字段,表示城市信息
|
|
// 假设 LowPriceGoodsModel 中有 city 字段,表示城市信息
|
|
|
// 查询指定时间范围内的数据,并按 city 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 city 分组统计数量
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['city_name', DB::raw('count(city_name) as count')])
|
|
|
|
|
- ->groupby('city_name')
|
|
|
|
|
|
|
+ ->select(['merge_city_name', DB::raw('count(merge_city_name) as count')])
|
|
|
|
|
+ ->groupby('merge_city_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$city_totle_count = 0;
|
|
$city_totle_count = 0;
|
|
@@ -932,7 +932,7 @@ class BasicPanel extends Controller
|
|
|
}
|
|
}
|
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
if ($product_name) $map[] = ['product_name', 'like', '%' . $product_name . '%'];
|
|
|
// 禁止挂网平台分布统计
|
|
// 禁止挂网平台分布统计
|
|
|
- $LowPriceGoodsModel = $LowPriceGoodsModel->where([['province_name','!=','']]);
|
|
|
|
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->where([['merge_province_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -955,8 +955,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 LowPriceGoodsModel 中有 province 字段,表示省份信息
|
|
// 假设 LowPriceGoodsModel 中有 province 字段,表示省份信息
|
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
$result = $LowPriceGoodsModel->where($map)->where('status', 0)
|
|
|
- ->select(['province_name', DB::raw('count(province_name) as count')])
|
|
|
|
|
- ->groupby('province_name')
|
|
|
|
|
|
|
+ ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
|
|
|
|
|
+ ->groupby('merge_province_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get();
|
|
->get();
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
@@ -1102,8 +1102,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 ViolationProductModel 中有 platform 字段,表示平台信息
|
|
// 假设 ViolationProductModel 中有 platform 字段,表示平台信息
|
|
|
// 查询指定时间范围内的数据,并按 platform 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 platform 分组统计数量
|
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
$result = $violationProductModel->where($map)->where('status', 0)
|
|
|
- ->select(['province_name', DB::raw('count(province_name) as count')])
|
|
|
|
|
- ->groupby(['province_name'])
|
|
|
|
|
|
|
+ ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
|
|
|
|
|
+ ->groupby(['merge_province_name'])
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get();
|
|
->get();
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
@@ -1300,7 +1300,7 @@ class BasicPanel extends Controller
|
|
|
$map[] = ['company_id', '=', $admin_company_id];
|
|
$map[] = ['company_id', '=', $admin_company_id];
|
|
|
}
|
|
}
|
|
|
// 违规公司平台分布统计
|
|
// 违规公司平台分布统计
|
|
|
- $ViolationStoreModel = $ViolationStoreModel->where([['province_name','!=','']]);
|
|
|
|
|
|
|
+ $ViolationStoreModel = $ViolationStoreModel->where([['merge_province_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -1323,8 +1323,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 $violationProductModel 中有 province 字段,表示省份信息
|
|
// 假设 $violationProductModel 中有 province 字段,表示省份信息
|
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
|
$result = $ViolationStoreModel->where($map)->where('status', 0)
|
|
$result = $ViolationStoreModel->where($map)->where('status', 0)
|
|
|
- ->select(['province_name', DB::raw('count(province_name) as count')])
|
|
|
|
|
- ->groupby('province_name')
|
|
|
|
|
|
|
+ ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
|
|
|
|
|
+ ->groupby('merge_province_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get();
|
|
->get();
|
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
return json_send(['code' => 'success', 'msg' => '获取成功', 'data' => $result]);
|
|
@@ -1367,7 +1367,7 @@ class BasicPanel extends Controller
|
|
|
$map[] = ['company_id', '=', $admin_company_id];
|
|
$map[] = ['company_id', '=', $admin_company_id];
|
|
|
}
|
|
}
|
|
|
// 违规店铺省份统计
|
|
// 违规店铺省份统计
|
|
|
- $ViolationStoreModel = $ViolationStoreModel->where([['province_name','!=','']]);
|
|
|
|
|
|
|
+ $ViolationStoreModel = $ViolationStoreModel->where([['merge_province_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -1390,8 +1390,8 @@ class BasicPanel extends Controller
|
|
|
// 假设 $ViolationStoreModel 中有 province 字段,表示省份信息
|
|
// 假设 $ViolationStoreModel 中有 province 字段,表示省份信息
|
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
|
$result = $ViolationStoreModel->where($map)->where('status', 0)
|
|
$result = $ViolationStoreModel->where($map)->where('status', 0)
|
|
|
- ->select(['province_name', DB::raw('count(province_name) as count')])
|
|
|
|
|
- ->groupby('province_name')
|
|
|
|
|
|
|
+ ->select(['merge_province_name', DB::raw('count(merge_province_name) as count')])
|
|
|
|
|
+ ->groupby('merge_province_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$province_totle_count = 0;
|
|
$province_totle_count = 0;
|
|
@@ -1445,7 +1445,7 @@ class BasicPanel extends Controller
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 违规店铺省份统计
|
|
// 违规店铺省份统计
|
|
|
- $ViolationStoreModel = $ViolationStoreModel->where([['city_name','!=','']]);
|
|
|
|
|
|
|
+ $ViolationStoreModel = $ViolationStoreModel->where([['merge_city_name','!=','']]);
|
|
|
if ($terminal_type) {
|
|
if ($terminal_type) {
|
|
|
$platform = [];
|
|
$platform = [];
|
|
|
switch ($terminal_type) {
|
|
switch ($terminal_type) {
|
|
@@ -1468,9 +1468,9 @@ class BasicPanel extends Controller
|
|
|
// 假设 $ViolationStoreModel 中有 province 字段,表示省份信息
|
|
// 假设 $ViolationStoreModel 中有 province 字段,表示省份信息
|
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
// 查询指定时间范围内的数据,并按 province 分组统计数量
|
|
|
$result = $ViolationStoreModel->where($map)->where('status', 0)
|
|
$result = $ViolationStoreModel->where($map)->where('status', 0)
|
|
|
- ->select(['city_name', DB::raw('count(city_name) as count')])
|
|
|
|
|
|
|
+ ->select(['merge_city_name', DB::raw('count(merge_city_name) as count')])
|
|
|
->distinct('company_name')
|
|
->distinct('company_name')
|
|
|
- ->groupby('city_name')
|
|
|
|
|
|
|
+ ->groupby('merge_city_name')
|
|
|
->orderby('count', 'desc')
|
|
->orderby('count', 'desc')
|
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
$province_totle_count = 0;
|
|
$province_totle_count = 0;
|