|
@@ -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,
|