diff --git a/services/core/src/utils/profile_control_utils.cpp b/services/core/src/utils/profile_control_utils.cpp index 0f8a08e21dc069cc11670f21ebe588a437fcbd01..2129204555d2e0be84beae43ef7f85a73c171e91 100644 --- a/services/core/src/utils/profile_control_utils.cpp +++ b/services/core/src/utils/profile_control_utils.cpp @@ -257,7 +257,7 @@ int32_t ProfileControlUtils::GetDeviceProfile(std::shared_ptr kvStor } std::string dbKeyPrefix = ProfileUtils::GenerateDeviceProfileKey(deviceId); std::map values; - if (kvStore->GetByPrefix(dbKeyPrefix, values) != DP_SUCCESS) { + if (kvStore->GetByPrefix(deviceId, dbKeyPrefix, values) != DP_SUCCESS) { HILOGE("Get data fail!"); return DP_GET_KV_DB_FAIL; } @@ -290,7 +290,7 @@ int32_t ProfileControlUtils::GetServiceProfile(std::shared_ptr kvSto } std::string dbKeyPrefix = ProfileUtils::GenerateServiceProfileKey(deviceId, serviceName); std::map values; - if (kvStore->GetByPrefix(dbKeyPrefix, values) != DP_SUCCESS) { + if (kvStore->GetByPrefix(deviceId, dbKeyPrefix, values) != DP_SUCCESS) { HILOGE("Get data fail!"); return DP_GET_KV_DB_FAIL; } @@ -325,7 +325,7 @@ int32_t ProfileControlUtils::GetCharacteristicProfile(std::shared_ptr values; - if (kvStore->GetByPrefix(profileKeyPrefix, values) != DP_SUCCESS) { + if (kvStore->GetByPrefix(deviceId, profileKeyPrefix, values) != DP_SUCCESS) { HILOGE("Get data fail!"); return DP_GET_KV_DB_FAIL; }