菜品添加及搜索 fix

This commit is contained in:
sxu 2025-04-18 17:14:51 +08:00
parent 610999008c
commit 2c31f59d84
3 changed files with 24 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@TableName("menu_dishes")
@ApiModel("菜品信息")
@ -44,6 +45,9 @@ public class MenuDishes extends Model<MenuDishes> {
@ApiModelProperty("菜品类型ID")
private Long typeId;
@ApiModelProperty("菜品类型ID List")
private List typeIdList;
@ApiModelProperty("菜品类型名称")
private String typeName;
@ -258,6 +262,14 @@ public class MenuDishes extends Model<MenuDishes> {
return this.typeId;
}
public List getTypeIdList() {
return typeIdList;
}
public void setTypeIdList(List typeIdList) {
this.typeIdList = typeIdList;
}
public Long getCookId() {
return this.cookId;
}

View File

@ -104,7 +104,10 @@ public class MenuDishesDTO {
@ApiModelProperty("灶类")
private Integer cookId;
@ApiModelProperty("菜品分类")
@ApiModelProperty("菜品类型ID")
private Long typeId;
@ApiModelProperty("菜品分类id(自定义)")
private Integer classifyId;
@ApiModelProperty("标签id")

View File

@ -98,6 +98,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="shopstallId != null "> and b.shopstall_id = #{shopstallId}</if>
<if test="areaId != null "> and b.area_id = #{areaId}</if>
<if test="typeId != null "> and b.type_id = #{typeId}</if>
<if test="typeIdList != null and typeIdList.size() > 0">
and b.type_id in
<foreach item="id" collection="typeIdList" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</where>
</select>
@ -403,7 +409,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classifyId != null">classify_id,</if>
<if test="createBy != null">create_by,</if>
<if test="customId != null">custom_id,</if>
<if test="typeId != null">type_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dishesId != null">#{dishesId},</if>
@ -426,6 +432,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="classifyId != null">#{classifyId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="customId != null">#{customId},</if>
<if test="typeId != null">#{typeId},</if>
</trim>
</insert>