|
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="parentName" column="parent_name" />
|
|
<result property="parentName" column="parent_name" />
|
|
|
|
+ <result property="num" column="num" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
@@ -30,6 +31,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<select id="selectDeptList" parameterType="com.boman.domain.SysDept" resultMap="SysDeptResult">
|
|
<select id="selectDeptList" parameterType="com.boman.domain.SysDept" resultMap="SysDeptResult">
|
|
<include refid="selectDeptVo"/>
|
|
<include refid="selectDeptVo"/>
|
|
where d.del_flag = '0'
|
|
where d.del_flag = '0'
|
|
|
|
+ <if test="listByParentId != null and listByParentId == false">
|
|
|
|
+ AND (parent_id is null or parent_id = 0)
|
|
|
|
+ </if>
|
|
<if test="parentId != null and parentId != 0">
|
|
<if test="parentId != null and parentId != 0">
|
|
AND parent_id = #{parentId}
|
|
AND parent_id = #{parentId}
|
|
</if>
|
|
</if>
|
|
@@ -43,6 +47,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
order by d.parent_id, d.order_num
|
|
order by d.parent_id, d.order_num
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <select id="validateHasChirld" parameterType="java.util.List" resultMap="SysDeptResult">
|
|
|
|
+ SELECT a.id as id, count(1) as num FROM sys_dept a LEFT JOIN sys_dept b on a.id = b.parent_id WHERE b.parent_id in
|
|
|
|
+ <foreach collection="depts" item="dept" index="index" separator="," open="(" close=")">
|
|
|
|
+ #{dept.id}
|
|
|
|
+ </foreach>
|
|
|
|
+ GROUP BY a.id
|
|
|
|
+ </select>
|
|
|
|
|
|
<select id="selectDeptListById" resultType="java.lang.Integer">
|
|
<select id="selectDeptListById" resultType="java.lang.Integer">
|
|
select d.id
|
|
select d.id
|