diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java index bce08324..7bfcc186 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java @@ -70,4 +70,7 @@ public class DeviceQuery extends Device { @ApiModelProperty("是否过期") private Boolean isArrears; + + @ApiModelProperty("MAC列表") + private List macList; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.java index f3cd7c2a..66a4d42e 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.java @@ -167,7 +167,7 @@ public interface DeviceMapper /** * 获取所有MAC */ - List selectAllMac(); + List selectMacList(DeviceQuery query); /** * 查询一个 diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml index d3826d45..fac9b934 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml @@ -73,6 +73,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item} + + and sd.mac in + + #{item} + + and sd.deleted = false and sd.deleted = #{deleted} @@ -225,10 +231,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where sd.device_no = #{deviceNo} and sd.deleted = false - + select distinct sd.mac from sm_device sd - where sd.deleted = false + + +