', 1], ]; $map2 = [ ['id', 'in', $goods_ids], ['del', '=', 1], ]; $goods_ids = Db::name('goods')->whereOr([$map1, $map2])->column('id'); if (empty($goods_ids)) { return true; } Db::name('goods_collect')->whereIn('goods_id', $goods_ids)->delete(); return true; } catch (\Exception $e) { return $e->getMessage(); } } }