Эх сурвалжийг харах

fix(app):优化学生信息等级判断逻辑

- 将 null 判断替换为 ObjectUtil.isNotEmpty 方法- 提高代码可读性和健壮性
- 统一判断逻辑避免潜在空指针异常
wzq 1 долоо хоног өмнө
parent
commit
3f4d17c9ca

+ 2 - 2
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/service/impl/AppClassGroupingServiceImpl.java

@@ -99,7 +99,7 @@ public class AppClassGroupingServiceImpl extends ServiceImpl<AppClassGroupingMap
                         studentInfoVO.setLevelInfo("无");
                         studentInfoVO.setOrChoose(true);
                         if (appSite.getType() == 0) {
-                            if (appOrderProInfo.getLevelInfo() != null) {
+                            if (ObjectUtil.isNotEmpty(appOrderProInfo.getLevelInfo())) {
                                 studentInfoVO.setSchoolName(appSite.getName());
                                 studentInfoVO.setLevelInfo(appOrderProInfo.getLevelInfo());
                             }
@@ -116,7 +116,7 @@ public class AppClassGroupingServiceImpl extends ServiceImpl<AppClassGroupingMap
                     studentInfoVO.setSchoolName("无");
                     studentInfoVO.setLevelInfo("无");
                     if (appSite.getType() == 0) {
-                        if (appOrderProInfo.getLevelInfo() != null) {
+                        if (ObjectUtil.isNotEmpty(appOrderProInfo.getLevelInfo())) {
                             studentInfoVO.setSchoolName(appSite.getName());
                             studentInfoVO.setLevelInfo(appOrderProInfo.getLevelInfo());
                         }