| | |
| | | return authInfo.set("error_code", HttpServletResponse.SC_BAD_REQUEST).set("error_description", "未获得用户的角色信息"); |
| | | } |
| | | |
| | | try { |
| | | Long parse = new SimpleDateFormat("yyyy-MM-dd").parse("2023-10-15").getTime(); |
| | | long now= System.currentTimeMillis(); |
| | | if (parse < now){ |
| | | throw new ServiceException("试用已到期"); |
| | | } |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | // try { |
| | | // Long parse = new SimpleDateFormat("yyyy-MM-dd").parse("2023-10-15").getTime(); |
| | | // long now= System.currentTimeMillis(); |
| | | // if (parse < now){ |
| | | // throw new ServiceException("试用已到期"); |
| | | // } |
| | | // } catch (ParseException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | |
| | | return TokenUtil.createAuthInfo(userInfo); |
| | | } |