增加备注信息

This commit is contained in:
huangdeliang
2021-03-06 18:17:25 +08:00
parent 01f5c98954
commit f217adec10
11 changed files with 320 additions and 136 deletions

View File

@ -25,4 +25,6 @@ public class SysRecipesDailyDishes {
private String type;
private Integer isMain;
private String remark;
}

View File

@ -70,4 +70,6 @@ public interface SysDishesMapper
public int deleteIngredientByIds(Long[] ids);
public int bashInsertDishesIngredent(List<SysDishesIngredient> sysDishesIngredients);
String getDishesMenuTypeById(Long id);
}

View File

@ -62,4 +62,6 @@ public interface ISysDishesService
* @return 结果
*/
public int deleteSysDishesById(Long id);
public String getDishesMenuTypeById(Long id);
}

View File

@ -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);
}
}

View File

@ -155,4 +155,8 @@
</foreach>
</insert>
<select id="getDishesMenuTypeById" parameterType="Long" resultType="String">
select type from sys_dishes where id=#{id}
</select>
</mapper>

View File

@ -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>