PaymentCenter/app/data/pay_channel.go

15 lines
378 B
Go

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