瀏覽代碼

feat:消息发送调整

fuwencai 5 月之前
父節點
當前提交
90c6c20bf4
共有 1 個文件被更改,包括 5 次插入4 次删除
  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)
 		}
 	}
-	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) {
 	ids := []int{}