|
|
@@ -9,8 +9,11 @@ import com.genersoft.iot.vmp.extend.mapper.ExtendDeviceMapper;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@Service
|
|
|
public class ExtendDeviceService extends ServiceImpl<ExtendDeviceMapper, ExtendDevice> {
|
|
|
@@ -30,4 +33,16 @@ public class ExtendDeviceService extends ServiceImpl<ExtendDeviceMapper, ExtendD
|
|
|
return new PageInfo<>(rsList);
|
|
|
}
|
|
|
|
|
|
+ public Map<String,ExtendDevice> getDevices(List<String> deviceIds) {
|
|
|
+ LambdaQueryWrapper<ExtendDevice> lqw = new LambdaQueryWrapper<>();
|
|
|
+ lqw.in(ExtendDevice :: getDeviceId,deviceIds);
|
|
|
+ List<ExtendDevice> list = list(lqw);
|
|
|
+ Map<String,ExtendDevice> result = new HashMap<>();
|
|
|
+ for(ExtendDevice temp : list) {
|
|
|
+ result.put(temp.getDeviceId(),temp);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|