2025-04-03 15:06:05 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2025-04-05 19:12:26 +08:00
|
|
|
<mapper namespace="com.bonus.canteen.core.menu.mapper.MenuAppRecipeMapper">
|
|
|
|
|
<resultMap type="com.bonus.canteen.core.menu.domain.MenuAppRecipe" id="MenuAppRecipeResult">
|
2025-04-03 15:06:05 +08:00
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="recipeId" column="recipe_id" />
|
|
|
|
|
<result property="bindType" column="bind_type" />
|
|
|
|
|
<result property="bindTime" column="bind_time" />
|
|
|
|
|
<result property="mealLineId" column="meal_line_id" />
|
|
|
|
|
<result property="createBy" column="create_by" />
|
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectMenuAppRecipeVo">
|
|
|
|
|
select id, recipe_id, bind_type, bind_time, meal_line_id, create_by, create_time, update_by, update_time, remark from menu_app_recipe
|
|
|
|
|
</sql>
|
|
|
|
|
|
2025-04-05 19:12:26 +08:00
|
|
|
<select id="selectMenuAppRecipeList" parameterType="com.bonus.canteen.core.menu.domain.MenuAppRecipe" resultMap="MenuAppRecipeResult">
|
2025-04-03 15:06:05 +08:00
|
|
|
<include refid="selectMenuAppRecipeVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="recipeId != null "> and recipe_id = #{recipeId}</if>
|
|
|
|
|
<if test="bindType != null "> and bind_type = #{bindType}</if>
|
|
|
|
|
<if test="bindTime != null "> and bind_time = #{bindTime}</if>
|
|
|
|
|
<if test="mealLineId != null "> and meal_line_id = #{mealLineId}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMenuAppRecipeById" parameterType="Long" resultMap="MenuAppRecipeResult">
|
|
|
|
|
<include refid="selectMenuAppRecipeVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
2025-04-05 19:12:26 +08:00
|
|
|
<insert id="insertMenuAppRecipe" parameterType="com.bonus.canteen.core.menu.domain.MenuAppRecipe" useGeneratedKeys="true" keyProperty="id">
|
2025-04-03 15:06:05 +08:00
|
|
|
insert into menu_app_recipe
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="recipeId != null">recipe_id,</if>
|
|
|
|
|
<if test="bindType != null">bind_type,</if>
|
|
|
|
|
<if test="bindTime != null">bind_time,</if>
|
|
|
|
|
<if test="mealLineId != null">meal_line_id,</if>
|
|
|
|
|
<if test="createBy != null">create_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="remark != null">remark,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="recipeId != null">#{recipeId},</if>
|
|
|
|
|
<if test="bindType != null">#{bindType},</if>
|
|
|
|
|
<if test="bindTime != null">#{bindTime},</if>
|
|
|
|
|
<if test="mealLineId != null">#{mealLineId},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
2025-04-05 19:12:26 +08:00
|
|
|
<update id="updateMenuAppRecipe" parameterType="com.bonus.canteen.core.menu.domain.MenuAppRecipe">
|
2025-04-03 15:06:05 +08:00
|
|
|
update menu_app_recipe
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="recipeId != null">recipe_id = #{recipeId},</if>
|
|
|
|
|
<if test="bindType != null">bind_type = #{bindType},</if>
|
|
|
|
|
<if test="bindTime != null">bind_time = #{bindTime},</if>
|
|
|
|
|
<if test="mealLineId != null">meal_line_id = #{mealLineId},</if>
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteMenuAppRecipeById" parameterType="Long">
|
|
|
|
|
delete from menu_app_recipe where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteMenuAppRecipeByIds" parameterType="String">
|
|
|
|
|
delete from menu_app_recipe where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|