作者 tangxvhui

bug 修复

... ... @@ -186,13 +186,13 @@ func SeleteGetChanceTypeList(companyid int64) []protocol.ChanceTypeBase {
func SelectCompanyUserList(pageIndex int, pageSize int, companyid int64, userName string) protocol.SelectCompanyUserList {
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 user_department AS b ON a.id = b.user_company_id and a.enable=1
LEFT JOIN department AS c ON b.department_id = c.id
LEFT JOIN user AS d ON a.user_id = d.id
WHERE a.delete_at = 0 AND c.company_id = ? `
WHERE a.delete_at = 0 AND c.company_id = ? `
countsql := `SELECT count(*)
FROM user_company AS a
LEFT JOIN user_department AS b ON a.id = b.user_company_id
LEFT JOIN user_department AS b ON a.id = b.user_company_id AND a.enable=1
LEFT JOIN department AS c ON b.department_id = c.id
LEFT JOIN user AS d ON a.user_id = d.id
WHERE a.delete_at = 0 AND c.company_id =? `
... ...