Browse Source

wip:任务

wangshan 3 tháng trước cách đây
mục cha
commit
35cce55b72
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  1. 3 3
      services/sse/sse.go

+ 3 - 3
services/sse/sse.go

@@ -26,9 +26,9 @@ func (s *ServerSentRouter) Send() {
 		msg = "Default notification at " + time.Now().Format(time.RFC3339)
 	} else {
 		util.SseBroadcast.SendToUsers(model.SseMessage{
-			Prize:  msg,
+			Name:   msg,
 			User:   phone,
-			State:  model.AllTarget,
+			State:  model.WinningTarget,
 			Time:   time.Now().Format(date.Date_Full_Layout),
 			Remark: fmt.Sprintf("测试信息:恭喜 %s 抽中 %s ", phone, msg),
 		})
@@ -64,7 +64,7 @@ func (s *ServerSentRouter) Events() {
 			case msg := <-clientChan:
 				logger.Info("--msg--:", msg, "--userId--:", userId)
 				var isSend bool
-				if strings.Contains(msg, model.AllTarget) {
+				if strings.Contains(msg, model.WinningTarget) {
 					isSend = true
 				} else if userId != "" {
 					isSend = true