You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<?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.epmet.dao.UserRoleDao">
|
|
|
|
|
|
|
|
<resultMap type="com.epmet.entity.UserRoleEntity" id="userRoleMap">
|
|
|
|
<result property="id" column="ID"/>
|
|
|
|
<result property="customerId" column="CUSTOMER_ID"/>
|
|
|
|
<result property="userId" column="USER_ID"/>
|
|
|
|
<result property="roleId" column="ROLE_ID"/>
|
|
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
|
|
<result property="revision" column="REVISION"/>
|
|
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getUserRoleInfo" parameterType="com.epmet.dto.form.UserRoleFormDTO" resultType="com.epmet.dto.result.UserRoleResultDTO" >
|
|
|
|
|
|
|
|
SELECT
|
|
|
|
DISTINCT
|
|
|
|
er.ROLE_NAME,
|
|
|
|
er.ROLE_KEY
|
|
|
|
FROM
|
|
|
|
USER_ROLE ur
|
|
|
|
JOIN EPMET_ROLE er ON ur.ROLE_ID = er.ID
|
|
|
|
<where>
|
|
|
|
er.DEL_FLAG = 0
|
|
|
|
AND
|
|
|
|
ur.DEL_FLAG = 0
|
|
|
|
AND
|
|
|
|
ur.USER_ID = #{userId}
|
|
|
|
<if test='null != app and "" != app'>
|
|
|
|
AND
|
|
|
|
er.APP = #{app}
|
|
|
|
</if>
|
|
|
|
<if test='null != customerId and "" != customerId'>
|
|
|
|
AND
|
|
|
|
ur.CUSTOMER_ID = #{customerId}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|