select id, name, type, protein_ratio, fat_ratio, carbon_ratio, area, remark, create_by, create_time, update_by, update_time from sys_ingredient insert into sys_ingredient name, type, protein_ratio, fat_ratio, carbon_ratio, area, remark, create_by, create_time, update_by, update_time, #{name}, #{type}, #{proteinRatio}, #{fatRatio}, #{carbonRatio}, #{area}, #{remark}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, insert into sys_ingredient_rec(ingredient_id, rec_id) values (#{item.ingredientId},#{item.recommandId}) insert into sys_ingredient_not_rec(ingredient_id, not_rec_id) values (#{item.ingredientId},#{item.notRecommandId}) delete from sys_ingredient_rec where ingredient_id=#{ingredientId} delete from sys_ingredient_not_rec where ingredient_id=#{ingredientId} update sys_ingredient name = #{name}, type = #{type}, protein_ratio = #{proteinRatio}, fat_ratio = #{fatRatio}, carbon_ratio = #{carbonRatio}, area = #{area}, remark = #{remark}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, where id = #{id} delete from sys_ingredient where id = #{id} delete from sys_ingredient where id in #{id}