insert into cart(id,productId,userId,name,imageUrl,price,num,money,createTime) values(null,#{productId},#{userId},#{name},#{imageUrl},#{price},#{num},#{money},#{createTime}) update cart set num = #{num},money = #{money} where id = #{id} delete from cart where id in(${value}) delete from cart where userId = #{value}