PaymentCenter/app/data/order.go

12 lines
297 B
Go

package data
import "PaymentCenter/app/models/ordersmodel"
func GetOrderInfoById(id int64) (orderInfo ordersmodel.Orders, err error) {
_, err = ordersmodel.GetInstance().GetDb().Where("Id = ?", id).Get(&orderInfo)
if err != nil {
return ordersmodel.Orders{}, err
}
return orderInfo, nil
}