src/main/java/com/ruoyi/common/exception/CustomException.java
ÎļþÒÑɾ³ý src/main/java/com/ruoyi/common/exception/GlobalException.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,58 @@ package com.ruoyi.common.exception; /** * å ¨å±å¼å¸¸ * * @author ruoyi */ public class GlobalException extends RuntimeException { private static final long serialVersionUID = 1L; /** * é误æç¤º */ private String message; /** * é误æç»ï¼å é¨è°è¯é误 * * å {@link CommonResult#getDetailMessage()} ä¸è´ç设计 */ private String detailMessage; /** * 空æé æ¹æ³ï¼é¿å ååºååé®é¢ */ public GlobalException() { } public GlobalException(String message) { this.message = message; } public String getDetailMessage() { return detailMessage; } public GlobalException setDetailMessage(String detailMessage) { this.detailMessage = detailMessage; return this; } public String getMessage() { return message; } public GlobalException setMessage(String message) { this.message = message; return this; } } src/main/java/com/ruoyi/common/exception/ServiceException.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,73 @@ package com.ruoyi.common.exception; /** * ä¸å¡å¼å¸¸ * * @author ruoyi */ public final class ServiceException extends RuntimeException { private static final long serialVersionUID = 1L; /** * é误ç */ private Integer code; /** * é误æç¤º */ private String message; /** * é误æç»ï¼å é¨è°è¯é误 * * å {@link CommonResult#getDetailMessage()} ä¸è´ç设计 */ private String detailMessage; /** * 空æé æ¹æ³ï¼é¿å ååºååé®é¢ */ public ServiceException() { } public ServiceException(String message) { this.message = message; } public ServiceException(String message, Integer code) { this.message = message; this.code = code; } public String getDetailMessage() { return detailMessage; } public String getMessage() { return message; } public Integer getCode() { return code; } public ServiceException setMessage(String message) { this.message = message; return this; } public ServiceException setDetailMessage(String detailMessage) { this.detailMessage = detailMessage; return this; } } src/main/java/com/ruoyi/common/exception/base/BaseException.java
ÎļþÃû´Ó src/main/java/com/ruoyi/common/exception/BaseException.java ÐÞ¸Ä @@ -1,4 +1,4 @@ package com.ruoyi.common.exception; package com.ruoyi.common.exception.base; import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.StringUtils; src/main/java/com/ruoyi/common/exception/file/FileException.java
@@ -1,6 +1,6 @@ package com.ruoyi.common.exception.file; import com.ruoyi.common.exception.BaseException; import com.ruoyi.common.exception.base.BaseException; /** * æä»¶ä¿¡æ¯å¼å¸¸ç±» src/main/java/com/ruoyi/common/exception/user/UserException.java
@@ -1,6 +1,6 @@ package com.ruoyi.common.exception.user; import com.ruoyi.common.exception.BaseException; import com.ruoyi.common.exception.base.BaseException; /** * ç¨æ·ä¿¡æ¯å¼å¸¸ç±» src/main/java/com/ruoyi/common/utils/SecurityUtils.java
@@ -4,7 +4,7 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.framework.security.LoginUser; /** @@ -26,7 +26,7 @@ } catch (Exception e) { throw new CustomException("è·åç¨æ·IDå¼å¸¸", HttpStatus.UNAUTHORIZED); throw new ServiceException("è·åç¨æ·IDå¼å¸¸", HttpStatus.UNAUTHORIZED); } } @@ -41,7 +41,7 @@ } catch (Exception e) { throw new CustomException("è·åé¨é¨IDå¼å¸¸", HttpStatus.UNAUTHORIZED); throw new ServiceException("è·åé¨é¨IDå¼å¸¸", HttpStatus.UNAUTHORIZED); } } @@ -56,7 +56,7 @@ } catch (Exception e) { throw new CustomException("è·åç¨æ·è´¦æ·å¼å¸¸", HttpStatus.UNAUTHORIZED); throw new ServiceException("è·åç¨æ·è´¦æ·å¼å¸¸", HttpStatus.UNAUTHORIZED); } } @@ -71,7 +71,7 @@ } catch (Exception e) { throw new CustomException("è·åç¨æ·ä¿¡æ¯å¼å¸¸", HttpStatus.UNAUTHORIZED); throw new ServiceException("è·åç¨æ·ä¿¡æ¯å¼å¸¸", HttpStatus.UNAUTHORIZED); } } src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
@@ -60,7 +60,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.UtilException; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DictUtils; import com.ruoyi.common.utils.StringUtils; @@ -450,7 +450,7 @@ catch (Exception e) { log.error("导åºExcelå¼å¸¸{}", e.getMessage()); throw new CustomException("导åºExcel失败ï¼è¯·èç³»ç½ç«ç®¡çåï¼"); throw new UtilException("导åºExcel失败ï¼è¯·èç³»ç½ç«ç®¡çåï¼"); } finally { src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java
@@ -1,6 +1,6 @@ package com.ruoyi.common.utils.sql; import com.ruoyi.common.exception.BaseException; import com.ruoyi.common.exception.UtilException; import com.ruoyi.common.utils.StringUtils; /** @@ -22,7 +22,7 @@ { if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) { throw new BaseException("åæ°ä¸ç¬¦åè§èï¼ä¸è½è¿è¡æ¥è¯¢"); throw new UtilException("åæ°ä¸ç¬¦åè§èï¼ä¸è½è¿è¡æ¥è¯¢"); } return value; } src/main/java/com/ruoyi/framework/security/service/SysLoginService.java
@@ -8,7 +8,7 @@ import org.springframework.security.core.Authentication; import org.springframework.stereotype.Component; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.user.CaptchaException; import com.ruoyi.common.exception.user.CaptchaExpireException; import com.ruoyi.common.exception.user.UserPasswordNotMatchException; @@ -82,7 +82,7 @@ else { AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage())); throw new CustomException(e.getMessage()); throw new ServiceException(e.getMessage()); } } AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); src/main/java/com/ruoyi/framework/security/service/UserDetailsServiceImpl.java
@@ -5,10 +5,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.ruoyi.common.enums.UserStatus; import com.ruoyi.common.exception.BaseException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.security.LoginUser; import com.ruoyi.project.system.domain.SysUser; @@ -31,23 +30,23 @@ private SysPermissionService permissionService; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException public UserDetails loadUserByUsername(String username) { SysUser user = userService.selectUserByUserName(username); if (StringUtils.isNull(user)) { log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", username); throw new UsernameNotFoundException("ç»å½ç¨æ·ï¼" + username + " ä¸åå¨"); throw new ServiceException("ç»å½ç¨æ·ï¼" + username + " ä¸åå¨"); } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { log.info("ç»å½ç¨æ·ï¼{} 已被å é¤.", username); throw new BaseException("对ä¸èµ·ï¼æ¨çè´¦å·ï¼" + username + " 已被å é¤"); throw new ServiceException("对ä¸èµ·ï¼æ¨çè´¦å·ï¼" + username + " 已被å é¤"); } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { log.info("ç»å½ç¨æ·ï¼{} 已被åç¨.", username); throw new BaseException("对ä¸èµ·ï¼æ¨çè´¦å·ï¼" + username + " å·²åç¨"); throw new ServiceException("对ä¸èµ·ï¼æ¨çè´¦å·ï¼" + username + " å·²åç¨"); } return createLoginUser(user); src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java
@@ -1,19 +1,17 @@ package com.ruoyi.framework.web.exception; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.authentication.AccountExpiredException; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.validation.BindException; import org.springframework.web.HttpRequestMethodNotSupportedException; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.servlet.NoHandlerFoundException; import com.ruoyi.common.constant.HttpStatus; import com.ruoyi.common.exception.BaseException; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.DemoModeException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.web.domain.AjaxResult; @@ -28,59 +26,58 @@ private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); /** * åºç¡å¼å¸¸ * æéæ ¡éªå¼å¸¸ */ @ExceptionHandler(BaseException.class) public AjaxResult baseException(BaseException e) @ExceptionHandler(AccessDeniedException.class) public AjaxResult handleAccessDeniedException(AccessDeniedException e, HttpServletRequest request) { String requestURI = request.getRequestURI(); log.error("请æ±å°å'{}',æéæ ¡éªå¤±è´¥'{}'", requestURI, e.getMessage()); return AjaxResult.error(HttpStatus.FORBIDDEN, "没ææéï¼è¯·è系管çåææ"); } /** * è¯·æ±æ¹å¼ä¸æ¯æ */ @ExceptionHandler(HttpRequestMethodNotSupportedException.class) public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e, HttpServletRequest request) { String requestURI = request.getRequestURI(); log.error("请æ±å°å'{}',䏿¯æ'{}'请æ±", requestURI, e.getMethod()); return AjaxResult.error(e.getMessage()); } /** * ä¸å¡å¼å¸¸ */ @ExceptionHandler(CustomException.class) public AjaxResult businessException(CustomException e) { if (StringUtils.isNull(e.getCode())) { return AjaxResult.error(e.getMessage()); } return AjaxResult.error(e.getCode(), e.getMessage()); } @ExceptionHandler(NoHandlerFoundException.class) public AjaxResult handlerNoFoundException(Exception e) @ExceptionHandler(ServiceException.class) public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) { log.error(e.getMessage(), e); return AjaxResult.error(HttpStatus.NOT_FOUND, "è·¯å¾ä¸åå¨ï¼è¯·æ£æ¥è·¯å¾æ¯å¦æ£ç¡®"); Integer code = e.getCode(); return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage()); } @ExceptionHandler(AccessDeniedException.class) public AjaxResult handleAuthorizationException(AccessDeniedException e) /** * æ¦æªæªç¥çè¿è¡æ¶å¼å¸¸ */ @ExceptionHandler(RuntimeException.class) public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) { log.error(e.getMessage()); return AjaxResult.error(HttpStatus.FORBIDDEN, "没ææéï¼è¯·è系管çåææ"); } @ExceptionHandler(AccountExpiredException.class) public AjaxResult handleAccountExpiredException(AccountExpiredException e) { log.error(e.getMessage(), e); String requestURI = request.getRequestURI(); log.error("请æ±å°å'{}',åçæªç¥å¼å¸¸.", requestURI, e); return AjaxResult.error(e.getMessage()); } @ExceptionHandler(UsernameNotFoundException.class) public AjaxResult handleUsernameNotFoundException(UsernameNotFoundException e) { log.error(e.getMessage(), e); return AjaxResult.error(e.getMessage()); } /** * ç³»ç»å¼å¸¸ */ @ExceptionHandler(Exception.class) public AjaxResult handleException(Exception e) public AjaxResult handleException(Exception e, HttpServletRequest request) { log.error(e.getMessage(), e); String requestURI = request.getRequestURI(); log.error("请æ±å°å'{}',åçç³»ç»å¼å¸¸.", requestURI, e); return AjaxResult.error(e.getMessage()); } @@ -88,7 +85,7 @@ * èªå®ä¹éªè¯å¼å¸¸ */ @ExceptionHandler(BindException.class) public AjaxResult validatedBindException(BindException e) public AjaxResult handleBindException(BindException e) { log.error(e.getMessage(), e); String message = e.getAllErrors().get(0).getDefaultMessage(); @@ -99,7 +96,7 @@ * èªå®ä¹éªè¯å¼å¸¸ */ @ExceptionHandler(MethodArgumentNotValidException.class) public Object validExceptionHandler(MethodArgumentNotValidException e) public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { log.error(e.getMessage(), e); String message = e.getBindingResult().getFieldError().getDefaultMessage(); @@ -110,7 +107,7 @@ * æ¼ç¤ºæ¨¡å¼å¼å¸¸ */ @ExceptionHandler(DemoModeException.class) public AjaxResult demoModeException(DemoModeException e) public AjaxResult handleDemoModeException(DemoModeException e) { return AjaxResult.error("æ¼ç¤ºæ¨¡å¼ï¼ä¸å 许æä½"); } src/main/java/com/ruoyi/project/system/service/impl/SysConfigServiceImpl.java
@@ -8,7 +8,7 @@ import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.redis.RedisCache; import com.ruoyi.project.system.domain.SysConfig; @@ -153,7 +153,7 @@ SysConfig config = selectConfigById(configId); if (StringUtils.equals(UserConstants.YES, config.getConfigType())) { throw new CustomException(String.format("å ç½®åæ°ã%1$sãä¸è½å é¤ ", config.getConfigKey())); throw new ServiceException(String.format("å ç½®åæ°ã%1$sãä¸è½å é¤ ", config.getConfigKey())); } configMapper.deleteConfigById(configId); redisCache.deleteObject(getCacheKey(config.getConfigKey())); src/main/java/com/ruoyi/project/system/service/impl/SysDeptServiceImpl.java
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Service; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.aspectj.lang.annotation.DataScope; import com.ruoyi.framework.web.domain.TreeSelect; @@ -184,7 +184,7 @@ // 妿ç¶èç¹ä¸ä¸ºæ£å¸¸ç¶æ,åä¸å 许æ°å¢åèç¹ if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) { throw new CustomException("é¨é¨åç¨ï¼ä¸å 许æ°å¢"); throw new ServiceException("é¨é¨åç¨ï¼ä¸å 许æ°å¢"); } dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); return deptMapper.insertDept(dept); src/main/java/com/ruoyi/project/system/service/impl/SysDictTypeServiceImpl.java
@@ -6,7 +6,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.DictUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.project.system.domain.SysDictData; @@ -122,7 +122,7 @@ SysDictType dictType = selectDictTypeById(dictId); if (dictDataMapper.countDictDataByType(dictType.getDictType()) > 0) { throw new CustomException(String.format("%1$så·²åé ,ä¸è½å é¤", dictType.getDictName())); throw new ServiceException(String.format("%1$så·²åé ,ä¸è½å é¤", dictType.getDictName())); } dictTypeMapper.deleteDictTypeById(dictId); DictUtils.removeDictCache(dictType.getDictType()); src/main/java/com/ruoyi/project/system/service/impl/SysPostServiceImpl.java
@@ -4,7 +4,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.project.system.domain.SysPost; import com.ruoyi.project.system.mapper.SysPostMapper; @@ -147,7 +147,7 @@ SysPost post = selectPostById(postId); if (countUserPostById(postId) > 0) { throw new CustomException(String.format("%1$så·²åé ,ä¸è½å é¤", post.getPostName())); throw new ServiceException(String.format("%1$så·²åé ,ä¸è½å é¤", post.getPostName())); } } return postMapper.deletePostByIds(postIds); src/main/java/com/ruoyi/project/system/service/impl/SysRoleServiceImpl.java
@@ -9,7 +9,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.framework.aspectj.lang.annotation.DataScope; @@ -183,7 +183,7 @@ { if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) { throw new CustomException("ä¸å 许æä½è¶ 级管çåè§è²"); throw new ServiceException("ä¸å 许æä½è¶ 级管çåè§è²"); } } @@ -342,7 +342,7 @@ SysRole role = selectRoleById(roleId); if (countUserRoleByRoleId(roleId) > 0) { throw new CustomException(String.format("%1$så·²åé ,ä¸è½å é¤", role.getRoleName())); throw new ServiceException(String.format("%1$så·²åé ,ä¸è½å é¤", role.getRoleName())); } } // å é¤è§è²ä¸èåå ³è src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java
@@ -8,7 +8,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.framework.aspectj.lang.annotation.DataScope; @@ -223,7 +223,7 @@ { if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) { throw new CustomException("ä¸å 许æä½è¶ 级管çåç¨æ·"); throw new ServiceException("ä¸å 许æä½è¶ 级管çåç¨æ·"); } } @@ -485,7 +485,7 @@ { if (StringUtils.isNull(userList) || userList.size() == 0) { throw new CustomException("å¯¼å ¥ç¨æ·æ°æ®ä¸è½ä¸ºç©ºï¼"); throw new ServiceException("å¯¼å ¥ç¨æ·æ°æ®ä¸è½ä¸ºç©ºï¼"); } int successNum = 0; int failureNum = 0; @@ -530,7 +530,7 @@ if (failureNum > 0) { failureMsg.insert(0, "徿±æï¼å¯¼å ¥å¤±è´¥ï¼å ± " + failureNum + " æ¡æ°æ®æ ¼å¼ä¸æ£ç¡®ï¼é误å¦ä¸ï¼"); throw new CustomException(failureMsg.toString()); throw new ServiceException(failureMsg.toString()); } else { src/main/java/com/ruoyi/project/tool/gen/service/GenTableServiceImpl.java
@@ -25,7 +25,7 @@ import com.ruoyi.common.constant.Constants; import com.ruoyi.common.constant.GenConstants; import com.ruoyi.common.core.text.CharsetKit; import com.ruoyi.common.exception.CustomException; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.project.tool.gen.domain.GenTable; @@ -180,7 +180,7 @@ } catch (Exception e) { throw new CustomException("å¯¼å ¥å¤±è´¥ï¼" + e.getMessage()); throw new ServiceException("å¯¼å ¥å¤±è´¥ï¼" + e.getMessage()); } } @@ -269,7 +269,7 @@ } catch (IOException e) { throw new CustomException("æ¸²ææ¨¡æ¿å¤±è´¥ï¼è¡¨åï¼" + table.getTableName()); throw new ServiceException("æ¸²ææ¨¡æ¿å¤±è´¥ï¼è¡¨åï¼" + table.getTableName()); } } } @@ -291,7 +291,7 @@ List<GenTableColumn> dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); if (StringUtils.isEmpty(dbTableColumns)) { throw new CustomException("åæ¥æ°æ®å¤±è´¥ï¼åè¡¨ç»æä¸åå¨"); throw new ServiceException("åæ¥æ°æ®å¤±è´¥ï¼åè¡¨ç»æä¸åå¨"); } List<String> dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); @@ -383,26 +383,26 @@ JSONObject paramsObj = JSONObject.parseObject(options); if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE))) { throw new CustomException("æ ç¼ç åæ®µä¸è½ä¸ºç©º"); throw new ServiceException("æ ç¼ç åæ®µä¸è½ä¸ºç©º"); } else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE))) { throw new CustomException("æ ç¶ç¼ç åæ®µä¸è½ä¸ºç©º"); throw new ServiceException("æ ç¶ç¼ç åæ®µä¸è½ä¸ºç©º"); } else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME))) { throw new CustomException("æ åç§°åæ®µä¸è½ä¸ºç©º"); throw new ServiceException("æ åç§°åæ®µä¸è½ä¸ºç©º"); } } else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) { if (StringUtils.isEmpty(genTable.getSubTableName())) { throw new CustomException("å ³èå表ç表åä¸è½ä¸ºç©º"); throw new ServiceException("å ³èå表ç表åä¸è½ä¸ºç©º"); } else if (StringUtils.isEmpty(genTable.getSubTableFkName())) { throw new CustomException("åè¡¨å ³èçå¤é®åä¸è½ä¸ºç©º"); throw new ServiceException("åè¡¨å ³èçå¤é®åä¸è½ä¸ºç©º"); } } }