Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
chenbo 2023-12-02 19:53:01 +08:00
commit 9c6fcec3f0
2 changed files with 13 additions and 5 deletions

View File

@ -2510,6 +2510,12 @@ class StoreOrderRepository extends BaseRepository
$attr = []; $attr = [];
$arr = []; $arr = [];
if(!$attr_one){
$attr_one[] = '规格';
}
if(!$attr_two){
$attr_two[] = '默认';
}
foreach ($attr_one as $key => $value) { foreach ($attr_one as $key => $value) {
$attr[$value] = $attr_two[$key]; $attr[$value] = $attr_two[$key];
$arr[] = [ $arr[] = [

View File

@ -525,12 +525,14 @@ class ProductRepository extends BaseRepository
{ {
$result = []; $result = [];
foreach ($data as $value) { foreach ($data as $value) {
if($value['category']){
$result[] = [ $result[] = [
'product_id' => $productId, 'product_id' => $productId,
'mer_cate_id' => $value, 'mer_cate_id' => $value,
'mer_id' => $merId, 'mer_id' => $merId,
]; ];
} }
}
return $result; return $result;
} }