|
@@ -14,6 +14,8 @@ type CygxActivityVideo struct {
|
|
VideoCounts int `description:"播放量"`
|
|
VideoCounts int `description:"播放量"`
|
|
VideoUrl string `description:"视频地址"`
|
|
VideoUrl string `description:"视频地址"`
|
|
CreateTime string `description:"创建时间"`
|
|
CreateTime string `description:"创建时间"`
|
|
|
|
+ BackgroundImg string `description:"封面图片"`
|
|
|
|
+ ShareImg string `description:"分享图片"`
|
|
}
|
|
}
|
|
|
|
|
|
type CygxActivityVideoResp struct {
|
|
type CygxActivityVideoResp struct {
|
|
@@ -26,6 +28,8 @@ type CygxActivityVideoResp struct {
|
|
VideoCounts int `description:"播放量"`
|
|
VideoCounts int `description:"播放量"`
|
|
VideoUrl string `description:"视频地址"`
|
|
VideoUrl string `description:"视频地址"`
|
|
CreateTime string `description:"创建时间"`
|
|
CreateTime string `description:"创建时间"`
|
|
|
|
+ BackgroundImg string `description:"封面图片"`
|
|
|
|
+ ShareImg string `description:"分享图片"`
|
|
}
|
|
}
|
|
|
|
|
|
type CygxActivityVideoReq struct {
|
|
type CygxActivityVideoReq struct {
|
|
@@ -117,3 +121,19 @@ func GetActivityVideoActivityIds() (activityIds string, err error) {
|
|
err = o.Raw(sql).QueryRow(&activityIds)
|
|
err = o.Raw(sql).QueryRow(&activityIds)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 修改
|
|
|
|
+func UpdateCygxActivityVideo(item *CygxActivityVideo) (err error) {
|
|
|
|
+ to := orm.NewOrm()
|
|
|
|
+ updateParams := make(map[string]interface{})
|
|
|
|
+ updateParams["BackgroundImg"] = item.BackgroundImg
|
|
|
|
+ updateParams["ShareImg"] = item.ShareImg
|
|
|
|
+ ptrStructOrTableName := "cygx_activity_video"
|
|
|
|
+ whereParam := map[string]interface{}{"activity_id": item.ActivityId}
|
|
|
|
+ qs := to.QueryTable(ptrStructOrTableName)
|
|
|
|
+ for expr, exprV := range whereParam {
|
|
|
|
+ qs = qs.Filter(expr, exprV)
|
|
|
|
+ }
|
|
|
|
+ _, err = qs.Update(updateParams)
|
|
|
|
+ return
|
|
|
|
+}
|