123456789101112 |
- package research_report
- import (
- "gorm.io/gorm"
- "hongze/hongze_yb/global"
- )
- // UpdateViewers 更新对应字段数据
- func (researchReport *ResearchReport) UpdateViewers() (err error) {
- err = global.DEFAULT_MYSQL.Model(researchReport).UpdateColumn("viewers", gorm.Expr("viewers + ?", 1)).Error
- return
- }
|