123456789101112131415161718192021222324252627282930 |
- package ficc_report
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type SmartReportResource struct {
- ResourceID int `gorm:"primaryKey;column:resource_id" json:"-"`
- ImgURL string `gorm:"column:img_url" json:"imgUrl"`
- ImgName string `gorm:"column:img_name" json:"imgName"`
- Type int `gorm:"column:type" json:"type"`
- CreateTime time.Time `gorm:"column:create_time" json:"createTime"`
- Style string `gorm:"column:style" json:"style"`
- }
- func GetResourceItemById(resourceId int) (item *SmartReportResource, err error) {
- o := orm.NewOrmUsingDB("rddp")
- sql := `SELECT * FROM smart_report_resource WHERE resource_id = ? `
- err = o.Raw(sql, resourceId).QueryRow(&item)
- return
- }
|