57 lines
2.0 KiB
XML
57 lines
2.0 KiB
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.bbyb.operating.examination.mapper.RoleUserMapper">
|
|
|
|
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.RoleUser">
|
|
select * from role_user
|
|
</select>
|
|
|
|
<insert id="insert">
|
|
INSERT INTO role_user
|
|
(role_id, user_id, create_by, create_time, update_by, update_time, invalid)
|
|
VALUES(#{roleId}, #{userId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
|
|
</insert>
|
|
|
|
<update id="updateByPrimaryKey">
|
|
UPDATE role_user
|
|
<set>
|
|
<if test="roleId!=null and roleId!='' ">
|
|
role_id = #{roleId},
|
|
</if>
|
|
<if test="userId!=null and userId!='' ">
|
|
user_id = #{userId},
|
|
</if>
|
|
<if test="createBy!=null and createBy!='' ">
|
|
create_by = #{createBy},
|
|
</if>
|
|
<if test="createTime!=null ">
|
|
create_time = #{createTime},
|
|
</if>
|
|
<if test="updateBy!=null and updateBy!='' ">
|
|
update_by = #{updateBy},
|
|
</if>
|
|
<if test="updateTime!=null ">
|
|
update_time = #{updateTime},
|
|
</if>
|
|
<if test="updateBy!=null and updateBy!='' ">
|
|
update_by = #{updateBy},
|
|
</if>
|
|
<if test="invalid!=null and invalid!='' ">
|
|
invalid = #{invalid}
|
|
</if>
|
|
</set>
|
|
WHERE id = #{id};
|
|
</update>
|
|
|
|
<delete id="deleteByPrimaryKey">
|
|
delete from role_user where id = #{id}
|
|
</delete>
|
|
|
|
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.RoleUser">
|
|
select * from role_user where id = #{id}
|
|
</select>
|
|
<select id="getRoleUserByRoleId" resultType="com.bbyb.operating.examination.model.po.RoleUser">
|
|
select * from role_user where role_id = #{roleId}
|
|
</select>
|
|
</mapper>
|