Commit c80f0408 authored by maqing's avatar maqing

修改机构和护理机构为null的报错

parent b44bd151
......@@ -11,7 +11,13 @@ public class TokenParsingUtil {
//解析token
String subToken = token.substring(AuthConstants.JWT_PREFIX.length());
String claims = JwtHelper.decode(subToken).getClaims();
Integer rid = (Integer) JSONObject.parseObject(claims).get(id);
Integer rid;
if(JSONObject.parseObject(claims).get(id)==null || JSONObject.parseObject(claims).get(id).equals("")){
rid=0;
}else {
rid = (Integer) JSONObject.parseObject(claims).get(id);
}
return rid;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment