Browse Source

feat:消息发送调整

fuwencai 5 months ago
parent
commit
90c6c20bf4
1 changed files with 5 additions and 4 deletions
  1. 5 4
      newuserSend/internal/logic/task.go

+ 5 - 4
newuserSend/internal/logic/task.go

@@ -160,11 +160,12 @@ func siteMsg(ctx context.Context, content entity.NewUserSendContent, sendUserLis
 			nsm.SendStationMessages(ctx, newparm)
 			nsm.SendStationMessages(ctx, newparm)
 		}
 		}
 	}
 	}
-	parm := utility.MessageParam{
-		UserIds: strings.Join(mgoIds, ","), Title: msgTitle, Content: msgInfo, Link: pcUrl, AndroidUrl: androidUrl, IosUrl: iosUrl, WeChatUrl: weChatUrl, MsgType: msgType,
+	if len(mgoIds) > 0 {
+		parm := utility.MessageParam{
+			UserIds: strings.Join(mgoIds, ","), Title: msgTitle, Content: msgInfo, Link: pcUrl, AndroidUrl: androidUrl, IosUrl: iosUrl, WeChatUrl: weChatUrl, MsgType: msgType,
+		}
+		nsm.SendStationMessages(ctx, parm)
 	}
 	}
-	nsm.SendStationMessages(ctx, parm)
-	//
 }
 }
 func updateState(ctx context.Context, sendUserList []entity.NewUserSendLog) {
 func updateState(ctx context.Context, sendUserList []entity.NewUserSendLog) {
 	ids := []int{}
 	ids := []int{}