|
@@ -13,6 +13,8 @@ type CygxActivityVoice struct {
|
|
|
VoiceUrl string `description:"音频地址"`
|
|
|
VoiceName string `description:"音频名称"`
|
|
|
VoicePlaySeconds string `description:"音频时长"`
|
|
|
+ VoiceCounts int `description:"播放量"`
|
|
|
+ ModifyTime string `description:"更新时间"`
|
|
|
CreateTime time.Time `description:"创建时间"`
|
|
|
}
|
|
|
|
|
@@ -39,3 +41,10 @@ func GetCygxActivityVoiceReqList(activityIds []int) (items []*CygxActivityVoiceR
|
|
|
_, err = o.Raw(sql, activityIds).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+func UpdateCygxActivityVoiceCounts(activityId int) (err error) {
|
|
|
+ sql := `UPDATE cygx_activity_voice SET voice_counts = voice_counts+1 WHERE activity_id = ? `
|
|
|
+ o := orm.NewOrm()
|
|
|
+ _, err = o.Raw(sql, activityId).Exec()
|
|
|
+ return
|
|
|
+}
|