zhaoSecond

This commit is contained in:
redamancy-qian
2022-04-14 23:38:46 +08:00
parent 217f2d2773
commit 1a5df34c4f
18 changed files with 463 additions and 108 deletions

View File

@@ -66,9 +66,9 @@ public class DeviceController extends BaseController
@PreAuthorize("@ss.hasPermi('iot:device:list')")
@GetMapping("/all")
@ApiOperation("查询所有设备简短列表")
public TableDataInfo allShortList()
public TableDataInfo allShortList(Device device)
{
List<DeviceAllShortOutput> list = deviceService.selectAllDeviceShortList();
List<DeviceAllShortOutput> list = deviceService.selectAllDeviceShortList1(device.getUserName());
return getDataTable(list);
}

View File

@@ -161,4 +161,6 @@ public interface DeviceMapper
* @return
*/
public int deleteDeviceGroupByDeviceIds(Long[] deviceIds);
// 查询简短设备列表
List<DeviceAllShortOutput> selectAllDeviceShortList1(String userName);
}

View File

@@ -151,4 +151,7 @@ public interface IDeviceService
* @return 结果
*/
public String generationDeviceNum();
// 获取所有简短设备列表
List<DeviceAllShortOutput> selectAllDeviceShortList1(String userName);
}

View File

@@ -534,6 +534,12 @@ public class DeviceServiceImpl implements IDeviceService {
return "";
}
@Override
public List<DeviceAllShortOutput> selectAllDeviceShortList1(String userName) {
return deviceMapper.selectAllDeviceShortList1(userName);
}
/**
*
* @param device 设备

View File

@@ -105,6 +105,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select device_id, device_name,product_id, serial_number, status,is_shadow ,is_custom_location,things_model_value, active_time from iot_device
</sql>
<select id="selectAllDeviceShortList1" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceAllShortResult">
select device_id, device_name, product_name, user_name, serial_number, firmware_version, status,rssi,is_shadow ,
is_custom_location, active_time,network_address,longitude,latitude from iot_device
<where>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
</where>
</select>
<select id="selectDeviceList" parameterType="com.ruoyi.iot.domain.Device" resultMap="DeviceResult">
<include refid="selectDeviceVo"/>
<where>

View File

@@ -30,8 +30,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="tenantName != null and tenantName != ''"> and tenant_name like concat('%', #{tenantName}, '%')</if>
<if test="isSys != null "> and is_sys = #{isSys}</if>
<if test="isSys == null "> and is_sys = 1</if>
</where>
order by create_time desc
order by create_time desc
</select>
<select id="selectFirmwareByFirmwareId" parameterType="Long" resultMap="FirmwareResult">