原料导航树参与搜索

This commit is contained in:
sxu 2025-04-17 18:15:25 +08:00
parent eafc296fcb
commit a4bae07dea
2 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,8 @@ import lombok.Data;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
import java.util.List;
/**
* 商家食材原料信息对象 menu_material
*
@ -75,6 +77,11 @@ public class MenuMaterial extends BaseEntity {
@ApiModelProperty(value = "类别id")
private Long categoryId;
/** 类别ids */
@Excel(name = "类别ids")
@ApiModelProperty(value = "类别ids")
private List categoryIdList;
@Excel(name = "类别名称")
@ApiModelProperty(value = "类别名称")
private String categoryName;

View File

@ -90,6 +90,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialName != null and materialName != ''"> and mm.material_name like concat('%', #{materialName}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and mm.material_code like concat('%', #{materialCode}, '%')</if>
<if test="barCode != null"> and mm.bar_code like concat('%', #{barCode}, '%')</if>
<if test="categoryIdList != null and categoryIdList.size() > 0">
and mm.category_id in
<foreach item="item" collection="categoryIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>