仿真公共接口添加初始化接口

This commit is contained in:
walker-sheng 2021-04-23 14:38:36 +08:00
parent 8912639885
commit 0f64c9b2c3

View File

@ -38,6 +38,12 @@ public class SimulationCommonController {
this.simulationManager.start(id); this.simulationManager.start(id);
} }
@PutMapping("/{id}/init")
public void init(@PathVariable String id) {
this.simulationManager.init(id);
}
@PutMapping("/{id}/updateSpeed/{speed}") @PutMapping("/{id}/updateSpeed/{speed}")
public void updateSpeed(@PathVariable String id, @PathVariable int speed) { public void updateSpeed(@PathVariable String id, @PathVariable int speed) {
this.simulationManager.updateSpeed(id, speed); this.simulationManager.updateSpeed(id, speed);