|
@@ -650,7 +650,7 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
item.AdminName = activityInfo.AdminName
|
|
|
item.PublishDate = utils.StrTimeToTime(activityInfo.PublishDate)
|
|
|
}
|
|
|
- //音频
|
|
|
+ //音频 目前只有一个
|
|
|
itemVoice := new(cygx.CygxActivityVoice)
|
|
|
//var itemVoiceList []*cygx.CygxActivityVoice
|
|
|
if len(voiceList) > 0 {
|
|
@@ -674,17 +674,23 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
}
|
|
|
//删除原有的视频数据
|
|
|
//if itemVideo.VideoUrl != "" {
|
|
|
- videoDetail, err := cygx.GetCygxActivityVideoReqDetail(activityId)
|
|
|
+ //videoDetail, err := cygx.GetCygxActivityVideoReqDetail(activityId)
|
|
|
+ //if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
+ // br.Msg = "获取信息失败"
|
|
|
+ // br.ErrMsg = "GetCygxActivityVideoReqDetail,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
+ // return
|
|
|
+ //}
|
|
|
+ //if videoDetail != nil {
|
|
|
+ // go cygxService.UpdateResourceData(videoDetail.VideoId, "activityvideo", "delete", time.Now().Format(utils.FormatDateTime))
|
|
|
+ //}
|
|
|
+ //}
|
|
|
+ //处理音视频上传
|
|
|
+ err := cygxService.UpdateActivityVideoAndVoice(activityInfo, itemVoice, itemVideo)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取信息失败"
|
|
|
- br.ErrMsg = "GetCygxActivityVideoReqDetail,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
+ br.ErrMsg = "UpdateActivityVideoAndVoice,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
return
|
|
|
}
|
|
|
- if videoDetail != nil {
|
|
|
- go cygxService.UpdateResourceData(videoDetail.VideoId, "activityvideo", "delete", time.Now().Format(utils.FormatDateTime))
|
|
|
- }
|
|
|
- //}
|
|
|
-
|
|
|
//if itemVoice.VoiceUrl != "" {
|
|
|
voiceReqList, err := cygx.GetCygxActivityVoiceReqList(activityId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -699,20 +705,20 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
}
|
|
|
//}
|
|
|
//如果活动信息有如下变更则做消息推送
|
|
|
- voiceIdNew, videoIdNew, err := cygx.EditActivity(item, activityInfo.PublishStatus, industrialActivityItemsList, subjectActivityItemsList, itemVoice, itemVideo, itemPointsSet)
|
|
|
+ err = cygx.EditActivity(item, activityInfo.PublishStatus, industrialActivityItemsList, subjectActivityItemsList, itemPointsSet)
|
|
|
if err != nil {
|
|
|
br.Msg = "操作失败"
|
|
|
br.ErrMsg = "操作失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- //更新活动音频
|
|
|
- if int(voiceIdNew) > 0 {
|
|
|
- go cygxService.UpdateResourceData(int(voiceIdNew), "activityvoice", "add", activityInfo.ActivityTime)
|
|
|
- }
|
|
|
- //更新活动视频
|
|
|
- if int(videoIdNew) > 0 {
|
|
|
- go cygxService.UpdateResourceData(int(videoIdNew), "activityvideo", "add", activityInfo.ActivityTime)
|
|
|
- }
|
|
|
+ ////更新活动音频
|
|
|
+ //if int(voiceIdNew) > 0 {
|
|
|
+ // go cygxService.UpdateResourceData(int(voiceIdNew), "activityvoice", "add", activityInfo.ActivityTime)
|
|
|
+ //}
|
|
|
+ ////更新活动视频
|
|
|
+ //if int(videoIdNew) > 0 {
|
|
|
+ // go cygxService.UpdateResourceData(int(videoIdNew), "activityvideo", "add", activityInfo.ActivityTime)
|
|
|
+ //}
|
|
|
|
|
|
errAct = err
|
|
|
if activityInfo.PublishStatus == 1 && activityInfo.ActivityTimeText != item.ActivityTimeText {
|