处理一体机返回“获取用户ID异常” 报错

This commit is contained in:
chenshaohua
2026-01-17 16:57:25 +08:00
parent 973c0b809e
commit 91fd3f3d11

View File

@@ -59,6 +59,10 @@ public class GlobalExceptionHandler
public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request)
{ {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
//处理异常
if ("获取用户ID异常".equals(e.getMessage())) {
return AjaxResult.success();
}
Integer code = e.getCode(); Integer code = e.getCode();
return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage()); return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage());
} }