删除菜谱
This commit is contained in:
parent
a63c4aac32
commit
e706c925c9
|
|
@ -39,11 +39,17 @@ public class CookRecipe extends BaseEntity {
|
||||||
@ApiModelProperty(value = "档口id")
|
@ApiModelProperty(value = "档口id")
|
||||||
private Long stallId;
|
private Long stallId;
|
||||||
|
|
||||||
|
private String stallName;
|
||||||
|
|
||||||
/** 食堂id */
|
/** 食堂id */
|
||||||
@Excel(name = "食堂id")
|
@Excel(name = "食堂id")
|
||||||
@ApiModelProperty(value = "食堂id")
|
@ApiModelProperty(value = "食堂id")
|
||||||
private Long canteenId;
|
private Long canteenId;
|
||||||
|
|
||||||
|
private String canteenName;
|
||||||
|
|
||||||
|
private String areaName;
|
||||||
|
|
||||||
/** 菜品计划id(数据同步) */
|
/** 菜品计划id(数据同步) */
|
||||||
@Excel(name = "菜品计划id(数据同步)")
|
@Excel(name = "菜品计划id(数据同步)")
|
||||||
@ApiModelProperty(value = "菜品计划id(数据同步)")
|
@ApiModelProperty(value = "菜品计划id(数据同步)")
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="recipeName" column="recipe_name" />
|
<result property="recipeName" column="recipe_name" />
|
||||||
<result property="recipeType" column="recipe_type" />
|
<result property="recipeType" column="recipe_type" />
|
||||||
<result property="stallId" column="stall_id" />
|
<result property="stallId" column="stall_id" />
|
||||||
|
<result property="stallName" column="stall_name" />
|
||||||
<result property="canteenId" column="canteen_id" />
|
<result property="canteenId" column="canteen_id" />
|
||||||
|
<result property="canteenName" column="canteen_name" />
|
||||||
|
<result property="areaName" column="area_name" />
|
||||||
<result property="planId" column="plan_id" />
|
<result property="planId" column="plan_id" />
|
||||||
<result property="effectDate" column="effect_date" />
|
<result property="effectDate" column="effect_date" />
|
||||||
<result property="expireDate" column="expire_date" />
|
<result property="expireDate" column="expire_date" />
|
||||||
|
|
@ -19,32 +22,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectCookRecipeVo">
|
<sql id="selectCookRecipeVo">
|
||||||
select recipe_id, recipe_name, recipe_type, stall_id, canteen_id, plan_id, effect_date,
|
select cr.recipe_id, cr.recipe_name, cr.recipe_type, cr.stall_id, cr.canteen_id, cr.plan_id, cr.effect_date,
|
||||||
expire_date, create_by, create_time, update_by, update_time
|
cr.expire_date, cr.create_by, cr.create_time, cr.update_by, cr.update_time,
|
||||||
from cook_recipe
|
bs.stall_name, bc.canteen_name, ba.area_name
|
||||||
|
from cook_recipe cr
|
||||||
|
left join basic_stall bs on bs.stall_id = cr.stall_id
|
||||||
|
left join basic_canteen bc on bc.canteen_id = bs.canteen_id
|
||||||
|
left join basic_area ba on ba.area_id = bc.area_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectCookRecipeList" parameterType="com.bonus.canteen.core.cook.domain.CookRecipe" resultMap="CookRecipeResult">
|
<select id="selectCookRecipeList" parameterType="com.bonus.canteen.core.cook.domain.CookRecipe" resultMap="CookRecipeResult">
|
||||||
<include refid="selectCookRecipeVo"/>
|
<include refid="selectCookRecipeVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="recipeName != null and recipeName != ''"> and recipe_name like concat('%', #{recipeName}, '%')</if>
|
<if test="recipeName != null and recipeName != ''"> and cr.recipe_name like concat('%', #{recipeName}, '%')</if>
|
||||||
<if test="recipeType != null "> and recipe_type = #{recipeType}</if>
|
<if test="recipeType != null "> and cr.recipe_type = #{recipeType}</if>
|
||||||
<if test="stallId != null "> and stall_id = #{stallId}</if>
|
<if test="stallId != null "> and cr.stall_id = #{stallId}</if>
|
||||||
<if test="canteenId != null "> and canteen_id = #{canteenId}</if>
|
<if test="canteenId != null "> and cr.canteen_id = #{canteenId}</if>
|
||||||
<if test="planId != null and planId != ''"> and plan_id = #{planId}</if>
|
<if test="planId != null and planId != ''"> and cr.plan_id = #{planId}</if>
|
||||||
<if test="effectDate != null "> and effect_date = #{effectDate}</if>
|
<if test="effectDate != null "> and cr.effect_date = #{effectDate}</if>
|
||||||
<if test="expireDate != null "> and expire_date = #{expireDate}</if>
|
<if test="expireDate != null "> and cr.expire_date = #{expireDate}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCookRecipeByRecipeId" parameterType="Long" resultMap="CookRecipeResult">
|
<select id="selectCookRecipeByRecipeId" parameterType="Long" resultMap="CookRecipeResult">
|
||||||
<include refid="selectCookRecipeVo"/>
|
<include refid="selectCookRecipeVo"/>
|
||||||
where recipe_id = #{recipeId}
|
where cr.recipe_id = #{recipeId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectCookRecipeByRecipeName" parameterType="String" resultMap="CookRecipeResult">
|
<select id="selectCookRecipeByRecipeName" parameterType="String" resultMap="CookRecipeResult">
|
||||||
<include refid="selectCookRecipeVo"/>
|
<include refid="selectCookRecipeVo"/>
|
||||||
where recipe_name = #{recipeName}
|
where cr.recipe_name = #{recipeName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertCookRecipe" parameterType="com.bonus.canteen.core.cook.domain.CookRecipe" useGeneratedKeys="true" keyProperty="recipeId">
|
<insert id="insertCookRecipe" parameterType="com.bonus.canteen.core.cook.domain.CookRecipe" useGeneratedKeys="true" keyProperty="recipeId">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue