|
|
@ -29,6 +29,11 @@ public class MatrixCraftController { |
|
|
|
@Operation(summary = "新增工艺") |
|
|
|
@PostMapping("/add") |
|
|
|
public Result<Boolean> add(@RequestBody MatrixCraft dto) { |
|
|
|
String name = dto.getName(); |
|
|
|
if (matrixCraftService.getBaseMapper().selectOne(new QueryWrapper<MatrixCraft>().eq("name", name)) != null) { |
|
|
|
return Result.failed("工艺名称重复"); |
|
|
|
} |
|
|
|
|
|
|
|
return Result.success(matrixCraftService.save(dto)); |
|
|
|
} |
|
|
|
|
|
|
|