$goodsInfo = $this->goodsModel->field(['id','cover_file'])->whereIn('id',$goodsIds)->select();
$a = Collection($goodsInfo)->toArray();
foreach ($result as $key => $value){
$tempGoodId = !empty($value['goods_ids'])? explode(',',$value['goods_ids']):'';
if(!empty($tempGoodId)) {
foreach ($tempGoodId as $k => $v){
$result[$key]['goods_info'][] = $goodsResult[$v] ?? '';
}
}
}
Collection
最新推荐文章于 2024-08-28 22:25:00 发布