select id, goods_id, is_default, product_name, price, price_n, price_m, stock, up_at, down_at, num_sale, status, create_at, del_flag from mall_goods_product insert into mall_goods_product goods_id, is_default, product_name, price, price_n, price_m, stock, up_at, down_at, num_sale, status, create_at, del_flag, #{goodsId}, #{isDefault}, #{productName}, #{price}, #{priceN}, #{priceM}, #{stock}, #{upAt}, #{downAt}, #{numSale}, #{status}, #{createAt}, #{delFlag}, update mall_goods_product goods_id = #{goodsId}, is_default = #{isDefault}, product_name = #{productName}, price = #{price}, price_n = #{priceN}, price_m = #{priceM}, stock = #{stock}, up_at = #{upAt}, down_at = #{downAt}, num_sale = #{numSale}, status = #{status}, create_at = #{createAt}, del_flag = #{delFlag}, where id = #{id} update mall_goods_product set del_flag = '1' where goods_id = #{goodsId} update mall_goods_product set stock = stock + #{total}, num_sale = num_sale - #{total} where id = #{productId} update mall_goods_product set stock = stock - #{total}, num_sale = num_sale + #{total} where id = #{productId} delete from mall_goods_product where id = #{id} delete from mall_goods_product where id in #{id}