From 5284c604f74411cc60dda539484402ffb537a48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Tue, 10 Sep 2024 09:19:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E8=AE=BE=E5=A4=87MAC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/ss/device/domain/DeviceQuery.java | 3 +++ .../com/ruoyi/ss/device/mapper/DeviceMapper.java | 2 +- .../com/ruoyi/ss/device/mapper/DeviceMapper.xml | 14 +++++++++++--- .../com/ruoyi/ss/device/service/DeviceService.java | 3 ++- .../ss/device/service/impl/DeviceServiceImpl.java | 4 ++-- .../web/controller/app/AppDeviceController.java | 11 ++++++++++- 6 files changed, 29 insertions(+), 8 deletions(-) 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 + + +