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.

28 lines
394 B

package api
import (
"WechatGateWay/global"
"github.com/jinzhu/gorm"
)
/*
*
@author: sre
@date: 2022/9/12 0012
@desc: todo
*
*/
type CMBGold struct {
gorm.Model
Variety string
CurPrice float64
UpDown float64
GoldNo string
}
func GetCMBGoldLatestPrice(goldNo string) float64 {
var cmbGold CMBGold
global.DB.Where("gold_no = ?", goldNo).Last(&cmbGold)
return cmbGold.CurPrice
}