UPDATE order_template
template_name = #{templateName},
goods_brand = #{goodsBrand},
goods_specification = #{goodsSpecification},
video_url = #{videoUrl},
image_url = #{imageUrl},
address_id = #{addressId},
street_id = #{streetId},
full_address = #{fullAddress},
customer_name = #{customerName},
customer_phone = #{customerPhone},
order_mode = #{orderMode},
price = #{price},
agency_fund = #{agencyFund},
information_fee = #{informationFee},
bonus = #{bonus},
logistics_code = #{logisticsCode},
need_wagon = #{needWagon},
need_carry = #{needCarry},
floor = #{floor},
update_by = #{updateBy},
update_time = SYSDATE()
WHERE id = #{id}
INSERT INTO order_template(
user_id,
template_name,
goods_brand,
goods_specification,
video_url,
image_url,
address_id,
street_id,
full_address,
customer_name,
customer_phone,
order_mode,
price,
agency_fund,
information_fee,
bonus,
logistics_code,
need_wagon,
need_carry,
floor,
create_time
)VALUES(
#{userId},
#{templateName},
#{goodsBrand},
#{goodsSpecification},
#{videoUrl},
#{imageUrl},
#{addressId},
#{streetId},
#{fullAddress},
#{customerName},
#{customerPhone},
#{orderMode},
#{price},
#{agencyFund},
#{informationFee},
#{bonus},
#{logisticsCode},
#{needWagon},
#{needCarry},
#{floor},
SYSDATE()
)
DELETE FROM order_template WHERE id = #{id}
DELETE FROM order_template WHERE id IN
#{id}
SELECT id, user_id, template_name,goods_brand, goods_specification, video_url, image_url,
address_id, street_id, full_address, customer_name, customer_phone, order_mode,
price, agency_fund, information_fee, bonus, logistics_code, need_wagon, need_carry, floor,
create_by, create_time, update_by, update_time, remark
FROM order_template
INSERT INTO order_template_goods(order_template_id, goods_id, goods_name, dept_goodscategory_id, number)
VALUES(#{orderTemplateId}, #{goodsId}, #{goodsName}, #{deptGoodsCategoryId}, #{number})
DELETE FROM order_template_goods WHERE order_template_id = #{orderTemplateId}