소스 검색

查询个微的时候,联系不存在的时候更新

lichangdong 1 주 전
부모
커밋
eb2e4274df
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      internal/service/MessageHandlers/find_contact_task_result_notice.go

+ 8 - 0
internal/service/MessageHandlers/find_contact_task_result_notice.go

@@ -88,6 +88,14 @@ func (f *FindContactTaskResultNoticeHandler) Handle(ctx context.Context, msg *we
 		Where(addwechatfriendlog.FindContentEQ(message.SearchText)).
 		SetFindResult(m).
 		SetUpdatedAt(time.Now().Unix())
+
+	if message.ErrMsg != nil {
+		if *message.ErrMsg == "用户不存在" {
+			update = update.SetIsCanAdd(4)
+		} else {
+			update = update.SetIsCanAdd(3)
+		}
+	}
 	if message.Success {
 		if message.IsFriend {
 			update = update.SetIsCanAdd(6)