<?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.gxwebsoft.common.system.mapper.RoleMapper">
  <!-- 关联查询sql -->
  <sql id="selectSql">
    SELECT a.*
    FROM sys_role a
    <where>
      <if test="param.roleCode != null">
        AND a.role_code = #{param.roleCode}
      </if>
      <if test="param.tenantId != null">
        AND a.tenant_id = #{param.tenantId}
      </if>
    </where>
  </sql>
  <!-- 查询全部 -->
  <select id="selectListAll" resultType="com.gxwebsoft.common.system.entity.Role">
    <include refid="selectSql"></include>
  </select>

</mapper>
