src/main/java/com/zy/common/web/BaseController.java
@@ -43,6 +43,9 @@ private UserLoginService userLoginService; protected Long getUserId(){ if(Cools.isEmpty(request.getAttribute("userId"))){ return 000L; } return Long.parseLong(String.valueOf(request.getAttribute("userId"))); } @@ -202,4 +205,12 @@ } } public static boolean isNumber(String str){ for (int i = str.length();--i>=0;){ if (!Character.isDigit(str.charAt(i))){ return false; } } return true; } }