@@ -37,6 +37,11 @@ public class DeviceApiImpl implements DeviceApi {
return null;
}
+ @Override
+ public DevicesVo queryDevice(Long id) {
+ return iotDeviceService.query(id);
+ }
+
@Override
public List<DevicesVo> devicesQuery(DevicesNameVo devicesNameVo) {
return iotDeviceService.devicesQuery(devicesNameVo);
@@ -69,4 +69,5 @@ public interface IotDeviceMapper extends BaseMapper<IotDevice> {
List<DevicesVo> devicesQuery(DevicesNameVo devicesNameVo);
+ DevicesVo queryDevice(@Param("id") Long id);
@@ -336,6 +336,7 @@ public class IotDeviceService {
/**
* 根据设备名字模糊筛选
+ *
* @author Aick Spt
* @date 2024-05-07 17:03
*/
@@ -344,4 +345,7 @@ public class IotDeviceService {
+ public DevicesVo query(Long id) {
+ return iotDeviceMapper.queryDevice(id);
@@ -177,6 +177,17 @@
and id.del_flag = 0
</where>
</select>
+ <select id="queryDevice" resultType="com.middle.platform.manage.api.pojo.DevicesVo">
+ select id.id,
+ id.name
+ from iot_device id
+ <where>
+ <if test="id != null">
+ and id.id = #{id,jdbcType=BIGINT}
+ </if>
+ and id.del_flag = 0
+ </where>
+ </select>
<select id="deviceCache" resultType="com.middle.platform.manage.api.pojo.DeviceVo">
select id.id,