mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-10-31 00:57:13 +08:00 
			
		
		
		
	style: 调整代码风格 null == xx => xx == null(更符合大众风格)
This commit is contained in:
		| @@ -59,7 +59,7 @@ public class ExcelDictConverter implements Converter<Object> { | ||||
|     public WriteCellData<String> convertToExcelData(Object data, | ||||
|                                                     ExcelContentProperty contentProperty, | ||||
|                                                     GlobalConfiguration globalConfiguration) { | ||||
|         if (null == data) { | ||||
|         if (data == null) { | ||||
|             return new WriteCellData<>(StringConstants.EMPTY); | ||||
|         } | ||||
|         // 获取字典项数据 | ||||
| @@ -83,7 +83,7 @@ public class ExcelDictConverter implements Converter<Object> { | ||||
|      */ | ||||
|     private List<LabelValueResp> getDictCode(ExcelContentProperty contentProperty) { | ||||
|         DictExcelProperty dictExcelProperty = contentProperty.getField().getAnnotation(DictExcelProperty.class); | ||||
|         if (null == dictExcelProperty) { | ||||
|         if (dictExcelProperty == null) { | ||||
|             throw new IllegalArgumentException("Excel 字典转换器异常:请为字段添加 @DictExcelProperty 注解"); | ||||
|         } | ||||
|         CommonDictItemService dictItemService = SpringUtil.getBean(CommonDictItemService.class); | ||||
|   | ||||
| @@ -56,7 +56,7 @@ public class MyBatisPlusMetaObjectHandler implements MetaObjectHandler { | ||||
|      */ | ||||
|     @Override | ||||
|     public void insertFill(MetaObject metaObject) { | ||||
|         if (null == metaObject) { | ||||
|         if (metaObject == null) { | ||||
|             return; | ||||
|         } | ||||
|         Long createUser = UserContextHolder.getUserId(); | ||||
| @@ -79,7 +79,7 @@ public class MyBatisPlusMetaObjectHandler implements MetaObjectHandler { | ||||
|      */ | ||||
|     @Override | ||||
|     public void updateFill(MetaObject metaObject) { | ||||
|         if (null == metaObject) { | ||||
|         if (metaObject == null) { | ||||
|             return; | ||||
|         } | ||||
|         Long updateUser = UserContextHolder.getUserId(); | ||||
|   | ||||
| @@ -36,7 +36,7 @@ public class WebSocketClientServiceImpl implements WebSocketClientService { | ||||
|     public String getClientId(ServletServerHttpRequest request) { | ||||
|         HttpServletRequest servletRequest = request.getServletRequest(); | ||||
|         String token = servletRequest.getParameter("token"); | ||||
|         if (null == StpUtil.getLoginIdByToken(token)) { | ||||
|         if (StpUtil.getLoginIdByToken(token) == null) { | ||||
|             throw new BusinessException("登录已过期,请重新登录"); | ||||
|         } | ||||
|         return token; | ||||
|   | ||||
| @@ -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