This commit is contained in:
duyu 2024-07-16 09:32:37 +08:00
parent 32927ba169
commit 1c1f220922
4 changed files with 4 additions and 0 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}