浏览代码

fix:修改搜索号码

jimmyyem 1 月之前
父节点
当前提交
6ac339cef4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      internal/logic/contact/get_whatsapp_contact_list_logic.go

+ 2 - 2
internal/logic/contact/get_whatsapp_contact_list_logic.go

@@ -43,10 +43,10 @@ func (l *GetWhatsappContactListLogic) GetWhatsappContactList(req *types.Whatsapp
 		))
 	}
 	if req.Phone != nil {
-		predicates = append(predicates, contact.WxWxidContains(*req.Phone))
+		predicates = append(predicates, contact.PhoneContains(*req.Phone))
 	}
 	if req.Name != nil {
-		predicates = append(predicates, contact.NicknameContains(*req.Name))
+		predicates = append(predicates, contact.CnameContains(*req.Name))
 	}
 
 	data, err := l.svcCtx.DB.Contact.Query().Where(predicates...).WithContactRelationships(func(query *ent.LabelRelationshipQuery) {