|
@@ -292,10 +292,10 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
BigDecimal halfWidth = width.divide(BigDecimal.valueOf(2), 10, RoundingMode.HALF_UP);
|
|
|
|
|
|
// 3. 设置默认值
|
|
|
- setIfNull(request::getXStart, () -> halfLength, request::setXStart);
|
|
|
- setIfNull(request::getXEnd, () -> halfLength, request::setXEnd);
|
|
|
- setIfNull(request::getYStart, () -> halfWidth, request::setYStart);
|
|
|
- setIfNull(request::getYEnd, () -> halfWidth, request::setYEnd);
|
|
|
+ setIfNull(request::getXxStart, () -> halfLength, request::setXxStart);
|
|
|
+ setIfNull(request::getXxEnd, () -> halfLength, request::setXxEnd);
|
|
|
+ setIfNull(request::getYyStart, () -> halfWidth, request::setYyStart);
|
|
|
+ setIfNull(request::getYyEnd, () -> halfWidth, request::setYyEnd);
|
|
|
|
|
|
|
|
|
Boolean flag = devInfoService.updateDevice(request.getClientId(), request);
|
|
@@ -337,14 +337,14 @@ public class DeviceGatewayImpl implements DeviceGateway {
|
|
|
}
|
|
|
LambdaUpdateWrapper<DevInfo> updateWrapper = Wrappers.lambdaUpdate();
|
|
|
// 仅当字段非空时才更新
|
|
|
- if (Objects.nonNull(params.getXValue())) {
|
|
|
- updateWrapper.set(DevInfo::getX, params.getXValue());
|
|
|
+ if (Objects.nonNull(params.getXxValue())) {
|
|
|
+ updateWrapper.set(DevInfo::getX, params.getXxValue());
|
|
|
}
|
|
|
- if (Objects.nonNull(params.getYValue())) {
|
|
|
- updateWrapper.set(DevInfo::getY, params.getYValue());
|
|
|
+ if (Objects.nonNull(params.getYyValue())) {
|
|
|
+ updateWrapper.set(DevInfo::getY, params.getYyValue());
|
|
|
}
|
|
|
// 如果所有字段均为空,无需更新
|
|
|
- if (params.getXValue() == null && params.getYValue() == null) {
|
|
|
+ if (params.getXxValue() == null && params.getYyValue() == null) {
|
|
|
return false;
|
|
|
}
|
|
|
|