|
@@ -501,16 +501,15 @@ class Product extends Controller
|
|
|
$platforms = $platform_string ? explode(',', $platform_string) : '';
|
|
$platforms = $platform_string ? explode(',', $platform_string) : '';
|
|
|
$platforms = $platforms ? array_unique($platforms) : '';
|
|
$platforms = $platforms ? array_unique($platforms) : '';
|
|
|
|
|
|
|
|
- $platform_data = $ProductModel->platform_data();
|
|
|
|
|
- if (!empty($platforms) && $platforms != '') {
|
|
|
|
|
- foreach ($platforms as $platform) {
|
|
|
|
|
- $product_specs_log = $ProductModel
|
|
|
|
|
- ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
|
|
|
|
|
- ->where(['product_brand' => $Product->product_brand, 'product_name' => $Product->product_name, 'status' => '0', 'company_id' => $Product->company_id])
|
|
|
|
|
- ->where('id', '!=', $id)
|
|
|
|
|
- ->where(function ($query) use ($product_specs) {
|
|
|
|
|
- // 平台条件(固定)
|
|
|
|
|
- $query->where(function ($query_li) use ($product_specs) {
|
|
|
|
|
|
|
+ $platform_data = $ProductModel->platform_index_data();
|
|
|
|
|
+ foreach ($platforms as $platform) {
|
|
|
|
|
+ $product_specs_log = $ProductModel
|
|
|
|
|
+ ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
|
|
|
|
|
+ ->where(['product_brand' => $Product->product_brand, 'product_name' => $Product->product_name, 'status' => '0', 'company_id' => $Product->company_id])
|
|
|
|
|
+ ->where('id', '!=', $id)
|
|
|
|
|
+ ->where(function ($query) use ($product_specs) {
|
|
|
|
|
+ // 平台条件(固定)
|
|
|
|
|
+ $query->where(function ($query_li) use ($product_specs) {
|
|
|
|
|
|
|
|
foreach ($product_specs as $product_spec) {
|
|
foreach ($product_specs as $product_spec) {
|
|
|
if (empty($product_specs)) continue;
|
|
if (empty($product_specs)) continue;
|
|
@@ -524,7 +523,6 @@ class Product extends Controller
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
// 执行修改
|
|
// 执行修改
|
|
|
$result = $ProductModel->changeStatus($Product, $status);
|
|
$result = $ProductModel->changeStatus($Product, $status);
|
|
|
// 提示新增失败
|
|
// 提示新增失败
|