增加备注信息
This commit is contained in:
@ -25,4 +25,6 @@ public class SysRecipesDailyDishes {
|
||||
private String type;
|
||||
|
||||
private Integer isMain;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
|
@ -70,4 +70,6 @@ public interface SysDishesMapper
|
||||
public int deleteIngredientByIds(Long[] ids);
|
||||
|
||||
public int bashInsertDishesIngredent(List<SysDishesIngredient> sysDishesIngredients);
|
||||
|
||||
String getDishesMenuTypeById(Long id);
|
||||
}
|
@ -62,4 +62,6 @@ public interface ISysDishesService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysDishesById(Long id);
|
||||
|
||||
public String getDishesMenuTypeById(Long id);
|
||||
}
|
@ -124,4 +124,9 @@ public class SysDishesServiceImpl implements ISysDishesService {
|
||||
sysDishesMapper.deleteIngredientById(id);
|
||||
return sysDishesMapper.deleteSysDishesById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDishesMenuTypeById(Long id) {
|
||||
return sysDishesMapper.getDishesMenuTypeById(id);
|
||||
}
|
||||
}
|
@ -155,4 +155,8 @@
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getDishesMenuTypeById" parameterType="Long" resultType="String">
|
||||
select type from sys_dishes where id=#{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -22,6 +22,7 @@
|
||||
<result property="name" column="name"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="methods" column="methods"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="isMain" column="is_main"/>
|
||||
<result property="detail" column="detail" typeHandler="com.stdiet.custom.typehandler.ArrayJsonHandler"
|
||||
javaType="com.stdiet.custom.domain.SysDishesIngredient"/>
|
||||
@ -86,6 +87,7 @@
|
||||
<if test="dishesId != null">dishes_id = #{dishesId},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="detail != null">detail = #{detail, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -98,12 +100,14 @@
|
||||
<if test="dishesId != null">dishes_id,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="detail != null">detail,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="menuId != null">#{menuId},</if>
|
||||
<if test="dishesId != null">#{dishesId},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="detail != null">#{detail, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -138,9 +142,9 @@
|
||||
|
||||
<!-- 新增菜单对应菜品-->
|
||||
<insert id="bashAddDishes" >
|
||||
insert into sys_customer_menu_dishes (menu_id, type, dishes_id, detail) values
|
||||
insert into sys_customer_menu_dishes (menu_id, type, dishes_id, remark, detail) values
|
||||
<foreach collection="list" separator="," item="item" index="index">
|
||||
(#{item.menuId}, #{item.type}, #{item.dishesId}, #{item.detail, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler})
|
||||
(#{item.menuId}, #{item.type}, #{item.dishesId}, #{remark}, #{item.detail, jdbcType=OTHER, typeHandler=com.stdiet.custom.typehandler.ArrayJsonHandler})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
Reference in New Issue
Block a user