You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
375 B
25 lines
375 B
package api
|
|
|
|
import (
|
|
"WechatGateWay/global"
|
|
"github.com/jinzhu/gorm"
|
|
)
|
|
|
|
/**
|
|
@author: sre
|
|
@date: 2022/9/12 0012
|
|
@desc: todo
|
|
**/
|
|
|
|
type BinancePrice struct {
|
|
gorm.Model
|
|
Symbol string
|
|
Price float64
|
|
}
|
|
|
|
func GetBinanceLatestPrice(symbol string) float64 {
|
|
var binancePrice BinancePrice
|
|
global.DB.Where("symbol = ?", symbol).Last(&binancePrice)
|
|
return binancePrice.Price
|
|
}
|