|
@@ -216,7 +216,16 @@ class DataSyncToU8Service extends Service
|
|
|
|
|
|
public function forCheck2($product_category){
|
|
public function forCheck2($product_category){
|
|
$category = json_decode($product_category,true);
|
|
$category = json_decode($product_category,true);
|
|
- if(in_array(ProductCategory::Special_for_roll1, $category) || in_array(ProductCategory::Special_for_roll2, $category)) return true;
|
|
|
|
|
|
+ $id = ProductCategory::where('parent_id',ProductCategory::Special_for_roll_p)
|
|
|
|
+ ->where('id','<>',ProductCategory::Special_for_roll3)
|
|
|
|
+ ->select('id')
|
|
|
|
+ ->get()->toArray();
|
|
|
|
+ $id = array_column($id,'id');
|
|
|
|
+ if(empty($id)) return false;
|
|
|
|
+ foreach ($id as $value){
|
|
|
|
+ if(in_array($value, $category)) return [true, ''];
|
|
|
|
+ }
|
|
|
|
+
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|