1、新增更新算例状态接口
This commit is contained in:
@@ -324,4 +324,14 @@ public class SimulationRunController implements ISimulationRunFeignClient {
|
||||
public SdmResponse editExperimentResult(@RequestBody ExperimentResultReq req) {
|
||||
return runService.editExperimentResult(req);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新算例状态
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/updateStatus")
|
||||
public SdmResponse updateStatus(@RequestBody SpdmRunEditReq req) {
|
||||
return runService.updateStatus(req);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -93,4 +93,6 @@ public interface ISimulationRunService extends IService<SimulationRun> {
|
||||
|
||||
SdmResponse editExperimentResult(ExperimentResultReq req);
|
||||
|
||||
SdmResponse updateStatus(SpdmRunEditReq req);
|
||||
|
||||
}
|
||||
@@ -1669,4 +1669,13 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
folder.delete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdmResponse updateStatus(SpdmRunEditReq req) {
|
||||
boolean updateFlag = this.lambdaUpdate()
|
||||
.set(SimulationRun::getStatus, req.getStatus())
|
||||
.set(SimulationRun::getUpdateTime, req.getUpdateTime())
|
||||
.eq(SimulationRun::getId, req.getTaskId()).update();
|
||||
return updateFlag ? SdmResponse.success("更新run状态成功") : SdmResponse.failed("更新run状态失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user