夏文涛 1 vuosi sitten
vanhempi
commit
0fa3fa35b8

+ 1 - 1
src/main/java/com/template/controller/WelcomeStudentController.java

@@ -1477,7 +1477,7 @@ public class WelcomeStudentController implements WelcomeStudentControllerAPI {
         DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
         Integer visitorTotal = welcomeVisitorService.countTotal(start, end);
         List<WelcomeSetting> wss = welcomeSettingService.list(null);
-        Integer carTotal = wss != null && wss.size() > 0 ? wss.get(0).getMxhCarNum() : 0;
+        Integer carTotal = wss != null && wss.size() > 0 ? (wss.get(0).getMxhCarNum() == null ? 0 : wss.get(0).getMxhCarNum()) : 0;
 
         StudentOverviewVo vo = new StudentOverviewVo();
         vo.setEnrollmentTotal(6532);