select id, recipe_id, plan_id, recipe_name, is_default, recipe_type, effect_date, expire_date, canteen_id, stall_id, enable_flag, revision, create_by, create_time, update_by, update_time, remark from menu_recipe
insert into menu_recipe
recipe_id,plan_id,recipe_name,is_default,recipe_type,effect_date,expire_date,canteen_id,stall_id,enable_flag,revision,create_by,create_time,update_by,update_time,remark,#{recipeId},#{planId},#{recipeName},#{isDefault},#{recipeType},#{effectDate},#{expireDate},#{canteenId},#{stallId},#{enableFlag},#{revision},#{createBy},#{createTime},#{updateBy},#{updateTime},#{remark},
insert into menu_recipe
recipe_id,plan_id,recipe_name,is_default,recipe_type,effect_date,expire_date,canteen_id,stall_id,enable_flag,revision,create_by,create_time,update_by,update_time,remark,#{recipeId},#{planId},#{recipeName},#{isDefault},#{recipeType},#{effectDate},#{expireDate},#{canteenId},#{stallId},#{enableFlag},#{revision},#{createBy},#{createTime},#{updateBy},#{updateTime},#{remark},
insert into menu_recipe_detail
detail_id,sale_type_id,recipe_id,apply_date,apply_week,mealtime_type,detail_type,revision,create_by,create_time,update_by,update_time,
values
#{menuDetail.detailId},#{menuDetail.saleTypeId},#{menuDetail.recipeId},#{menuDetail.applyDate},#{menuDetail.applyWeek},#{menuDetail.mealtimeType},#{menuDetail.detailType},#{menuDetail.revision},#{menuDetail.createBy},#{menuDetail.createTime},#{menuDetail.updateBy},#{menuDetail.updateTime},
insert into menu_recipe_dishes
detail_id,dishes_id,price,size_type,supply_num,sale_num,surplus_num,restrict_num,sale_price,recommend_flag,sort_num,revision,create_by,create_time,update_by,update_time,
values
#{menuDish.detailId},#{menuDish.dishesId},#{menuDish.price},#{menuDish.sizeType},#{menuDish.supplyNum},#{menuDish.saleNum},#{menuDish.surplusNum},#{menuDish.restrictNum},#{menuDish.salePrice},#{menuDish.recommendFlag},#{menuDish.sortNum},#{menuDish.revision},#{menuDish.createBy},#{menuDish.createTime},#{menuDish.updateBy},#{menuDish.updateTime},
update menu_recipe
recipe_id = #{recipeId},plan_id = #{planId},recipe_name = #{recipeName},is_default = #{isDefault},recipe_type = #{recipeType},effect_date = #{effectDate},expire_date = #{expireDate},canteen_id = #{canteenId},stall_id = #{stallId},enable_flag = #{enableFlag},revision = #{revision},create_by = #{createBy},create_time = #{createTime},update_by = #{updateBy},update_time = #{updateTime},remark = #{remark},
where id = #{id}
update menu_recipe_detail set update_time = #{time} where recipe_id = #{recipeId}
delete from menu_recipe where id = #{id}
delete from menu_recipe where id in
#{id}
delete from menu_recipe_detail where id in
#{id}
delete from menu_recipe_dishes where id in
#{id}
delete from menu_app_recipe where recipe_id = #{recipeId}
and meal_line_id = #{mealLineId}
and bind_type = #{bindType}
insert into menu_app_recipe (recipe_id,bind_type,bind_time,meal_line_id)
values (#{recipeId},#{bindType},now(),#{mealLineId})