Finish the logger maintain things.
This commit is contained in:
@ -6,8 +6,8 @@ import (
|
||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
||||
"github.com/nu7hatch/gouuid"
|
||||
"os"
|
||||
"time"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type MatterDao struct {
|
||||
@ -216,6 +216,12 @@ func (this *MatterDao) Save(matter *Matter) *Matter {
|
||||
return matter
|
||||
}
|
||||
|
||||
//计数器加一
|
||||
func (this *MatterDao) TimesIncrement(matterUuid string) {
|
||||
db := CONTEXT.DB.Model(&Matter{}).Where("uuid = ?", matterUuid).Update("times", gorm.Expr("times + 1"))
|
||||
this.PanicError(db.Error)
|
||||
}
|
||||
|
||||
//删除一个文件,数据库中删除,物理磁盘上删除。
|
||||
func (this *MatterDao) Delete(matter *Matter) {
|
||||
|
||||
|
Reference in New Issue
Block a user