From 71edeb69220389cfbc24ed97f1ee4effefd1dbfc Mon Sep 17 00:00:00 2001 From: chenzhihang <709011834@qq.com> Date: Tue, 20 May 2025 11:13:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=8A=B6=E6=80=81=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/activeLearn/ActiveLearnInsController.java | 6 ++++++ .../machineLearn/MachineLearnInsController.java | 6 ++++++ .../ruoyi/platform/controller/ray/RayInsController.java | 6 ++++++ .../com/ruoyi/platform/service/ActiveLearnInsService.java | 2 ++ .../ruoyi/platform/service/MachineLearnInsService.java | 2 ++ .../java/com/ruoyi/platform/service/RayInsService.java | 2 ++ .../platform/service/impl/ActiveLearnInsServiceImpl.java | 8 ++++++++ .../platform/service/impl/ExperimentInsServiceImpl.java | 2 +- .../platform/service/impl/MachineLearnInsServiceImpl.java | 8 ++++++++ .../ruoyi/platform/service/impl/RayInsServiceImpl.java | 8 ++++++++ 10 files changed, 49 insertions(+), 1 deletion(-) diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/activeLearn/ActiveLearnInsController.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/activeLearn/ActiveLearnInsController.java index cd2c953e..31854b72 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/activeLearn/ActiveLearnInsController.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/activeLearn/ActiveLearnInsController.java @@ -35,6 +35,12 @@ public class ActiveLearnInsController extends BaseController { return genericsSuccess(this.activeLearnInsService.insert(activeLearnIns)); } + @PutMapping + @ApiOperation("编辑实验实例") + public GenericsAjaxResult update(@RequestBody ActiveLearnIns activeLearnIns) { + return genericsSuccess(this.activeLearnInsService.update(activeLearnIns)); + } + @DeleteMapping("{id}") @ApiOperation("删除实验实例") public GenericsAjaxResult deleteById(@PathVariable("id") Long id) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/machineLearn/MachineLearnInsController.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/machineLearn/MachineLearnInsController.java index c4e83c97..41c4b5ee 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/machineLearn/MachineLearnInsController.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/machineLearn/MachineLearnInsController.java @@ -34,6 +34,12 @@ public class MachineLearnInsController extends BaseController { return genericsSuccess(this.machineLearnInsService.insert(machineLearnIns)); } + @PutMapping + @ApiOperation("编辑实验实例") + public GenericsAjaxResult edit(@RequestBody MachineLearnIns machineLearnIns){ + return genericsSuccess(this.machineLearnInsService.update(machineLearnIns)); + } + @DeleteMapping("{id}") @ApiOperation("删除实验实例") public GenericsAjaxResult deleteById(@PathVariable("id") Long id) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/ray/RayInsController.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/ray/RayInsController.java index c13354a3..a22bea37 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/ray/RayInsController.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/controller/ray/RayInsController.java @@ -35,6 +35,12 @@ public class RayInsController extends BaseController { return genericsSuccess(this.rayInsService.insert(rayIns)); } + @PutMapping + @ApiOperation("编辑实验实例") + public GenericsAjaxResult update(@RequestBody RayIns rayIns) { + return genericsSuccess(this.rayInsService.update(rayIns)); + } + @DeleteMapping("{id}") @ApiOperation("删除实验实例") public GenericsAjaxResult deleteById(@PathVariable("id") Long id) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ActiveLearnInsService.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ActiveLearnInsService.java index fa92becd..130fa462 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ActiveLearnInsService.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/ActiveLearnInsService.java @@ -13,6 +13,8 @@ public interface ActiveLearnInsService { ActiveLearnIns insert(ActiveLearnIns activeLearnIns); + ActiveLearnIns update(ActiveLearnIns activeLearnIns); + String deleteById(Long id); String batchDelete(List ids); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/MachineLearnInsService.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/MachineLearnInsService.java index 66becd1f..16e3632c 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/MachineLearnInsService.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/MachineLearnInsService.java @@ -12,6 +12,8 @@ public interface MachineLearnInsService { MachineLearnIns insert(MachineLearnIns machineLearnIns); + MachineLearnIns update(MachineLearnIns machineLearnIns); + String removeById(Long id); String batchDelete(List ids); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/RayInsService.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/RayInsService.java index 4224599d..ba6d0e35 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/RayInsService.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/RayInsService.java @@ -10,6 +10,8 @@ public interface RayInsService { RayIns insert(RayIns rayIns); + RayIns update(RayIns rayIns); + String deleteById(Long id); String batchDelete(List ids); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnInsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnInsServiceImpl.java index 041e1ad9..01af1ba3 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnInsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ActiveLearnInsServiceImpl.java @@ -62,6 +62,14 @@ public class ActiveLearnInsServiceImpl implements ActiveLearnInsService { return activeLearnIns; } + @Override + public ActiveLearnIns update(ActiveLearnIns activeLearnIns) { + activeLearnIns.setUpdateTime(new Date()); + activeLearnInsDao.update(activeLearnIns); + updateActiveLearnStatus(activeLearnIns.getActiveLearnId()); + return activeLearnIns; + } + @Override @Transactional public String deleteById(Long id) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentInsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentInsServiceImpl.java index 35e11588..47bdb311 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentInsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentInsServiceImpl.java @@ -207,7 +207,7 @@ public class ExperimentInsServiceImpl implements ExperimentInsService { experimentIns.setUpdateTime(new Date()); this.experimentInsDao.update(experimentIns); updateExperimentStatus(experimentIns.getExperimentId()); - return this.queryById(experimentIns.getId()); + return experimentIns; } @Override diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnInsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnInsServiceImpl.java index 3b9ce1b7..7de18fbc 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnInsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/MachineLearnInsServiceImpl.java @@ -58,6 +58,14 @@ public class MachineLearnInsServiceImpl implements MachineLearnInsService { return machineLearnIns; } + @Override + public MachineLearnIns update(MachineLearnIns machineLearnIns) { + machineLearnIns.setUpdateTime(new Date()); + machineLearnInsDao.update(machineLearnIns); + updateMLStatus(machineLearnIns.getMachineLearnId()); + return machineLearnIns; + } + @Override @Transactional public String removeById(Long id) { diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayInsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayInsServiceImpl.java index 2967e714..42f06f8b 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayInsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/RayInsServiceImpl.java @@ -70,6 +70,14 @@ public class RayInsServiceImpl implements RayInsService { return rayIns; } + @Override + public RayIns update(RayIns rayIns) { + rayIns.setUpdateTime(new Date()); + rayInsDao.update(rayIns); + updateRayStatus(rayIns.getRayId()); + return rayIns; + } + @Override @Transactional public String deleteById(Long id) {