查询设备分组列表
This commit is contained in:
@ -1,7 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuyuanshen.equipment.mapper.DeviceGroupMapper">
|
||||
|
||||
<!-- 查询顶级分组 -->
|
||||
<select id="selectRootGroups" resultType="DeviceGroup">
|
||||
SELECT * FROM device_group
|
||||
WHERE parent_id IS NULL
|
||||
<if test="bo.groupName != null and bo.groupName != ''">
|
||||
AND group_name LIKE CONCAT('%', #{bo.groupName}, '%')
|
||||
</if>
|
||||
<if test="bo.status != null">
|
||||
AND status = #{bo.status}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据父ID查询子分组 -->
|
||||
<select id="selectByParentId" resultType="DeviceGroup">
|
||||
SELECT *
|
||||
FROM device_group
|
||||
WHERE parent_id = #{parentId}
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user