<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.casic.missiles.modular.system.dao.DataScopeMapper">

    <select id="getDeptList" resultType="Map">
          SELECT  id  AS "id",pid AS "pid"
          FROM   sys_dept
    </select>


    <select id="getUserIdDataScope" resultType="Map">
        SELECT  srr.userid as "userId",dept_id  AS "deptid",sr.data_scope_type  AS "scopeType",datascope AS "dataScope"
        FROM sys_role  sr
        JOIN  sys_ru_relation  srr  ON srr.roleid=sr.id
    </select>

    <select id="getUserList" resultType="com.casic.missiles.modular.system.model.User">
        select *
        from sys_user
    </select>

</mapper>
