NoteStar 5 years ago
parent
commit
b7bde3279d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      vendor/fancyecommerce/fecshop/services/product/ProductMysqldb.php

+ 4 - 1
vendor/fancyecommerce/fecshop/services/product/ProductMysqldb.php

@@ -1039,6 +1039,7 @@ class ProductMysqldb extends Service implements ProductInterface
                 'and',
                 ['in', 'id', $productIds]
             ];
+
             foreach ($where as $k=>$v) {
                 if ($k == 'price' && is_array($v)) {  // 价格数据处理。
                     foreach ($v as $k1=>$v1) {
@@ -1049,11 +1050,13 @@ class ProductMysqldb extends Service implements ProductInterface
                         if ($k1 == '$lt') $fh = '<' ;
                         $whereArr[] = [$fh, 'price', $v1];
                     }
+                }elseif( $k == 'color' ){
+                    $whereArr[] = ['like','attr_group_info',$v];
                 } else {
                     $whereArr[] = [$k =>$v];
                 }
-                
             }
+
             $where = $whereArr;
         }
         // spu 进行group