有效期1

This commit is contained in:
2025-01-02 13:56:09 +08:00
parent b9b45b1789
commit 3ca2e9e25f
2 changed files with 18 additions and 5 deletions
+9
View File
@@ -73,6 +73,15 @@ func (r *VideoDao) GetVideoList(maps interface{}) (m []*model.Video, err error)
return m, nil
}
// GetVideoListNotIn 获取列表
func (r *VideoDao) GetVideoListNotIn(maps interface{}, ids []int64) (m []*model.Video, err error) {
err = global.Db.Where(maps).Where("video_id NOT IN ?", ids).Find(&m).Error
if err != nil {
return nil, err
}
return m, nil
}
// GetVideoCount 获取数量
func (r *VideoDao) GetVideoCount(maps interface{}) (total int64, err error) {
err = global.Db.Model(&model.Video{}).Where(maps).Count(&total).Error