|
@@ -75,3 +75,16 @@ type ReportItem struct {
|
|
|
*Report
|
|
|
ChapterList []*ReportChapter
|
|
|
}
|
|
|
+
|
|
|
+// UpdateReportPv
|
|
|
+// @Description: 研报pv自增
|
|
|
+// @author: Roc
|
|
|
+// @datetime 2024-07-19 15:46:58
|
|
|
+// @param reportId int
|
|
|
+// @return err error
|
|
|
+func UpdateReportPv(reportId int) (err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `UPDATE report SET pv = pv + 1 WHERE id = ?`
|
|
|
+ _, err = o.Raw(sql, reportId).Exec()
|
|
|
+ return
|
|
|
+}
|