|
@@ -63,7 +63,7 @@ FROM
|
63
|
63
|
if flashBuyStatus != "" {
|
64
|
64
|
sql += ` and a.flash_buy_status ='` + flashBuyStatus + `'`
|
65
|
65
|
}
|
66
|
|
- sql += ` order by a.start_date desc limit ` + strconv.Itoa(page-1) + `, ` + strconv.Itoa(pageSize)
|
|
66
|
+ sql += ` order by a.create_date desc limit ` + strconv.Itoa(page-1) + `, ` + strconv.Itoa(pageSize)
|
67
|
67
|
err := m.db.Sql(sql).Find(&flashBuy)
|
68
|
68
|
return flashBuy, err
|
69
|
69
|
}
|
|
@@ -101,6 +101,7 @@ func (m *FlashbuyDAO) GetFlashBuyById(flashBuyId string) (*model.TaFlashBuy, err
|
101
|
101
|
func (m *FlashbuyDAO) AddNewFlashBuy(flashbuy model.TaFlashBuy) (*model.TaFlashBuy, error) {
|
102
|
102
|
flashbuy.FlashBuyId = utils.GetGUID()
|
103
|
103
|
flashbuy.Status = models.STATUS_NORMAL
|
|
104
|
+ flashbuy.CreateDate = time.Now()
|
104
|
105
|
_, err := m.db.Insert(flashbuy)
|
105
|
106
|
return &flashbuy, err
|
106
|
107
|
}
|