select ast.stall_id, ast.stall_name, ast.area_id, ast.canteen_id, ac.canteen_name, aa.area_name,
ast.stall_type, ast.third_stall_id, ast.director, ast.contact_tel,
ast.main_project, ast.business_state, ast.start_business_time, ast.end_business_time, ast.if_use_call_num,
ast.on_line_meal_code_prefix, ast.off_line_meal_code_prefix, ast.if_enable_delivery, ast.deliveries,
ast.if_enable_order, ast.img_url, ast.if_book, ast.if_reserve, ast.if_enable_pay_code, ast.pay_code_url,
ast.del_flag, ast.create_by, ast.create_time, ast.update_by, ast.update_time
from alloc_stall ast
left join alloc_canteen ac on ast.canteen_id = ac.canteen_id
left join alloc_area aa on ac.area_id = aa.area_id
insert into alloc_stall
stall_name,
area_id,
canteen_id,
stall_type,
third_stall_id,
director,
contact_tel,
main_project,
business_state,
start_business_time,
end_business_time,
if_use_call_num,
on_line_meal_code_prefix,
off_line_meal_code_prefix,
if_enable_delivery,
deliveries,
if_enable_order,
img_url,
if_book,
if_reserve,
if_enable_pay_code,
pay_code_url,
del_flag,
create_by,
create_time,
update_by,
update_time,
#{stallName},
#{areaId},
#{canteenId},
#{stallType},
#{thirdStallId},
#{director},
#{contactTel},
#{mainProject},
#{businessState},
#{startBusinessTime},
#{endBusinessTime},
#{ifUseCallNum},
#{onLineMealCodePrefix},
#{offLineMealCodePrefix},
#{ifEnableDelivery},
#{deliveries},
#{ifEnableOrder},
#{imgUrl},
#{ifBook},
#{ifReserve},
#{ifEnablePayCode},
#{payCodeUrl},
#{delFlag},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
update alloc_stall
stall_name = #{stallName},
area_id = #{areaId},
canteen_id = #{canteenId},
stall_type = #{stallType},
third_stall_id = #{thirdStallId},
director = #{director},
contact_tel = #{contactTel},
main_project = #{mainProject},
business_state = #{businessState},
start_business_time = #{startBusinessTime},
end_business_time = #{endBusinessTime},
if_use_call_num = #{ifUseCallNum},
on_line_meal_code_prefix = #{onLineMealCodePrefix},
off_line_meal_code_prefix = #{offLineMealCodePrefix},
if_enable_delivery = #{ifEnableDelivery},
deliveries = #{deliveries},
if_enable_order = #{ifEnableOrder},
img_url = #{imgUrl},
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},
where stall_id = #{stallId}
delete from alloc_stall where stall_id = #{stallId}
delete from alloc_stall where stall_id in
#{stallId}
delete from alloc_stall_mealtime where stall_id = #{stallId}
insert into alloc_stall_mealtime(stall_id, mealtime_type, mealtime_name, start_time, end_time)
values
(
#{item.stallId},
#{item.mealtimeType},
#{item.mealtimeName},
#{item.startTime},
#{item.endTime}
)