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; } }