update 优化激活/挂起流程定义判断

This commit is contained in:
AprilWind 2024-11-12 15:32:08 +08:00
parent 8910660078
commit 3bd801894d

View File

@ -21,7 +21,6 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.util.List;
/**
* 流程定义管理 控制层
*
@ -179,11 +178,7 @@ public class FlwDefinitionController extends BaseController {
*/
@PutMapping("/updateDefinitionState/{id}/{active}")
public R<Boolean> active(@PathVariable Long id, @PathVariable boolean active) {
if (active) {
return R.ok(defService.unActive(id));
} else {
return R.ok(defService.active(id));
}
return R.ok(active ? defService.unActive(id) : defService.active(id));
}
}