This commit is contained in:
zhouwentao 2024-06-22 16:23:02 +08:00
parent 0c53bf07f1
commit 273f486487
1 changed files with 2 additions and 2 deletions

View File

@ -112,11 +112,11 @@ public class YxSchoolChildController extends JeecgController<YxSchoolChild, IYxS
}
lambdaQueryWrapper.eq(YxSchoolChild::getSchoolName, yxSchoolChild.getSchoolName());
count = yxSchoolChildService.count(lambdaQueryWrapper);
AssertUtils.notTrue(count>0,"当前专业名称已存在");
AssertUtils.notTrue(count>0,"当前院校名称已存在");
lambdaQueryWrapper.clear();
lambdaQueryWrapper.eq(YxSchoolChild::getSchoolCode, yxSchoolChild.getSchoolCode());
count = yxSchoolChildService.count(lambdaQueryWrapper);
AssertUtils.notTrue(count>0,"当前专业代码已存在");
AssertUtils.notTrue(count>0,"当前院校代码已存在");
if (StringUtils.isNotBlank(yxSchoolChild.getId())) {
yxSchoolChildService.updateById(yxSchoolChild);
return Result.OK("编辑成功!");