[fix]
[line 唯一条件变更]
This commit is contained in:
yangyakun
2024-11-11 18:45:56 +08:00
parent 29927acaf6
commit 06478bd548

View File

@@ -41,17 +41,7 @@ data class LineDataBean(
const val lineDataTable: String = "line_data_table"
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as LineDataBean
if (lineId != other.lineId) return false
if (lineName != other.lineName) return false
return true
}
fun getLineIdAndName(function: (lineId:Long,lineName:String) -> Unit) {
lineId?.let {id->
@@ -60,4 +50,24 @@ data class LineDataBean(
}
}
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as LineDataBean
if (lineId != other.lineId) return false
if (lineName != other.lineName) return false
if (endStationName != other.endStationName) return false
return true
}
override fun hashCode(): Int {
var result = lineId?.hashCode() ?: 0
result = 31 * result + (lineName?.hashCode() ?: 0)
result = 31 * result + (endStationName?.hashCode() ?: 0)
return result
}
}