|
@@ -12,19 +12,20 @@
|
|
<result column="create_time" property="createTime"/>
|
|
<result column="create_time" property="createTime"/>
|
|
<result column="role" property="role"/>
|
|
<result column="role" property="role"/>
|
|
<result column="company_id" property="companyId"/>
|
|
<result column="company_id" property="companyId"/>
|
|
- <result column="cost" property="cost"/>
|
|
|
|
<result column="department_id" property="departmentId"/>
|
|
<result column="department_id" property="departmentId"/>
|
|
|
|
+ <result column="department_cascade" property="departmentCascade"/>
|
|
|
|
+ <result column="cost" property="cost"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- id, name, phone, password, portrait_url, create_time, role, company_id, cost, department_id
|
|
|
|
|
|
+ id, name, phone, password, portrait_url, create_time, role, company_id, department_id, department_cascade, cost
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!--单独分页获取人员-->
|
|
<!--单独分页获取人员-->
|
|
<select id="getUserByDepartment" resultType="java.util.Map">
|
|
<select id="getUserByDepartment" resultType="java.util.Map">
|
|
SELECT a.id, a.name, a.phone, a.portrait_url AS portraitUrl, a.role, a.company_id AS companyId, a.cost,
|
|
SELECT a.id, a.name, a.phone, a.portrait_url AS portraitUrl, a.role, a.company_id AS companyId, a.cost,
|
|
- a.department_id AS departmentId, b.department_name AS departmentName
|
|
|
|
|
|
+ a.department_id AS departmentId, b.department_name AS departmentName, a.department_cascade AS departmentCascade
|
|
FROM user AS a
|
|
FROM user AS a
|
|
LEFT JOIN department AS b ON a.department_id = b.department_id
|
|
LEFT JOIN department AS b ON a.department_id = b.department_id
|
|
WHERE a.company_id = #{companyId}
|
|
WHERE a.company_id = #{companyId}
|
|
@@ -46,7 +47,7 @@
|
|
<!--范围分页获取人员-->
|
|
<!--范围分页获取人员-->
|
|
<select id="getUserByDepartmentList" resultType="java.util.Map">
|
|
<select id="getUserByDepartmentList" resultType="java.util.Map">
|
|
SELECT a.id, a.name, a.phone, a.portrait_url AS portraitUrl, a.role, a.company_id AS companyId, a.cost,
|
|
SELECT a.id, a.name, a.phone, a.portrait_url AS portraitUrl, a.role, a.company_id AS companyId, a.cost,
|
|
- a.department_id AS departmentId, b.department_name AS departmentName
|
|
|
|
|
|
+ a.department_id AS departmentId, b.department_name AS departmentName, a.department_cascade AS departmentCascade
|
|
FROM user AS a
|
|
FROM user AS a
|
|
LEFT JOIN department AS b ON a.department_id = b.department_id
|
|
LEFT JOIN department AS b ON a.department_id = b.department_id
|
|
WHERE a.company_id = #{companyId} AND a.department_id IN
|
|
WHERE a.company_id = #{companyId} AND a.department_id IN
|
|
@@ -64,4 +65,5 @@
|
|
#{departmentId}
|
|
#{departmentId}
|
|
</foreach>
|
|
</foreach>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
</mapper>
|
|
</mapper>
|