修改删除台站信息的参数
This commit is contained in:
parent
c2204b21bf
commit
9a2cabb0c1
|
|
@ -50,7 +50,7 @@ public class GardsStationsController {
|
|||
*/
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除台站信息")
|
||||
public Result<?> deleteById(@RequestParam Integer stationId) {
|
||||
public Result<?> deleteById(@RequestParam(required = false) Integer stationId) {
|
||||
gardsStationsService.deleteById(stationId);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,13 @@ public class GardsStationsServiceImpl extends ServiceImpl<GardsStationsMapper, G
|
|||
@Override
|
||||
@Transactional(rollbackFor = RuntimeException.class)
|
||||
public void deleteById(Integer stationId) {
|
||||
try {
|
||||
this.removeById(stationId);
|
||||
} catch (RuntimeException e) {
|
||||
throw new RuntimeException("");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user