fix time
This commit is contained in:
parent
32927ba169
commit
1c1f220922
|
@ -102,6 +102,7 @@ func (m *merchantModel) CountAll(id int64, name string, startTime string, endTim
|
|||
}
|
||||
|
||||
func (m *merchantModel) Create(merchant *Merchant) (affected int64, err error) {
|
||||
merchant.CreatedAt = time.Now()
|
||||
affected, err = m.GetDb().Insert(merchant)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -210,6 +210,7 @@ func (m *ordersModel) CountAll(
|
|||
}
|
||||
|
||||
func (m *ordersModel) Create(orders *Orders) (affected int64, err error) {
|
||||
orders.CreatedAt = time.Now()
|
||||
affected, err = m.GetDb().Insert(orders)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ func (m *productModel) CountAll(id int64, name string, startTime string, endTime
|
|||
}
|
||||
|
||||
func (m *productModel) Create(product *Product) (affected int64, err error) {
|
||||
product.CreatedAt = time.Now()
|
||||
affected, err = m.GetDb().Insert(product)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ func (m *whitelistModel) CountAll(id int64, merchant_id int64, ip string, startT
|
|||
}
|
||||
|
||||
func (m *whitelistModel) Create(whitelist *Whitelist) (affected int64, err error) {
|
||||
whitelist.CreatedAt = time.Now()
|
||||
affected, err = m.GetDb().Insert(whitelist)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue