Browse Source

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

lichangdong 5 days ago
parent
commit
eb2e4274df

+ 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)