|
|
@@ -74,7 +74,10 @@ public class ContactsDao {
|
|
|
List<ContactsModel> models=new ArrayList<>();
|
|
|
Cursor cursor =db.rawQuery("select * from tbl_contacts a where id=" +
|
|
|
"(select min(id) from tbl_contacts where tf_phone=a.tf_phone and tf_ownerId=? ) and (tf_phone<> ? and tf_phone<> ?) " +
|
|
|
- " and (tf_whichSys=? or tf_whichSys=? ) ", new String[]{ownerId,"未填写"," ",master,""});
|
|
|
+ " ", new String[]{ownerId,"未填写"," "});
|
|
|
+// Cursor cursor =db.rawQuery("select * from tbl_contacts a where id=" +
|
|
|
+// "(select min(id) from tbl_contacts where tf_phone=a.tf_phone and tf_ownerId=? ) and (tf_phone<> ? and tf_phone<> ?) " +
|
|
|
+// " and (tf_whichSys=? or tf_whichSys=? ) ", new String[]{ownerId,"未填写"," ",master,""});
|
|
|
while (cursor.moveToNext()) {
|
|
|
ContactsModel model=new ContactsModel();
|
|
|
model.setName(cursor.getString(cursor.getColumnIndex("tf_name")));
|
|
|
@@ -195,7 +198,7 @@ public class ContactsDao {
|
|
|
public void delete(){
|
|
|
SQLiteDatabase db= DatabaseManager.getInstance().openDatabase();
|
|
|
String table = "tbl_contacts";
|
|
|
- String whereClause = "1=1";
|
|
|
+ String whereClause = "tf_type!=2";
|
|
|
int row= db.delete(table, whereClause, null);
|
|
|
DatabaseManager.getInstance().closeDatabase();
|
|
|
}
|