修改模型
This commit is contained in:
@@ -96,12 +96,12 @@ object FoodModule {
|
||||
nameScoreList.add(IdNameScore(id = it.id, name = box.get(it.id).name?:"", score = it.score))
|
||||
}
|
||||
Timber.tag("FoodModule").d("queryFood数据:${nameScoreList.toJsonString()}")
|
||||
idScoreList.filter { it.score < 0.10 }.forEach {
|
||||
idScoreList.filter { it.score < 0.07 }.forEach {
|
||||
val food = box.get(it.id)
|
||||
//FoodQueryResult(id = it.id, name = food.name, foodIdx = food.foodIdx, score = it.score)
|
||||
food.name?.let { key ->
|
||||
val count = map[key] ?: 0
|
||||
map.put(key, count + 1)
|
||||
map[key] = count + 1
|
||||
}
|
||||
}
|
||||
val list = map.entries.sortedByDescending { it.value }.map { it.key }
|
||||
|
||||
Reference in New Issue
Block a user