| @@ -35,6 +35,12 @@ public class ActiveLearnInsController extends BaseController { | |||||
| return genericsSuccess(this.activeLearnInsService.insert(activeLearnIns)); | return genericsSuccess(this.activeLearnInsService.insert(activeLearnIns)); | ||||
| } | } | ||||
| @PutMapping | |||||
| @ApiOperation("编辑实验实例") | |||||
| public GenericsAjaxResult<ActiveLearnIns> update(@RequestBody ActiveLearnIns activeLearnIns) { | |||||
| return genericsSuccess(this.activeLearnInsService.update(activeLearnIns)); | |||||
| } | |||||
| @DeleteMapping("{id}") | @DeleteMapping("{id}") | ||||
| @ApiOperation("删除实验实例") | @ApiOperation("删除实验实例") | ||||
| public GenericsAjaxResult<String> deleteById(@PathVariable("id") Long id) { | public GenericsAjaxResult<String> deleteById(@PathVariable("id") Long id) { | ||||
| @@ -34,6 +34,12 @@ public class MachineLearnInsController extends BaseController { | |||||
| return genericsSuccess(this.machineLearnInsService.insert(machineLearnIns)); | return genericsSuccess(this.machineLearnInsService.insert(machineLearnIns)); | ||||
| } | } | ||||
| @PutMapping | |||||
| @ApiOperation("编辑实验实例") | |||||
| public GenericsAjaxResult<MachineLearnIns> edit(@RequestBody MachineLearnIns machineLearnIns){ | |||||
| return genericsSuccess(this.machineLearnInsService.update(machineLearnIns)); | |||||
| } | |||||
| @DeleteMapping("{id}") | @DeleteMapping("{id}") | ||||
| @ApiOperation("删除实验实例") | @ApiOperation("删除实验实例") | ||||
| public GenericsAjaxResult<String> deleteById(@PathVariable("id") Long id) { | public GenericsAjaxResult<String> deleteById(@PathVariable("id") Long id) { | ||||
| @@ -35,6 +35,12 @@ public class RayInsController extends BaseController { | |||||
| return genericsSuccess(this.rayInsService.insert(rayIns)); | return genericsSuccess(this.rayInsService.insert(rayIns)); | ||||
| } | } | ||||
| @PutMapping | |||||
| @ApiOperation("编辑实验实例") | |||||
| public GenericsAjaxResult update(@RequestBody RayIns rayIns) { | |||||
| return genericsSuccess(this.rayInsService.update(rayIns)); | |||||
| } | |||||
| @DeleteMapping("{id}") | @DeleteMapping("{id}") | ||||
| @ApiOperation("删除实验实例") | @ApiOperation("删除实验实例") | ||||
| public GenericsAjaxResult<String> deleteById(@PathVariable("id") Long id) { | public GenericsAjaxResult<String> deleteById(@PathVariable("id") Long id) { | ||||
| @@ -13,6 +13,8 @@ public interface ActiveLearnInsService { | |||||
| ActiveLearnIns insert(ActiveLearnIns activeLearnIns); | ActiveLearnIns insert(ActiveLearnIns activeLearnIns); | ||||
| ActiveLearnIns update(ActiveLearnIns activeLearnIns); | |||||
| String deleteById(Long id); | String deleteById(Long id); | ||||
| String batchDelete(List<Long> ids); | String batchDelete(List<Long> ids); | ||||
| @@ -12,6 +12,8 @@ public interface MachineLearnInsService { | |||||
| MachineLearnIns insert(MachineLearnIns machineLearnIns); | MachineLearnIns insert(MachineLearnIns machineLearnIns); | ||||
| MachineLearnIns update(MachineLearnIns machineLearnIns); | |||||
| String removeById(Long id); | String removeById(Long id); | ||||
| String batchDelete(List<Long> ids); | String batchDelete(List<Long> ids); | ||||
| @@ -10,6 +10,8 @@ public interface RayInsService { | |||||
| RayIns insert(RayIns rayIns); | RayIns insert(RayIns rayIns); | ||||
| RayIns update(RayIns rayIns); | |||||
| String deleteById(Long id); | String deleteById(Long id); | ||||
| String batchDelete(List<Long> ids); | String batchDelete(List<Long> ids); | ||||
| @@ -62,6 +62,14 @@ public class ActiveLearnInsServiceImpl implements ActiveLearnInsService { | |||||
| return activeLearnIns; | return activeLearnIns; | ||||
| } | } | ||||
| @Override | |||||
| public ActiveLearnIns update(ActiveLearnIns activeLearnIns) { | |||||
| activeLearnIns.setUpdateTime(new Date()); | |||||
| activeLearnInsDao.update(activeLearnIns); | |||||
| updateActiveLearnStatus(activeLearnIns.getActiveLearnId()); | |||||
| return activeLearnIns; | |||||
| } | |||||
| @Override | @Override | ||||
| @Transactional | @Transactional | ||||
| public String deleteById(Long id) { | public String deleteById(Long id) { | ||||
| @@ -207,7 +207,7 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { | |||||
| experimentIns.setUpdateTime(new Date()); | experimentIns.setUpdateTime(new Date()); | ||||
| this.experimentInsDao.update(experimentIns); | this.experimentInsDao.update(experimentIns); | ||||
| updateExperimentStatus(experimentIns.getExperimentId()); | updateExperimentStatus(experimentIns.getExperimentId()); | ||||
| return this.queryById(experimentIns.getId()); | |||||
| return experimentIns; | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -58,6 +58,14 @@ public class MachineLearnInsServiceImpl implements MachineLearnInsService { | |||||
| return machineLearnIns; | return machineLearnIns; | ||||
| } | } | ||||
| @Override | |||||
| public MachineLearnIns update(MachineLearnIns machineLearnIns) { | |||||
| machineLearnIns.setUpdateTime(new Date()); | |||||
| machineLearnInsDao.update(machineLearnIns); | |||||
| updateMLStatus(machineLearnIns.getMachineLearnId()); | |||||
| return machineLearnIns; | |||||
| } | |||||
| @Override | @Override | ||||
| @Transactional | @Transactional | ||||
| public String removeById(Long id) { | public String removeById(Long id) { | ||||
| @@ -70,6 +70,14 @@ public class RayInsServiceImpl implements RayInsService { | |||||
| return rayIns; | return rayIns; | ||||
| } | } | ||||
| @Override | |||||
| public RayIns update(RayIns rayIns) { | |||||
| rayIns.setUpdateTime(new Date()); | |||||
| rayInsDao.update(rayIns); | |||||
| updateRayStatus(rayIns.getRayId()); | |||||
| return rayIns; | |||||
| } | |||||
| @Override | @Override | ||||
| @Transactional | @Transactional | ||||
| public String deleteById(Long id) { | public String deleteById(Long id) { | ||||