|
@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
|
|
|
import javax.annotation.Nullable;
|
|
import javax.annotation.Nullable;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
|
+import java.util.Collection;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
|
@@ -77,6 +78,12 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
|
|
|
.geIfPresent(IotDeviceDO::getCreateTime, createTime));
|
|
.geIfPresent(IotDeviceDO::getCreateTime, createTime));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ default List<IotDeviceDO> selectByProductKeyAndDeviceNames(String productKey, Collection<String> deviceNames) {
|
|
|
|
|
+ return selectList(new LambdaQueryWrapperX<IotDeviceDO>()
|
|
|
|
|
+ .eq(IotDeviceDO::getProductKey, productKey)
|
|
|
|
|
+ .in(IotDeviceDO::getDeviceName, deviceNames));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 查询指定产品下各状态的设备数量
|
|
* 查询指定产品下各状态的设备数量
|
|
|
*
|
|
*
|
|
@@ -93,4 +100,4 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
|
|
|
*/
|
|
*/
|
|
|
List<Map<String, Object>> selectDeviceCountGroupByState();
|
|
List<Map<String, Object>> selectDeviceCountGroupByState();
|
|
|
|
|
|
|
|
-}
|
|
|
|
|
|
|
+}
|