|
|
@ -55,6 +55,13 @@ public class FormulationController { |
|
|
|
boolean flag = formulationService.save(formulation); |
|
|
|
return flag? Result.success("添加成功") : Result.failed("添加失败"); |
|
|
|
} |
|
|
|
|
|
|
|
@PutMapping |
|
|
|
@Operation(summary = "修改配方") |
|
|
|
public Result<String> update(@RequestBody Formulation formulation) { |
|
|
|
boolean flag = formulationService.saveOrUpdate(formulation); |
|
|
|
return flag? Result.success("修改成功") : Result.failed("修改失败"); |
|
|
|
} |
|
|
|
@DeleteMapping("/{ids}") |
|
|
|
@Operation(summary = "删除配方") |
|
|
|
public Result<String> delete(@PathVariable String ids) { |
|
|
|