|
@@ -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
|
|
|
|
|
@@ -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
|
|
|
-
|
|
|
|
|
|
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))
|
|
|
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())
|