Commit bf60002b by hayden

后台管理系统设备管理-设备操作日志:新增筛选条件门店、房间

parent 37bbd868
...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController; ...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult; import share.common.core.domain.AjaxResult;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.system.domain.DeviceLog; import share.system.domain.DeviceLog;
import share.system.domain.DeviceLogDto;
import share.system.service.DeviceLogService; import share.system.service.DeviceLogService;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
...@@ -39,7 +40,7 @@ public class DeviceLogController extends BaseController ...@@ -39,7 +40,7 @@ public class DeviceLogController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('system:log:list')") @PreAuthorize("@ss.hasPermi('system:log:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(DeviceLog deviceLog) public TableDataInfo list(DeviceLogDto deviceLog)
{ {
startPage(); startPage();
List<DeviceLog> list = deviceLogService.selectDeviceLogList(deviceLog); List<DeviceLog> list = deviceLogService.selectDeviceLogList(deviceLog);
......
package share.system.domain;
import lombok.Data;
/**
* @author lichenghu
* @date 2024/1/25
*/
@Data
public class DeviceLogDto extends DeviceLog {
/**
* 门店id
*/
private Long storeId;
/**
* 房间id
*/
private Long roomId;
}
...@@ -28,15 +28,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,15 +28,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult"> <select id="selectDeviceLogList" parameterType="DeviceLog" resultMap="DeviceLogResult">
<include refid="selectDeviceLogVo"/> select
<where> t1.id,
<if test="devMac != null and devMac != ''"> and dev_mac = #{devMac}</if> t1.dev_mac,
<if test="devId != null and devId != ''"> and dev_id = #{devId}</if> t1.dev_id,
<if test="seq != null and seq != ''"> and seq = #{seq}</if> t1.seq,
<if test="mqttType != null and mqttType != ''"> and mqtt_type = #{mqttType}</if> t1.mqtt_type,
<if test="mqttDescribe != null and mqttDescribe != ''"> and mqtt_describe = #{mqttDescribe}</if> t1.mqtt_describe,
<if test="payload != null and payload != ''"> and payload = #{payload}</if> t1.payload,
<if test="topic != null and topic != ''"> and topic = #{topic}</if> t1.topic,
t1.create_by,
t1.create_time,
t1.update_by,
t1.update_time,
t1.remark,
t1.`result`,
t1.description
from s_device_log t1
join s_device t2 on t1.dev_id = t2.dev_id
join s_room t3 on t2.room_id = t3.id
join s_store t4 on t3.store_id = t4.id
<where>
<if test="devMac != null and devMac != ''">and t1.dev_mac = #{devMac}</if>
<if test="devId != null and devId != ''">and t1.dev_id = #{devId}</if>
<if test="seq != null and seq != ''">and t1.seq = #{seq}</if>
<if test="mqttType != null and mqttType != ''">and t1.mqtt_type = #{mqttType}</if>
<if test="mqttDescribe != null and mqttDescribe != ''">and t1.mqtt_describe = #{mqttDescribe}</if>
<if test="payload != null and payload != ''">and t1.payload = #{payload}</if>
<if test="topic != null and topic != ''">and t1.topic = #{topic}</if>
<if test="storeId != null">and t4.id = #{storeId}</if>
<if test="roomId != null">and t3.id = #{roomId}</if>
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment