From 23172bb8ba477ca466ff415a3ea3209377c5a440 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Wed, 7 May 2025 09:00:45 +0800 Subject: [PATCH] bug 5801 --- .../core/alloc/controller/AllocCanteenController.java | 4 ++-- .../core/alloc/controller/AllocStallController.java | 4 ++-- .../core/alloc/service/impl/AllocCanteenServiceImpl.java | 8 ++++---- .../core/alloc/service/impl/AllocStallServiceImpl.java | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocCanteenController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocCanteenController.java index 1f5f064..4d41346 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocCanteenController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocCanteenController.java @@ -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()); } } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocStallController.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocStallController.java index ffd4be9..2ec5200 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocStallController.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/controller/AllocStallController.java @@ -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()); } } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocCanteenServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocCanteenServiceImpl.java index 51dd96b..5222ab5 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocCanteenServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocCanteenServiceImpl.java @@ -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()); } } diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocStallServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocStallServiceImpl.java index 2e1e9af..e8b033c 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocStallServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/alloc/service/impl/AllocStallServiceImpl.java @@ -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()); } }