|
@@ -633,6 +633,8 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
itemVoice.VoiceName = vo.Name
|
|
|
itemVoice.VoiceUrl = vo.Url
|
|
|
itemVoice.VoicePlaySeconds = vo.PlaySeconds
|
|
|
+ itemVoice.BackgroundImg = vo.BackgroundImg
|
|
|
+ itemVoice.ShareImg = vo.ShareImg
|
|
|
itemVoice.CreateTime = time.Now()
|
|
|
}
|
|
|
}
|
|
@@ -643,6 +645,8 @@ func (this *ActivityCoAntroller) PreserveAndPublish() {
|
|
|
itemVideo.ActivityId = activityId
|
|
|
itemVideo.VideoDuration = videoDetail.VideoDuration
|
|
|
itemVideo.VideoUrl = videoDetail.VideoUrl
|
|
|
+ itemVideo.BackgroundImg = videoDetail.BackgroundImg
|
|
|
+ itemVideo.ShareImg = videoDetail.ShareImg
|
|
|
itemVideo.ModifyDate = time.Now().Format(utils.FormatDateTime)
|
|
|
itemVideo.CreateTime = time.Now().Format(utils.FormatDateTime)
|
|
|
}
|
|
@@ -1099,6 +1103,11 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
}
|
|
|
if len(VoiceReqList) == 0 {
|
|
|
VoiceReqList = make([]*cygx.CygxActivityVoiceReq, 0)
|
|
|
+ } else {
|
|
|
+ for _, v := range VoiceReqList {
|
|
|
+ activityInfo.BackgroundImg = v.BackgroundImg
|
|
|
+ activityInfo.ShareImg = v.ShareImg
|
|
|
+ }
|
|
|
}
|
|
|
VideoDetail, err := cygx.GetCygxActivityVideoReqDetail(activityId)
|
|
|
if err != nil && err.Error() != utils.ErrNoRow() {
|
|
@@ -1106,6 +1115,10 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
br.ErrMsg = "GetCygxActivityVideoReqDetail,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
return
|
|
|
}
|
|
|
+ if VideoDetail != nil {
|
|
|
+ activityInfo.BackgroundImg = VideoDetail.BackgroundImg
|
|
|
+ activityInfo.ShareImg = VideoDetail.ShareImg
|
|
|
+ }
|
|
|
if activityInfo.CustomerTypeIds != "" {
|
|
|
customerTypeIdslist := strings.Split(activityInfo.CustomerTypeIds, ",")
|
|
|
var permissionValueStr string
|
|
@@ -1148,6 +1161,20 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
if activityInfo.VisibleRange == 0 {
|
|
|
activityInfo.VisibleRange = 2
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
activityInfo.VoiceList = VoiceReqList
|
|
|
activityInfo.VideoDetail = VideoDetail
|
|
@@ -1474,3 +1501,65 @@ func (this *ActivityCoAntroller) DeadlineSet() {
|
|
|
br.Success = true
|
|
|
br.Data = list
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+func (this *ActivityCoAntroller) VideoAndVoice() {
|
|
|
+ br := new(models.BaseResponse).Init()
|
|
|
+ defer func() {
|
|
|
+ this.Data["json"] = br
|
|
|
+ this.ServeJSON()
|
|
|
+ }()
|
|
|
+ AdminUser := this.SysUser
|
|
|
+ if AdminUser == nil {
|
|
|
+ br.Msg = "请登录"
|
|
|
+ br.ErrMsg = "请登录,用户信息为空"
|
|
|
+ br.Ret = 408
|
|
|
+ return
|
|
|
+ }
|
|
|
+ activityId, _ := this.GetInt("ActivityId")
|
|
|
+ fileType, _ := this.GetInt("FileType")
|
|
|
+ if activityId < 1 {
|
|
|
+ br.Msg = "请输入活动ID"
|
|
|
+ return
|
|
|
+ }
|
|
|
+ activityInfo, err := cygx.GetAddActivityInfoById(activityId)
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "活动不存在"
|
|
|
+ br.ErrMsg = "活动ID错误,Err:" + err.Error() + "activityId:" + strconv.Itoa(activityId)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ conf, err := cygx.GetCygxConfigDetailByCode("activity_video_default_img")
|
|
|
+ if err != nil {
|
|
|
+ br.Msg = "获取微路演默认图配置失败" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ list := new(cygx.ActivityVideoDefaultImgList)
|
|
|
+ if err = json.Unmarshal([]byte(conf.ConfigValue), &list); err != nil {
|
|
|
+ br.Msg = "微路演默认图配置配置值解析失败" + err.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ resp := new(cygx.ActivityVideoDefaultImgListResp)
|
|
|
+ if fileType == 1 {
|
|
|
+ for _, v := range list.Audio {
|
|
|
+ if v.ChartPermissionId == activityInfo.ChartPermissionId {
|
|
|
+ resp.List = v.List
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ for _, v := range list.Audio {
|
|
|
+ if v.ChartPermissionId == activityInfo.ChartPermissionId {
|
|
|
+ resp.List = v.List
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ br.Ret = 200
|
|
|
+ br.Success = true
|
|
|
+ br.Msg = "获取成功"
|
|
|
+ br.Data = resp
|
|
|
+}
|