validate()) { return $this->errorResponse; } try { $this->cart_id_list = json_decode($this->cart_id_list, true); $data = []; foreach ($this->cart_id_list as $cart_id) { $cart = Cart::findOne([ 'store_id' => $this->store_id, 'is_delete' => 0, 'user_id' => $this->user_id, 'id' => $cart_id, ]); if (!$cart) { continue; } $cart->is_delete = 1; $cart->save(); $data[] = [ 'user_id' => $this->user_id, 'good_id' => $cart->goods_id, ]; } return [ 'code' => 0, 'msg' => '删除完成', ]; } catch (\Exception $e) { } } }