|
|
@ -140,8 +140,13 @@ class GoodsActivityService implements GoodsActivityServiceInterface |
|
|
public function checkOrderActivityCount($orderGoods, $limitNum=1) |
|
|
public function checkOrderActivityCount($orderGoods, $limitNum=1) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$goodsIds = []; |
|
|
|
|
|
foreach ($orderGoods as $key => &$storeGoods) { |
|
|
|
|
|
$goodsIds = array_merge($goodsIds, array_column(array_values($storeGoods), 'goods_id')); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$sourceGoods = GoodsActivity::query() |
|
|
$sourceGoods = GoodsActivity::query() |
|
|
->whereIn('id', array_values(array_column($orderGoods, 'goods_id'))) |
|
|
|
|
|
|
|
|
->whereIn('id', $goodsIds) |
|
|
->get()->toArray(); |
|
|
->get()->toArray(); |
|
|
|
|
|
|
|
|
$limitNums = [ |
|
|
$limitNums = [ |
|
|
|