|
@@ -3,16 +3,16 @@ package models
|
|
|
import "github.com/beego/beego/v2/client/orm"
|
|
|
|
|
|
type CygxYanxuanSpecialCompany struct {
|
|
|
- Id int `orm:"column(id);pk"`
|
|
|
- TradeCode string // 交易代码
|
|
|
- SecName string // 公司名
|
|
|
- PyName string // 拼音名
|
|
|
- Region string // 地区
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ TradeCode string `json:"trade_code"` // 交易代码
|
|
|
+ SecName string `json:"sec_name"` // 公司名
|
|
|
+ PyName string `json:"py_name"` // 拼音名
|
|
|
+ Region string `json:"region"` // 地区
|
|
|
}
|
|
|
|
|
|
type VmpStocks struct {
|
|
|
Code int
|
|
|
- Msg string
|
|
|
+ Msg string
|
|
|
Data []CygxYanxuanSpecialCompany
|
|
|
}
|
|
|
|
|
@@ -26,11 +26,10 @@ func AddCygxYanxuanSpecialCompanyMulti(items []*CygxYanxuanSpecialCompany) (err
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
func GetYanxuanSpecialCompany(keyword string) (IndustryNames []string, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := ``
|
|
|
- sql = `SELECT sec_name FROM cygx_yanxuan_special_company WHERE sec_name LIKE '%`+keyword+`%' `
|
|
|
+ sql = `SELECT sec_name FROM cygx_yanxuan_special_company WHERE sec_name LIKE '%` + keyword + `%' `
|
|
|
_, err = o.Raw(sql).QueryRows(&IndustryNames)
|
|
|
return
|
|
|
-}
|
|
|
+}
|