作者 tangxvhui

微调

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