heheng
5 天以前 8b8ecaf63f03fe636c22ce9e8d8e7acd2a5e8255
排序改造
已修改3个文件
44 ■■■■■ 文件已修改
multi-system/src/main/java/com/gkhy/exam/system/mapper/SysDeptMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysDeptServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/resources/mapper/system/SysDeptMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
multi-system/src/main/java/com/gkhy/exam/system/mapper/SysDeptMapper.java
@@ -23,6 +23,8 @@
     */
    public List<DeptVo> selectDeptList(SysDept dept);
    int selectDeptListCount(SysDept dept);
    /**
     *
     * @param dept
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysDeptServiceImpl.java
@@ -72,7 +72,12 @@
            }
        }
        return CommonPage.restPage(deptVos);
        int i = deptMapper.selectDeptListCount(req);
        CommonPage<DeptVo> deptVoCommonPage = CommonPage.restPage(deptVos);
        int totalPage = (int) Math.ceil((double) i / deptVoCommonPage.getPageSize());
        deptVoCommonPage.setTotalPage(totalPage);
        deptVoCommonPage.setTotal(Long.valueOf( i));
        return deptVoCommonPage;
    }
multi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -80,8 +80,37 @@
        <if test="status != null and status != ''">
            AND d.status = #{status}
        </if>
        order by  d.order_num,d.parent_id
        order by  d.order_num
    </select>
    <select id="selectDeptListCount" parameterType="com.gkhy.exam.common.domain.entity.SysDept" resultType="int">
        select count(d.dept_id) as total
        from sys_dept d
        where d.del_flag = '0'
        <if test="companyId != null and companyId != 0">
            AND d.company_id = #{companyId}
        </if>
        <if test="deptType != null and deptType != '' " >
            AND d.dept_type = #{deptType}
        </if>
        <if test="responsType != null and responsType != '' " >
            AND d.respons_type = #{responsType}
        </if>
        <if test="deptId != null and deptId != 0">
            AND d.dept_id = #{deptId}
        </if>
        <if test="parentId != null and parentId != 0">
            AND d.parent_id = #{parentId}
        </if>
        <if test="deptName != null and deptName != ''">
            AND d.dept_name like concat('%', #{deptName}, '%')
        </if>
        <if test="status != null and status != ''">
            AND d.status = #{status}
        </if>
    </select>
    <select id="getOutDeptList" parameterType="com.gkhy.exam.common.domain.entity.SysDept" resultMap="SysDeptResult">
@@ -102,7 +131,7 @@
        <if test="status != null and status != ''">
            AND status = #{status}
        </if>
        order by  d.order_num,d.parent_id
        order by  d.order_num
    </select>
    
@@ -114,7 +143,7 @@
            <if test="deptCheckStrictly">
              and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
            </if>
        order by d.parent_id, d.order_num
        order by  d.order_num
    </select>
    
    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">