123456789101112131415161718192021222324 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type CompanySource struct {
- SourceId int `orm:"column(source_id);pk"`
- SourceName string `description:"来源名称"`
- }
- // 客户来源列表
- type CompanySourceListResp struct {
- List []*CompanySource `description:"客户来源列表"`
- }
- // 获取来源列表
- func GetAllCompanySourceList() (items []*CompanySource, err error) {
- sql := ``
- sql = `SELECT * FROM company_source ORDER BY sort DESC `
- o := orm.NewOrm()
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
|