营养数据计算优化;人脸增加数据处理;其它优化;
This commit is contained in:
@@ -3,6 +3,7 @@ package com.sw.dualscreen.repository
|
||||
import com.sw.dualscreen.GlobalData
|
||||
import com.sw.dualscreen.model.request.UserNutritionParam
|
||||
import com.sw.dualscreen.model.response.ApiResponse
|
||||
import com.sw.dualscreen.model.response.DeviceConfig
|
||||
import com.sw.dualscreen.model.response.DinnerType
|
||||
import com.sw.dualscreen.model.response.FaceData
|
||||
import com.sw.dualscreen.model.response.FoodInfo
|
||||
@@ -63,7 +64,7 @@ class RemoteRepository constructor(
|
||||
suspend fun getUserFaceCache(
|
||||
pageNum: Int,
|
||||
pageSize: Int = 100,
|
||||
): ApiResponse<List<UserFaceModel>> {
|
||||
): ApiResponse<List<UserFaceModel>?> {
|
||||
return safeApiCall {
|
||||
apiService.getUserFaceCache(
|
||||
param = mapOf(
|
||||
@@ -73,6 +74,24 @@ class RemoteRepository constructor(
|
||||
)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 获取人脸数据
|
||||
*/
|
||||
suspend fun getFaceIncrementList(
|
||||
pageNum: Long,
|
||||
pageSize: Long = 100L,
|
||||
timestamp: Long
|
||||
): ApiResponse<List<UserFaceModel>?> {
|
||||
return safeApiCall {
|
||||
apiService.getFaceIncrementList(
|
||||
param = mapOf(
|
||||
"pageNum" to pageNum,
|
||||
"pageSize" to pageSize,
|
||||
"timestamp" to timestamp
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getUserFaceCache2(
|
||||
pageNum: Int,
|
||||
@@ -151,7 +170,11 @@ class RemoteRepository constructor(
|
||||
totalFee: String? = null
|
||||
): ApiResponse<String?> {
|
||||
return safeApiCall {
|
||||
apiService.getQrCodeImg(orderNo = orderNo, memberId = memberId, totalFee = totalFee)
|
||||
apiService.getQrCodeImg(
|
||||
orderNo = orderNo,
|
||||
memberId = memberId,
|
||||
totalFee = totalFee
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,4 +298,8 @@ class RemoteRepository constructor(
|
||||
apiService.uploadCollectFoodPics(params = params, foodPics = fileParts)
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun getDeviceConfig(): ApiResponse<DeviceConfig?> {
|
||||
return safeApiCall { apiService.getDeviceConfig() }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user