feat(device): add device type options endpoint
- Added new GET /options endpoint to retrieve device type options - Implemented getDeviceTypeOptions method in DeviceTypeController - Updated DeviceTypeServiceImpl to map device types to OptionResponse - Removed unused LambdaQueryWrapper and todo comment - Added Java documentation for the new endpoint
This commit is contained in:
@@ -28,12 +28,11 @@ public class DeviceTypeServiceImpl extends ServiceImpl<DriveTypeMapper, DeviceTy
|
||||
@Override
|
||||
public List<OptionResponse> getDeviceTypeOptions() {
|
||||
LambdaQueryWrapper<DeviceType> wrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
return this.lambdaQuery()
|
||||
.select(DeviceType::getId, DeviceType::getName)
|
||||
//todo
|
||||
|
||||
;
|
||||
.list()
|
||||
.stream()
|
||||
.map(deviceType -> new OptionResponse(deviceType.getName(), deviceType.getId().toString()))
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user