diff --git a/callui/src/main/ets/default/model/ContactManager.ets b/callui/src/main/ets/default/model/ContactManager.ets index b15b269..4b1f0fb 100644 --- a/callui/src/main/ets/default/model/ContactManager.ets +++ b/callui/src/main/ets/default/model/ContactManager.ets @@ -35,20 +35,21 @@ export default class ContactManager { * * @param { Object } callData -Object */ - async getContactInfo(callData) { - try { - const columns = ['id', 'display_name', 'detail_info']; - const predicates = new dataAbility.DataAbilityPredicates(); - predicates.equalTo('detail_info', callData.accountNumber); - const dataAbilityHelper = await featureAbility.acquireDataAbilityHelper(DBbaseUri); - const resSet = await dataAbilityHelper.query(DBUri, columns, predicates); - HiLog.i(TAG, "getContactInfo resSet : %s" + JSON.stringify(resSet)) - if (resSet.rowCount > 0) { - resSet.goToFirstRow(); - callData.contactName = resSet.getString(resSet.getColumnIndex('display_name')); - } - } catch (err) { - HiLog.i(TAG, "getContactInfo catch err : %s" + JSON.stringify(err)) - } + async getContactInfo(callData) { + try { + const columns = ['id', 'display_name', 'detail_info']; + const predicates = new dataAbility.DataAbilityPredicates(); + predicates.equalTo('detail_info', callData.accountNumber); + predicates.equalTo('is_deleted', 0); + const dataAbilityHelper = await featureAbility.acquireDataAbilityHelper(DBbaseUri); + const resSet = await dataAbilityHelper.query(DBUri, columns, predicates); + HiLog.i(TAG, "getContactInfo resSet : %s" + JSON.stringify(resSet)) + if (resSet.rowCount > 0) { + resSet.goToFirstRow(); + callData.contactName = resSet.getString(resSet.getColumnIndex('display_name')); + } + } catch (err) { + HiLog.i(TAG, "getContactInfo catch err : %s" + JSON.stringify(err)) } + } } \ No newline at end of file