select ac.canteen_id, ac.canteen_name, aa.area_name, ac.area_id, ac.canteen_type, ac.director, ac.contact_tel, ac.business_state,
ac.start_business_time, ac.end_business_time, ac.img_url, ac.if_enable_pay, ac.pay_types, ac.if_enable_delivery,
ac.deliveries, ac.if_enable_order, ac.if_book, ac.if_reserve, ac.if_enable_pay_code, ac.pay_code_url, ac.del_flag,
ac.create_by, ac.create_time, ac.update_by, ac.update_time, ac.remark
from alloc_canteen ac
left join alloc_area aa on ac.area_id = aa.area_id
insert into alloc_canteen
canteen_name,
area_id,
canteen_type,
director,
contact_tel,
business_state,
start_business_time,
end_business_time,
img_url,
if_enable_pay,
pay_types,
if_enable_delivery,
deliveries,
if_enable_order,
if_book,
if_reserve,
if_enable_pay_code,
pay_code_url,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark,
#{canteenName},
#{areaId},
#{canteenType},
#{director},
#{contactTel},
#{businessState},
#{startBusinessTime},
#{endBusinessTime},
#{imgUrl},
#{ifEnablePay},
#{payTypes},
#{ifEnableDelivery},
#{deliveries},
#{ifEnableOrder},
#{ifBook},
#{ifReserve},
#{ifEnablePayCode},
#{payCodeUrl},
#{delFlag},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update alloc_canteen
canteen_name = #{canteenName},
area_id = #{areaId},
canteen_type = #{canteenType},
director = #{director},
contact_tel = #{contactTel},
business_state = #{businessState},
start_business_time = #{startBusinessTime},
end_business_time = #{endBusinessTime},
img_url = #{imgUrl},
if_enable_pay = #{ifEnablePay},
pay_types = #{payTypes},
if_enable_delivery = #{ifEnableDelivery},
deliveries = #{deliveries},
if_enable_order = #{ifEnableOrder},
if_book = #{ifBook},
if_reserve = #{ifReserve},
if_enable_pay_code = #{ifEnablePayCode},
pay_code_url = #{payCodeUrl},
del_flag = #{delFlag},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where canteen_id = #{canteenId}
delete from alloc_canteen where canteen_id = #{canteenId}
delete from alloc_canteen where canteen_id in
#{canteenId}