123456789101112131415161718192021222324252627282930313233343536 |
- package yb_view_log
- import (
- "hongze/hongze_yb/global"
- )
- func (i *YbViewLog) Create() (err error) {
- err = global.DEFAULT_MYSQL.Create(i).Error
- return
- }
- // Update 更新对应字段数据
- func (i *YbViewLog) Update(updateCols []string) (err error) {
- err = global.DEFAULT_MYSQL.Model(i).Select(updateCols).Updates(*i).Error
- return
- }
- type ActivityAudioLogAddReq struct {
- PrimaryId int `json:"primary_id" ` //访问类型对应主键ID(如:活动音频记录音频ID)
- ExtendId int `json:"extend_id" ` //扩展ID(如:活动音频记录活动ID)
- Source uint8 `json:"source" ` //来源:1-小程序;2-小程序PC端;3-公众号;4-Web PC端
- FromPage string `json:"from_page"` //来源页面
- }
- type ActivityAudioLogAddResp struct {
- Id uint64 `json:"id"` //日志ID
- }
- type ActivityAudioLogStopReq struct {
- Id uint64 `json:"id"` //日志ID
- StopSeconds int `json:"stop_seconds"` //停止时的秒数
- }
- func (i *YbViewLog) GetById() (item *YbViewLog, err error) {
- err = global.DEFAULT_MYSQL.Model(i).Where("id = ?", i.Id).First(&item).Error
- return
- }
|