Bläddra i källkod

修改查询返回数量

张维新 5 år sedan
förälder
incheckning
4d424f81df

+ 1 - 1
gradle.properties

@@ -22,7 +22,7 @@
 #
 
 SAGA_URL = http://www.sagacloud.cn
-SAGA_KOTLIN_VERSION = 1.4.104
+SAGA_KOTLIN_VERSION = 1.4.105
 # android
 # SYBOTAN_KOTLIN_VERSION = 1.4.63
 

+ 5 - 1
saga-kotlin-database/src/main/kotlin/com/sybotan/database/SAbstractDao.kt

@@ -357,7 +357,11 @@ abstract class SAbstractDao<ENTITY: Any>(entityClazz: Class<ENTITY>) {
                 if (entity == null){
                     null
                 }else{
-                    field.get(entity).toJson()
+                    if (field.get(entity) == null){
+                        null
+                    }else{
+                        field.get(entity).toJson()
+                    }
                 }
             }
         })