Commit 2d2e62a56399dcdf9595d3fdc814b75285e9fdc5
1 parent
e3975088
1.一阶段
Showing
1 changed file
with
3 additions
and
0 deletions
src/main/java/com/bsth/service/impl/LsStationRouteServiceImpl.java
| ... | ... | @@ -124,6 +124,9 @@ public class LsStationRouteServiceImpl extends BaseServiceImpl<LsStationRoute, I |
| 124 | 124 | public Map<String, Object> modify(LsStationRoute stationRoute) { |
| 125 | 125 | LsStationRoute stationRoute1 = lsStationRouteRepository.findById(stationRoute.getId()).get(); |
| 126 | 126 | Integer versions = lineVersionsRepository.findCurrentVersion(stationRoute1.getLine().getId()); |
| 127 | + if (stationRoute1.getVersions() < versions) { | |
| 128 | + throw new IllegalArgumentException("历史版本不可变更"); | |
| 129 | + } | |
| 127 | 130 | |
| 128 | 131 | // 多边形缓冲区 |
| 129 | 132 | if ("d".equals(stationRoute.getShapedType())) { | ... | ... |