This commit is contained in:
sxu 2025-05-07 09:00:45 +08:00
parent 7f7068e782
commit 23172bb8ba
4 changed files with 12 additions and 12 deletions

View File

@ -83,7 +83,7 @@ public class AllocCanteenController extends BaseController {
try {
return toAjax(allocCanteenService.insertAllocCanteen(allocCanteen));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
return error(e.getMessage());
}
}
@ -99,7 +99,7 @@ public class AllocCanteenController extends BaseController {
try {
return toAjax(allocCanteenService.updateAllocCanteen(allocCanteen));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
return error(e.getMessage());
}
}

View File

@ -83,7 +83,7 @@ public class AllocStallController extends BaseController {
try {
return toAjax(allocStallService.insertAllocStall(allocStall));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
return error(e.getMessage());
}
}
@ -99,7 +99,7 @@ public class AllocStallController extends BaseController {
try {
return toAjax(allocStallService.updateAllocStall(allocStall));
} catch (Exception e) {
return error("系统错误, " + e.getMessage());
return error(e.getMessage());
}
}

View File

@ -67,11 +67,11 @@ public class AllocCanteenServiceImpl implements IAllocCanteenService {
try {
AllocCanteen checkResult = allocCanteenMapper.selectAllocCanteenByCanteenName(allocCanteen);
if (Objects.nonNull(checkResult)) {
throw new ServiceException("食堂名称已存在");
throw new ServiceException("该区域食堂名称已存在");
}
return allocCanteenMapper.insertAllocCanteen(allocCanteen);
} catch (Exception e) {
throw new ServiceException("新增食堂异常," + e.getMessage());
throw new ServiceException(e.getMessage());
}
}
@ -90,11 +90,11 @@ public class AllocCanteenServiceImpl implements IAllocCanteenService {
.filter(item -> item.getAreaId().equals(allocCanteen.getAreaId()))
.map(AllocCanteen::getCanteenName).collect(Collectors.toList());
if (otherCanteenNameList.contains(allocCanteen.getCanteenName())) {
throw new ServiceException("食堂名称已存在");
throw new ServiceException("该区域食堂名称已存在");
}
return allocCanteenMapper.updateAllocCanteen(allocCanteen);
} catch (Exception e) {
throw new ServiceException("更新食堂异常," + e.getMessage());
throw new ServiceException(e.getMessage());
}
}

View File

@ -63,7 +63,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
try {
AllocStall checkResult = allocStallMapper.selectAllocStallByStallName(allocStall);
if (Objects.nonNull(checkResult)) {
throw new ServiceException("档口名称已存在");
throw new ServiceException("该食堂档口名称已存在");
}
int stallCount = allocStallMapper.insertAllocStall(allocStall);
if (stallCount > 0 && !CollectionUtils.isEmpty(allocStall.getAllocStallMealtimeList())) {
@ -74,7 +74,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
}
return stallCount;
} catch (Exception e) {
throw new ServiceException("新增档口异常," + e.getMessage());
throw new ServiceException(e.getMessage());
}
}
@ -93,7 +93,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
.filter(item -> item.getCanteenId().equals(allocStall.getCanteenId()))
.map(AllocStall::getStallName).collect(Collectors.toList());
if (otherStallNameList.contains(allocStall.getStallName())) {
throw new ServiceException("档口名称已存在");
throw new ServiceException("该食堂档口名称已存在");
}
int stallCount = allocStallMapper.updateAllocStall(allocStall);
if (stallCount > 0 && !CollectionUtils.isEmpty(allocStall.getAllocStallMealtimeList())) {
@ -102,7 +102,7 @@ public class AllocStallServiceImpl implements IAllocStallService {
}
return stallCount;
} catch (Exception e) {
throw new ServiceException("更新档口异常," + e.getMessage());
throw new ServiceException(e.getMessage());
}
}