吉安感知网项目-后端
linwei
2026-05-22 9bccc1f1454f934f83a2e0d3b5583b3dbe7fc4f0
fix(device): 修复设备查询中子序列号为空的过滤问题

- 在查询条件中添加 child_sn 不为 null 的过滤条件
- 添加 child_sn 去除空白字符后不为空的验证条件
- 确保只有有效的子序列号设备才会被查询返回
1 files modified
2 ■■■■■ changed files
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml 2 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/mapper/GdManageDeviceMapper.xml
@@ -74,6 +74,8 @@
        and d2.device_type = '0'
        <where>
             md.is_deleted = 0
            AND md.child_sn IS NOT NULL
            AND trim(md.child_sn) != ''
            <if test="deviceIds != null and deviceIds.size() > 0">
                and md.id::text in
                <foreach item="item" collection="deviceIds" index="index" open="(" close=")" separator=",">