作者 yangfu

用户信息修改

@@ -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 }