作者 tangxvhui

微调

@@ -79,7 +79,8 @@ type ChanceTypeBase struct { @@ -79,7 +79,8 @@ type ChanceTypeBase struct {
79 } 79 }
80 80
81 type SelectCompanyUserListItem struct { 81 type SelectCompanyUserListItem struct {
82 - UserCompanyId int64 `json:"user_company_id" orm:"column(id)"` 82 + Id int64 `json:"id" orm:"column(id)"`
  83 + UserCompanyId int64 `json:"user_company_id" orm:"column(user_company_id)"`
83 NickName string `json:"nick_name" orm:"column(nick_name)"` 84 NickName string `json:"nick_name" orm:"column(nick_name)"`
84 DepartmentId int64 `json:"department_id" orm:"column(department_id)"` 85 DepartmentId int64 `json:"department_id" orm:"column(department_id)"`
85 DepartmentName string `json:"department_name" orm:"column(department_name)"` 86 DepartmentName string `json:"department_name" orm:"column(department_name)"`
@@ -184,7 +184,7 @@ func SeleteGetChanceTypeList(companyid int64) []protocol.ChanceTypeBase { @@ -184,7 +184,7 @@ func SeleteGetChanceTypeList(companyid int64) []protocol.ChanceTypeBase {
184 } 184 }
185 185
186 func SelectCompanyUserList(pageIndex int, pageSize int, companyid int64, userName string) protocol.SelectCompanyUserList { 186 func SelectCompanyUserList(pageIndex int, pageSize int, companyid int64, userName string) protocol.SelectCompanyUserList {
187 - datasql := `SELECT a.id,d.nick_name,c.name AS department_name,c.id AS department_id 187 + datasql := `SELECT b.id,a.id as user_company_id,d.nick_name,c.name AS department_name,c.id AS department_id
188 FROM user_company AS a 188 FROM user_company AS a
189 LEFT JOIN user_department AS b ON a.id = b.user_company_id 189 LEFT JOIN user_department AS b ON a.id = b.user_company_id
190 LEFT JOIN department AS c ON b.department_id = c.id 190 LEFT JOIN department AS c ON b.department_id = c.id