where('is_delete',0) ->where('is_sale',1) ->where('is_pool',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(['status' => 10, 'is_jd_remove' => 0, 'update_time' => time(), 'is_delete' => 0]); return true; } }