|
@@ -175,6 +175,21 @@ func UpdateActivityVideoAndVoice(activityInfo *cygx.ActivityDetail, itemVoice *c
|
|
|
err = errors.New("GetCygxActivityVoiceCount" + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+ activityId := itemVoice.ActivityId
|
|
|
+ //获取活动详情
|
|
|
+ activityInfo, e := cygx.GetAddActivityInfoById(activityId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetAddActivityInfoById, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //易董办会的分析师电话会,为路演回放
|
|
|
+ if (activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 7) && activityInfo.IsYidongConduct == 1 {
|
|
|
+ itemVoice.FileType = 1
|
|
|
+ } else {
|
|
|
+ itemVoice.FileType = 2
|
|
|
+ }
|
|
|
+
|
|
|
shareImg, _ := MakeCygxMp3HtmlImg(itemVoice.VoicePlaySeconds) //生成分享图片
|
|
|
itemVoice.ShareImg = shareImg
|
|
|
//如果等于0就新增,反之就修改
|
|
@@ -188,6 +203,16 @@ func UpdateActivityVideoAndVoice(activityInfo *cygx.ActivityDetail, itemVoice *c
|
|
|
|
|
|
go SendWxMsgWithUpdateActivityVideoAndVoice(activityId, itemVoice.VoiceName) // 已结束的活动上传音频或视频后给已关注这个活动关联的产业的正式、试用 客户发送模板信息
|
|
|
} else {
|
|
|
+ //获取音频详情
|
|
|
+ voiceDetail, e := cygx.GetCygxActivityVoiceReqDetailByActivityId(activityId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetCygxActivityVoiceReqDetail" + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //手动修改过的,二次编辑,文件类型不变
|
|
|
+ if voiceDetail.IsByHand == 1 {
|
|
|
+ itemVoice.FileType = voiceDetail.FileType
|
|
|
+ }
|
|
|
e = cygx.UpdateCygxActivityVoice(itemVoice)
|
|
|
if e != nil {
|
|
|
err = errors.New("UpdateCygxActivityVoice" + e.Error())
|
|
@@ -219,10 +244,22 @@ func UpdateActivityVideoAndVoice(activityInfo *cygx.ActivityDetail, itemVoice *c
|
|
|
err = errors.New("GetActivityVideoCount" + e.Error())
|
|
|
return
|
|
|
}
|
|
|
+ activityId := itemVoice.ActivityId
|
|
|
+ //获取活动详情
|
|
|
+ activityInfo, e := cygx.GetAddActivityInfoById(activityId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetAddActivityInfoById, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //易董办会的分析师电话会,为路演回放
|
|
|
+ if (activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 7) && activityInfo.IsYidongConduct == 1 {
|
|
|
+ itemVideo.FileType = 1
|
|
|
+ } else {
|
|
|
+ itemVideo.FileType = 2
|
|
|
+ }
|
|
|
|
|
|
shareImg, _ := MakeCygxMp4HtmlImg(itemVideo.VideoDuration) //生成分享图片
|
|
|
itemVideo.ShareImg = shareImg
|
|
|
-
|
|
|
//视频文件更换阿里云oss地址 避免卡顿
|
|
|
var newOssUrl string
|
|
|
newOssUrl = strings.Replace(itemVideo.VideoUrl, "https://hzstatic.hzinsights.com", "https://hzchart.oss-accelerate.aliyuncs.com", -1)
|
|
@@ -237,6 +274,17 @@ func UpdateActivityVideoAndVoice(activityInfo *cygx.ActivityDetail, itemVoice *c
|
|
|
go UpdateActivityVideoResourceData(int(newId)) //写入首页最新 cygx_resource_data 表
|
|
|
go SendWxMsgWithUpdateActivityVideoAndVoice(activityId, itemVideo.VideoName) // 已结束的活动上传音频或视频后给已关注这个活动关联的产业的正式、试用 客户发送模板信息
|
|
|
} else {
|
|
|
+ //获取视频详情
|
|
|
+ videoDetail, e := cygx.GetCygxActivityVideoReqDetail(activityId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetCygxActivityVideoReqDetail" + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //手动修改过的,二次编辑,文件类型不变
|
|
|
+ if videoDetail.IsByHand == 1 {
|
|
|
+ itemVideo.FileType = videoDetail.FileType
|
|
|
+ }
|
|
|
+
|
|
|
e = cygx.UpdateCygxActivityVideo(itemVideo)
|
|
|
if e != nil {
|
|
|
err = errors.New("UpdateCygxActivityVideo" + e.Error())
|