|
@@ -358,11 +358,11 @@ public class HhOmcDeviceServiceImpl implements HhOmcDeviceService {
|
|
|
|
|
|
@Override
|
|
|
public RestResult<HhOmcDeviceVo> queryConfig(TenantDto dto) {
|
|
|
- List<HhOmcDevice> devices = hhOmcDeviceMapper.selectList(Wrappers.lambdaQuery(HhOmcDevice.class).eq(HhOmcDevice::getStatus, Boolean.TRUE).eq(HhOmcDevice::getSn, dto.getSn()).eq(HhOmcDevice::getIsDeleted, Boolean.FALSE));
|
|
|
- if (devices == null || devices.size() == 0) {
|
|
|
+ HhOmcDevice device = hhOmcDeviceMapper.selectOne(Wrappers.lambdaQuery(HhOmcDevice.class).eq(HhOmcDevice::getStatus, Boolean.TRUE).eq(HhOmcDevice::getSn, dto.getSn()).eq(HhOmcDevice::getIsDeleted, Boolean.FALSE));
|
|
|
+ if (device == null) {
|
|
|
return RestResult.error("设备商户平台未授权");
|
|
|
}
|
|
|
- HhOmcDeviceVo vo = BeanUtil.copyProperties(devices, HhOmcDeviceVo.class);
|
|
|
+ HhOmcDeviceVo vo = BeanUtil.copyProperties(device, HhOmcDeviceVo.class);
|
|
|
return RestResult.ok(vo != null ? completeOthers(vo) : null);
|
|
|
}
|
|
|
|