正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -123,7 +123,7 @@ func GetUserCompanyIdAll(companyId int) (v []int64, err error) { | @@ -123,7 +123,7 @@ func GetUserCompanyIdAll(companyId int) (v []int64, err error) { | ||
123 | //@uid 表user.id | 123 | //@uid 表user.id |
124 | func GetUserAllCompany(uid int64) (v []*UserCompany, err error) { | 124 | func GetUserAllCompany(uid int64) (v []*UserCompany, err error) { |
125 | o := orm.NewOrm() | 125 | o := orm.NewOrm() |
126 | - sql := "select * from user_company a inner join company b on a.company_id=b.id where a.user_id=? and a.enable=1 and b.enable=1" //and enable=1 | 126 | + sql := "select a.* from user_company a inner join company b on a.company_id=b.id where a.user_id=? and a.enable=1 and b.enable=1" //and enable=1 |
127 | if _, err = o.Raw(sql, uid).QueryRows(&v); err == nil { | 127 | if _, err = o.Raw(sql, uid).QueryRows(&v); err == nil { |
128 | return v, nil | 128 | return v, nil |
129 | } | 129 | } |
-
请 注册 或 登录 后发表评论