|
|
@@ -76,6 +76,8 @@ class LowPriceGoods extends Controller
|
|
|
$online_posting_min_price = request('online_posting_min_price', '');
|
|
|
$online_posting_max_price = request('online_posting_max_price', '');
|
|
|
$is_ultra_low_price = request('is_ultra_low_price', '');
|
|
|
+ $merge_city_ids = request('merge_city_ids', '');
|
|
|
+ $merge_province_ids = request('merge_province_ids', '');
|
|
|
// 时间条件
|
|
|
if ($collection_time_start_time) $map[] = ['collection_time', '>=', strtotime($collection_time_start_time)];
|
|
|
if ($collection_time_end_time) $map[] = ['collection_time', '<=', strtotime($collection_time_end_time)];
|
|
|
@@ -95,7 +97,6 @@ class LowPriceGoods extends Controller
|
|
|
if ($online_posting_max_price) $map[] = ['online_posting_price', '<=', $online_posting_max_price];
|
|
|
if ($is_ultra_low_price) $map[] = ['is_ultra_low_price', '=', $is_ultra_low_price];
|
|
|
|
|
|
-
|
|
|
$low_price_goods_where = [];
|
|
|
// 权限判断
|
|
|
if ($is_admin != 1 && $company_id != 0) {
|
|
|
@@ -188,6 +189,16 @@ class LowPriceGoods extends Controller
|
|
|
$shipment_city_ids = explode(',', $shipment_city_ids);
|
|
|
$LowPriceGoodsModel = $LowPriceGoodsModel->whereIn('shipment_city_id', $shipment_city_ids);
|
|
|
}
|
|
|
+ //多合并省份
|
|
|
+ if ($merge_province_ids && is_string($merge_province_ids)) {
|
|
|
+ $merge_province_ids = explode(',', $merge_province_ids);
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->whereIn('merge_province_id', $merge_province_ids);
|
|
|
+ }
|
|
|
+ //多合并市
|
|
|
+ if ($merge_city_ids && is_string($merge_city_ids)) {
|
|
|
+ $merge_city_ids = explode(',', $merge_city_ids);
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->whereIn('merge_city_id', $merge_city_ids);
|
|
|
+ }
|
|
|
$personnel_roles_info = $EmployeeModel->leftjoin('personnel_roles', 'personnel_roles.id', '=', 'personnel_employee.role_id')
|
|
|
->where('personnel_employee.id', $user_id)->select(['personnel_employee.id', 'personnel_roles.identity'])
|
|
|
->first();
|
|
|
@@ -279,6 +290,8 @@ class LowPriceGoods extends Controller
|
|
|
$message_data['online_posting_min_price'] = request('online_posting_min_price', '');
|
|
|
$message_data['online_posting_max_price'] = request('online_posting_max_price', '');
|
|
|
$message_data['is_ultra_low_price'] = request('is_ultra_low_price','');
|
|
|
+ $message_data['merge_city_ids'] = request('merge_city_ids', '');
|
|
|
+ $message_data['merge_province_ids'] = request('merge_province_ids', 1);
|
|
|
|
|
|
$low_price_goods_where = [];
|
|
|
// 权限判断
|
|
|
@@ -316,9 +329,10 @@ class LowPriceGoods extends Controller
|
|
|
$is_ultra_low_price = $message_data['is_ultra_low_price'] ?? '';
|
|
|
$online_posting_min_price = $message_data['online_posting_min_price'] ?? '';
|
|
|
$online_posting_max_price = $message_data['online_posting_max_price'] ?? '';
|
|
|
-
|
|
|
$collection_time_start_time = $message_data['collection_time_start_time'] ?? '';
|
|
|
$collection_time_end_time = $message_data['collection_time_end_time'] ?? '';
|
|
|
+ $merge_city_ids = $message_data['merge_city_ids'] ?? '';
|
|
|
+ $merge_province_ids = $message_data['merge_province_ids'] ?? '';
|
|
|
// 时间条件
|
|
|
if ($collection_time_start_time) $map[] = ['collection_time', '>=', strtotime($collection_time_start_time)];
|
|
|
if ($collection_time_end_time) $map[] = ['collection_time', '<=', strtotime($collection_time_end_time)];
|
|
|
@@ -334,7 +348,6 @@ class LowPriceGoods extends Controller
|
|
|
if ($online_posting_max_price) $map[] = ['online_posting_price', '<=', $online_posting_max_price];
|
|
|
if ($is_ultra_low_price) $map[] = ['is_ultra_low_price', '=', $is_ultra_low_price];
|
|
|
|
|
|
-
|
|
|
$admin_company_id = $message_data['admin_company_id'];
|
|
|
$company_id = $message_data['company_id'];
|
|
|
$is_admin = $message_data['is_admin']; //是否管理员操作 0=是1=否
|
|
|
@@ -432,6 +445,16 @@ class LowPriceGoods extends Controller
|
|
|
$shipment_city_ids = explode(',', $shipment_city_ids);
|
|
|
$LowPriceGoodsModel = $LowPriceGoodsModel->whereIn('shipment_city_id', $shipment_city_ids);
|
|
|
}
|
|
|
+ //多合并省份
|
|
|
+ if ($merge_province_ids && is_string($merge_province_ids)) {
|
|
|
+ $merge_province_ids = explode(',', $merge_province_ids);
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->whereIn('merge_province_id', $merge_province_ids);
|
|
|
+ }
|
|
|
+ //多合并市
|
|
|
+ if ($merge_city_ids && is_string($merge_city_ids)) {
|
|
|
+ $merge_city_ids = explode(',', $merge_city_ids);
|
|
|
+ $LowPriceGoodsModel = $LowPriceGoodsModel->whereIn('merge_city_id', $merge_city_ids);
|
|
|
+ }
|
|
|
$personnel_roles_info = $EmployeeModel->leftjoin('personnel_roles', 'personnel_roles.id', '=', 'personnel_employee.role_id')
|
|
|
->where('personnel_employee.id', $user_id)->select(['personnel_employee.id', 'personnel_roles.identity'])
|
|
|
->first();
|