<?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.example.hotel.mapper.UserRoleRefMapper">
    <resultMap id="BaseResultMap" type="com.example.hotel.entity.UserRoleRef">
        <result column="user_id" jdbcType="INTEGER" property="userId"/>
        <result column="role_id" jdbcType="INTEGER" property="roleId"/>
    </resultMap>

    <delete id="deleteByUserId">
        DELETE
            FROM  `user_role_ref`
        WHERE user_id = #{value}
            AND del_flag = 0
  </delete>
</mapper>