Sfoglia il codice sorgente

避免空指针异常

seyason 2 anni fa
parent
commit
51ad198369

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -4662,9 +4662,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 } else if (o1.department.compareTo(o2.department) < 0) {
                     return 1;
                 } else {
-                    if (o1.name.compareTo(o2.name) > 0) {
+                    if (o1.name != null && o2.name != null && o1.name.compareTo(o2.name) > 0) {
                         return 1;
-                    } else if (o1.name.compareTo(o2.name) < 0) {
+                    } else if (o1.name != null && o2.name != null && o1.name.compareTo(o2.name) < 0) {
                         return -1;
                     } else {
                         if (o1.createDate.compareTo(o2.createDate) > 0) {

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -15,7 +15,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:3306/man_mld?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:3306/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: HuoshiDB@2022
     hikari: