| | |
| | | if(systemUser.getAccountLevel() != 1){ |
| | | return R.fail("添加失败"); |
| | | } |
| | | int count = problemTypeService.count(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getName, problemType.getName()).eq(ProblemType::getDel, 0)); |
| | | long count = problemTypeService.count(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getName, problemType.getName()).eq(ProblemType::getDel, 0)); |
| | | if(0 < count){ |
| | | return R.fail("该问题类型已存在"); |
| | | } |
| | |
| | | if(systemUser.getAccountLevel() != 1){ |
| | | return R.fail("编辑失败"); |
| | | } |
| | | int count = problemTypeService.count(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getName, problemType.getName()).eq(ProblemType::getDel, 0).ne(ProblemType::getId, problemType.getId())); |
| | | long count = problemTypeService.count(new LambdaQueryWrapper<ProblemType>().eq(ProblemType::getName, problemType.getName()).eq(ProblemType::getDel, 0).ne(ProblemType::getId, problemType.getId())); |
| | | if(0 < count){ |
| | | return R.fail("该问题类型已存在"); |
| | | } |