From a5f967c51e630510c2dbed9b7cfffccd4252d18c Mon Sep 17 00:00:00 2001 From: huangyufei Date: Wed, 1 Feb 2023 11:34:44 +0800 Subject: [PATCH] =?UTF-8?q?calllog=E8=A1=A8=E5=A2=9E=E5=8A=A0slot=5Fid?= =?UTF-8?q?=E5=8D=A1=E6=A7=BDid=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ability/common/include/common.h | 1 + jstest/common.js | 2 +- test/unittest/src/calllogability_test.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ability/common/include/common.h b/ability/common/include/common.h index ccdbf28..dddc473 100644 --- a/ability/common/include/common.h +++ b/ability/common/include/common.h @@ -122,6 +122,7 @@ constexpr const char *CALL_LOG_URI = "datashare:///com.ohos.calllogability"; constexpr const char *CREATE_CALLLOG = "CREATE TABLE IF NOT EXISTS [calllog](" "[id] INTEGER PRIMARY KEY AUTOINCREMENT, " + "[slot_id] INTEGER NOT NULL DEFAULT 0, " "[phone_number] TEXT, " "[display_name] TEXT, " "[call_direction] INTEGER NOT NULL DEFAULT 0, " diff --git a/jstest/common.js b/jstest/common.js index 27b276e..1b0702b 100644 --- a/jstest/common.js +++ b/jstest/common.js @@ -84,7 +84,7 @@ export default { getCallLogResultColumns: function() { var resultColumns = [ - "id", "phone_number", "display_name", "call_direction", "voicemail_uri", "sim_type", "is_hd", "is_read", + "id", "slot_id", "phone_number", "display_name", "call_direction", "voicemail_uri", "sim_type", "is_hd", "is_read", "ring_duration", "talk_duration", "format_number", "quicksearch_key", "number_type", "number_type_name", "begin_time", "end_time", "answer_state", "create_time", "number_location", "photo_id", "photo_uri", "country_iso_code", "extra1", "extra2", "extra3", "extra4", "extra5", "extra6" diff --git a/test/unittest/src/calllogability_test.cpp b/test/unittest/src/calllogability_test.cpp index 18a5b6e..d8481b3 100644 --- a/test/unittest/src/calllogability_test.cpp +++ b/test/unittest/src/calllogability_test.cpp @@ -81,6 +81,7 @@ int64_t CalllogAbilityTest::CalllogInsertValue(std::string displayName, OHOS::Da void CalllogAbilityTest::GetAllValuesColumn(std::vector &column) { + column.push_back("slot_id"); column.push_back("phone_number"); column.push_back("display_name"); column.push_back("call_direction"); @@ -124,6 +125,7 @@ OHOS::DataShare::DataShareValuesBucket CalllogAbilityTest::GetCallLogValues( RandomNumberUtils randomNumberUtils; std::string phoneNumber = randomNumberUtils.Generating(number); OHOS::DataShare::DataShareValuesBucket valuesBucket; + valuesBucket.Put("slot_id", ContactsRand()); valuesBucket.Put("phone_number", phoneNumber + callLogTestStringValue); valuesBucket.Put("display_name", "name"); valuesBucket.Put("call_direction", ContactsRand()); -- Gitee