From c23cb959e8ef5b7e79f7a9977a0f9b9ef77c65fb Mon Sep 17 00:00:00 2001 From: Minho Date: Thu, 22 Mar 2018 17:31:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=97=B6=E5=8C=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/document.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/document.go b/models/document.go index 50d186f3..dd1bff3b 100644 --- a/models/document.go +++ b/models/document.go @@ -84,6 +84,8 @@ func (m *Document) InsertOrUpdate(cols ...string) error { m.ModifyTime = time.Now().Local() _, err = o.Update(m) } else { + m.ModifyTime = time.Now().Local() + m.CreateTime = time.Now().Local() _, err = o.Insert(m) NewBook().ResetDocumentNumber(m.BookId) }