...
|
...
|
@@ -123,7 +123,7 @@ func GetUserCompanyIdAll(companyId int) (v []int64, err error) { |
|
|
//@uid 表user.id
|
|
|
func GetUserAllCompany(uid int64) (v []*UserCompany, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
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
|
|
|
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
|
|
|
if _, err = o.Raw(sql, uid).QueryRows(&v); err == nil {
|
|
|
return v, nil
|
|
|
}
|
...
|
...
|
|