@@ -7,6 +7,7 @@ import (
"mtp2_if/mtpcache"
"mtp2_if/utils"
"strconv"
+ "strings"
"time"
)
@@ -1271,6 +1272,12 @@ type QueryNewContentsRsp struct {
func GetNewContents(ids []string) (rsp []QueryNewContentsRsp, error error) {
engine := db.GetEngine()
+ // 增加点击数
+ if len(ids) != 0 {
+ sql := fmt.Sprintf("UPDATE SITE_COLUMNDETAIL SET HITS = nvl(HITS, 0) + 1 WHERE ID IN (%v)", strings.Join(ids, ","))
+ engine.Exec(sql)
+ }
+
rsp = make([]QueryNewContentsRsp, 0)
session := engine.Table("SITE_COLUMNDETAIL T").
Select(`