where('is_delete',1) ->field(['goods_id','is_sale','is_pool']) ->select(); if ($goods_list->isEmpty()) { return true; } $goodsIds = array_column($goods_list->toArray(), "goods_id"); GoodsModel::whereIn('origin_goods_id', $goodsIds)->update(['is_delete' => 1, 'update_time' => time()]); //删除批发商城的商品 return true; } }