diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index 9e1a89f..79997f8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -91,7 +91,8 @@ public class StationServiceImpl extends BaseServiceImpl sort = Optional.ofNullable(this.getStationMaxOrder()); req.setSort(sort.isPresent() ? sort.get() + 1 : 1); - Assert.isTrue(this.saveOrUpdate(req), () -> { + boolean updateResult = this.saveOrUpdate(req); + Assert.isTrue(updateResult, () -> { throw new ServiceException("创建/修改站点信息失败!"); }); this.pushStation(req); @@ -229,32 +230,32 @@ public class StationServiceImpl extends BaseServiceImpllambdaUpdate() - .set(StationEntity::getCode, req.getCode()) - .set(StationEntity::getName, req.getName()) - .set(StationEntity::getType, req.getType()) - .set(StationEntity::getCommissionTime, req.getCommissionTime()) - .set(StationEntity::getEnableControl, req.getEnableControl()) - .set(StationEntity::getLgtd, req.getLgtd()) - .set(StationEntity::getLttd, req.getLttd()) - .set(StationEntity::getRefDept, req.getRefDept()) - .set(StationEntity::getAreaCode, req.getAreaCode()) - .set(StationEntity::getRefDomain, req.getRefDomain()) - .set(StationEntity::getRefBasin, req.getRefBasin()) - .set(StationEntity::getRefArea, req.getRefArea()) - .set(StationEntity::getRemark, req.getRemark()) - .set(StationEntity::getPic, req.getPic()) - .set(StationEntity::getContact, req.getContact()) - .set(StationEntity::getContactor, req.getContactor()) - .set(StationEntity::getAddress, req.getAddress()) - .set(StationEntity::getCompany, req.getCompany()) - .set(StationEntity::getCreateDept, req.getCreateDept()) - .set(StationEntity::getServeType, req.getServeType()) - .set(StationEntity::getLimitWaterLevel, req.getLimitWaterLevel()) - .eq(StationEntity::getId, req.getId())); - } +// @Override +// public boolean updateById(StationEntity req) { +// return super.update(Wrappers.lambdaUpdate() +// .set(StationEntity::getCode, req.getCode()) +// .set(StationEntity::getName, req.getName()) +// .set(StationEntity::getType, req.getType()) +// .set(StationEntity::getCommissionTime, req.getCommissionTime()) +// .set(StationEntity::getEnableControl, req.getEnableControl()) +// .set(StationEntity::getLgtd, req.getLgtd()) +// .set(StationEntity::getLttd, req.getLttd()) +// .set(StationEntity::getRefDept, req.getRefDept()) +// .set(StationEntity::getAreaCode, req.getAreaCode()) +// .set(StationEntity::getRefDomain, req.getRefDomain()) +// .set(StationEntity::getRefBasin, req.getRefBasin()) +// .set(StationEntity::getRefArea, req.getRefArea()) +// .set(StationEntity::getRemark, req.getRemark()) +// .set(StationEntity::getPic, req.getPic()) +// .set(StationEntity::getContact, req.getContact()) +// .set(StationEntity::getContactor, req.getContactor()) +// .set(StationEntity::getAddress, req.getAddress()) +// .set(StationEntity::getCompany, req.getCompany()) +// .set(StationEntity::getCreateDept, req.getCreateDept()) +// .set(StationEntity::getServeType, req.getServeType()) +// .set(StationEntity::getLimitWaterLevel, req.getLimitWaterLevel()) +// .eq(StationEntity::getId, req.getId())); +// } @Override