1234567891011121314151617 |
- package models
- import (
- "github.com/beego/beego/v2/client/orm"
- )
- type AdminMobileResp struct {
- Mobile string `description:"手机号"`
- }
- // 获取销售所能查看到的手机号
- func GetAdminByRole() (items []*AdminMobileResp, err error) {
- o := orm.NewOrm()
- sql := ` SELECT mobile FROM admin WHERE role = 'admin' `
- _, err = o.Raw(sql).QueryRows(&items)
- return
- }
|