添加业务逻辑

This commit is contained in:
2024-07-29 00:01:09 +08:00
parent cdc0f6e38d
commit d23c5f5c7e
19 changed files with 764 additions and 321 deletions

View File

@@ -0,0 +1,18 @@
package com.aiosman.riderpro.data
import com.aiosman.riderpro.test.TestDatabase
interface UserService {
suspend fun getUserProfile(id:String): AccountProfile
}
class TestUserServiceImpl : UserService {
override suspend fun getUserProfile(id: String): AccountProfile {
TestDatabase.accountData.forEach {
if (it.id == id.toInt()) {
return it
}
}
return AccountProfile(0, 0, 0, "", "", "", "")
}
}