You've already forked FrameTour-BE
feat(ExtraDevice): 添加外部设备管理功能
- 创建了 ExtraDeviceController 提供分页查询外部设备列表的API接口 - 新增 ExtraDeviceService 和 ExtraDeviceServiceImpl 实现设备查询逻辑 - 添加 ExtraDevicePageQueryReq 和 ExtraDeviceRespVO 请求响应数据模型 - 扩展 ExtraDeviceMapper 支持分页查询外部设备列表 - 实现景区名称填充和设备在线状态判断功能 - 集成 Redis 获取设备心跳时间判断在线状态 - 添加了完整的参数校验和异常处理机制
This commit is contained in:
@@ -4,8 +4,24 @@
|
||||
<select id="listExtraDeviceByScenicId" resultType="com.ycwl.basic.model.pc.device.resp.DeviceRespVO">
|
||||
select d.id, d.ident as no, d.scenic_id, d.name, d.status
|
||||
from extra_device d
|
||||
|
||||
|
||||
where d.scenic_id = #{scenicId}
|
||||
and d.status = 1
|
||||
</select>
|
||||
|
||||
<select id="pageQuery" resultType="com.ycwl.basic.model.pc.extraDevice.resp.ExtraDeviceRespVO">
|
||||
select
|
||||
d.id,
|
||||
d.scenic_id as scenicId,
|
||||
d.name,
|
||||
d.ident,
|
||||
d.status
|
||||
from extra_device d
|
||||
<where>
|
||||
<if test="scenicId != null">
|
||||
and d.scenic_id = #{scenicId}
|
||||
</if>
|
||||
</where>
|
||||
order by d.id desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user