Files
gxtyzx-java/modules/common/system/mapper/xml/RoleMapper.xml
T
2024-08-13 17:51:18 +08:00

23 lines
701 B
XML

<?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>