Browse Source

feat 关系bug修复

lihao1 2 years ago
parent
commit
690d9d8dc0

+ 2 - 2
demo/src/main/java/com/framework/mvvm/model/db/dao/RelationDao.kt

@@ -23,14 +23,14 @@ interface RelationDao {
     @Query("select * from relation where graph_code = :graphCode and rel_code = :relCode and obj_from =:objFrom and obj_to =:objto and valid = 1")
     suspend fun getRelByGraphCodeAndRelCodeAndObjFromAndObjTo(graphCode: String, relCode: String, objFrom: String, objto: String): RelationEntity?
 
-    @Query("select * from relation where graph_code = :graphCode and rel_code = :relCode and obj_from=:equipId and valid = 1")
+    @Query("select * from relation where graph_code = :graphCode and rel_code = :relCode and obj_to=:equipId and valid = 1")
     suspend fun getRelationByCodeFrom(
         graphCode: String,
         relCode: String,
         equipId: String
     ): List<RelationEntity>
 
-    @Query("select * from relation where graph_code = :graphCode and rel_code = :relCode and obj_to=:equipId and valid = 1")
+    @Query("select * from relation where graph_code = :graphCode and rel_code = :relCode and obj_from=:equipId and valid = 1")
     suspend fun getRelationByCodeTo(
         graphCode: String,
         relCode: String,

+ 1 - 2
demo/src/main/java/com/sybotan/android/demo/activities/Space3DActivity.kt

@@ -133,8 +133,7 @@ class Space3DActivity : BaseActivity(), DIAware {
         when (nameObject.Name) {
             "OpenPage" -> {
 //                runOnUiThread { webview.loadUrl("javascript:OpenTestData()") }
-                runOnUiThread { viewModel.getFloorSpace()
-                    }
+                runOnUiThread { viewModel.getFloorSpace() }
             }
             "SetSpaceData" -> {
                 if (isLastSpace) {

+ 2 - 2
gradle.properties

@@ -17,14 +17,14 @@ SAGA_SERVICE_VERSION=1.4.140
 MAVEN_REPO_RELEASE_URL=http\://dev.dp.sagacloud.cn\:8082/repository/maven-releases/
 EVENTBUS_VERSION=3.1.1
 EASYPERMISSIONS_VERSION=1.2.0
-SAGA_ANDROID_VERSION=1.0.13
+SAGA_ANDROID_VERSION=1.0.14
 JUNIT_VERSION=5.3.1
 KOTLIN_VERSION=1.5.31
 SAGA_GROUP=cn.sagacloud
 SYBOTAN_KOTLIN_VERSION=1.2.42
 android.useAndroidX=true
 LICENSE_NAME=The Apache Software License, Version 2.0
-SAGA_CODE=25
+SAGA_CODE=26
 MAVEN_REPO_SNAPSHOT_URL=http\://dev.dp.sagacloud.cn\:8082/repository/maven-snapshots/
 NEXUS_USERNAME=saga
 DEVELOPER_ID=Andy.Sybotan