mirror of http://gitlab.batiao8.com/yic/film.git
createDate
This commit is contained in:
parent
dd327dc690
commit
3e2b24108e
|
@ -27,12 +27,14 @@ type Order struct {
|
||||||
CinemaName string
|
CinemaName string
|
||||||
MovieName string
|
MovieName string
|
||||||
Address string
|
Address string
|
||||||
|
CreateDate string
|
||||||
CreateTime int64
|
CreateTime int64
|
||||||
UpdateTime int64
|
UpdateTime int64
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddOrder(o *Order) (int64, error) {
|
func AddOrder(o *Order) (int64, error) {
|
||||||
o.CreateTime = time.Now().Unix()
|
o.CreateTime = time.Now().Unix()
|
||||||
|
o.CreateDate = time.Now().Format("2006-01-02")
|
||||||
res := db.Table(tableNameOrder).Create(o)
|
res := db.Table(tableNameOrder).Create(o)
|
||||||
return o.Id, res.Error
|
return o.Id, res.Error
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue