mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-04 22:57:12 +08:00
style: 调整代码风格 null == xx => xx == null(更符合大众风格)
This commit is contained in:
@@ -66,7 +66,7 @@ public class UserContextHolder {
|
||||
*/
|
||||
public static UserContext getContext() {
|
||||
UserContext context = CONTEXT_HOLDER.get();
|
||||
if (null == context) {
|
||||
if (context == null) {
|
||||
context = StpUtil.getSession().getModel(SaSession.USER, UserContext.class);
|
||||
CONTEXT_HOLDER.set(context);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class UserContextHolder {
|
||||
*/
|
||||
public static UserContext getContext(Long userId) {
|
||||
SaSession session = StpUtil.getSessionByLoginId(userId, false);
|
||||
if (null == session) {
|
||||
if (session == null) {
|
||||
return null;
|
||||
}
|
||||
return session.getModel(SaSession.USER, UserContext.class);
|
||||
@@ -103,7 +103,7 @@ public class UserContextHolder {
|
||||
*/
|
||||
public static UserExtraContext getExtraContext() {
|
||||
UserExtraContext context = EXTRA_CONTEXT_HOLDER.get();
|
||||
if (null == context) {
|
||||
if (context == null) {
|
||||
context = getExtraContext(StpUtil.getTokenValue());
|
||||
EXTRA_CONTEXT_HOLDER.set(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user