From eebc09df2f5948c924329bf0704b1c944d3c4852 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Tue, 18 Feb 2025 19:38:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/system/service/impl/SysAllocAreaServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java index 2122ca2..90f080a 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/service/impl/SysAllocAreaServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.system.service.impl; import java.util.List; import com.bonus.common.core.exception.ServiceException; import com.bonus.common.core.utils.DateUtils; +import com.bonus.common.core.utils.id.Id; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bonus.system.mapper.SysAllocAreaMapper; @@ -52,9 +53,10 @@ public class SysAllocAreaServiceImpl implements ISysAllocAreaService { public int insertSysAllocArea(SysAllocArea sysAllocArea) { sysAllocArea.setCreateTime(DateUtils.getNowDate()); try { + sysAllocArea.setAreaId(Id.next()); return sysAllocAreaMapper.insertSysAllocArea(sysAllocArea); } catch (Exception e) { - throw new ServiceException("错误信息描述"); + throw new ServiceException("新增区域错误" + e.getMessage()); } }