Ver Fonte

Merge branch 'aj_broadcast'

hongze há 1 mês atrás
pai
commit
4b9acf2790
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      services/voice_broadcast.go

+ 6 - 1
services/voice_broadcast.go

@@ -212,7 +212,7 @@ func SendBroadcastMsg(broadcastId, userId int) (errMsg string, err error) {
 	}
 	// 推送模板消息
 	go func() {
-		_ = wechat.SendVoiceBroadcastWxMsg(broadcast.BroadcastId,broadcast.VarietyId, broadcast.SectionName, broadcast.BroadcastName)
+		_ = wechat.SendVoiceBroadcastWxMsg(broadcast.BroadcastId, broadcast.VarietyId, broadcast.SectionName, broadcast.BroadcastName)
 	}()
 	// 推送客群消息
 	//go func() {
@@ -224,6 +224,11 @@ func SendBroadcastMsg(broadcastId, userId int) (errMsg string, err error) {
 // CreateVoiceBroadcast 新增语音播报
 func CreateVoiceBroadcast(sectionId, varietyId, authorId int, broadcastName, sectionName, varietyName, author, voiceSeconds, voiceSize, voiceUrl, imgs string, userInfo user.UserInfo) (resp response.Broadcast, err error) {
 	nowTime := time.Now().Local()
+	if userInfo.UserID > 0 {
+		authorId = int(userInfo.UserID)
+		author = userInfo.RealName
+	}
+
 	item := &voice_broadcast.VoiceBroadcast{
 		BroadcastName:    broadcastName,
 		SectionId:        sectionId,