admin管理员组文章数量:1566220
今天学习到了做一个三级联动,还要可以进行模糊查询,看了很多CSDN的文章,写的都不太清楚,对于俺这种小白极为不友好,看到这个大佬的文章,非常感谢,自己就照抄了一波 链接
SQL
CREATE TABLE `equipment` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(50) NOT NULL COMMENT '名称',
`model` varchar(50) DEFAULT NULL COMMENT '型号',
`unit_price` int(10) DEFAULT NULL COMMENT '产品单价',
`parent_id` bigint(20) DEFAULT '0' COMMENT '父设备ID',
`order_num` int(4) DEFAULT '0' COMMENT '显示排序',
`type` char(1) DEFAULT '' COMMENT '设备类型(M类型 C系列 F产品)',
`remark` varchar(500) DEFAULT '' COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8 COMMENT='备注类型管理表'
mapper.xml 就是最普通的查询所有
<select id="selectEquipmentList" parameterType="Equipment" resultMap="EquipmentResult">
<include refid="selectEquipmentVo"/>
<where>
<if test="name != null and name != ''"> and `name` like concat('%', #{name}, '%')</if>
<if test="model != null and model != ''"> and model = #{model}</if>
<if test="parentId != null and parentId != ''"> and parentId = #{parent_id}</if>
<if test="id != null and id != ''"> and id = #{id}</if>
<if test="type != null and type != ''"> and `type` = #{type}</if>
</where>
</select>
mapper.java
public List<Equipment> selectEquipmentList
本文标签: 模糊分页菜单SpringBoot
版权声明:本文标题:springboot单表三级联动模糊查询,单表三级菜单模糊搜索,分页三级联动模糊查询,树形模糊查询 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1726267479a1063406.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论