select combine_id, goods_id, price, stock, people_num, end_minute, time_id, end_time, sale_num, purchase_limits, status, create_at, update_at, del_flag from mall_combine_goods
insert into mall_combine_goods
goods_id,
price,
stock,
people_num,
end_minute,
time_id,
end_time,
sale_num,
purchase_limits,
status,
create_at,
update_at,
del_flag,
#{goodsId},
#{price},
#{stock},
#{peopleNum},
#{endMinute},
#{timeId},
#{endTime},
#{saleNum},
#{purchaseLimits},
#{status},
#{createAt},
#{updateAt},
#{delFlag},
update mall_combine_goods
goods_id = #{goodsId},
price = #{price},
stock = #{stock},
people_num = #{peopleNum},
end_minute = #{endMinute},
time_id = #{timeId},
end_time = #{endTime},
sale_num = #{saleNum},
purchase_limits = #{purchaseLimits},
status = #{status},
create_at = #{createAt},
update_at = #{updateAt},
del_flag = #{delFlag},
where combine_id = #{combineId}
delete from mall_combine_goods where combine_id = #{combineId}
delete from mall_combine_goods where combine_id in
#{combineId}
update mall_combine_goods set
stock = stock - #{count},
sale_num = sale_num + #{count}
where goods_id = #{goodsId}
and stock > 0
update mall_combine_goods set
stock = stock + #{count},
sale_num = sale_num - #{count}
where goods_id = #{goodsId}