Add the visit time feature.

This commit is contained in:
lishuang
2020-07-11 22:29:56 +08:00
parent da0e68f95c
commit 0d43439200
4 changed files with 65 additions and 53 deletions

View File

@ -348,7 +348,7 @@ func (this *MatterDao) Save(matter *Matter) *Matter {
//download time add 1
func (this *MatterDao) TimesIncrement(matterUuid string) {
db := core.CONTEXT.GetDB().Model(&Matter{}).Where("uuid = ?", matterUuid).Update("times", gorm.Expr("times + 1"))
db := core.CONTEXT.GetDB().Model(&Matter{}).Where("uuid = ?", matterUuid).Update(map[string]interface{}{"times": gorm.Expr("times + 1"), "visit_time": time.Now()})
this.PanicError(db.Error)
}