Browse Source

Merge branch 'task_526_lichangdong_250424' into debug

lichangdong 1 week ago
parent
commit
ad33421dac

+ 1 - 1
crontask/init.go

@@ -80,7 +80,7 @@ func ScheduleRun(c *cron.Cron, serverCtx *svc.ServiceContext) {
 	})
 
 	l = NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("*/30 * * * *", func() {
+	c.AddFunc("*/5 * * * *", func() {
 		l.wxAddFriend()
 	})
 

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