duojiyun/target/classes/mapper/RoleMenuMapper.xml

50 lines
1.7 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.RoleMenuMapper">
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.RoleMenu">
select * from role_menu
</select>
<insert id="insert">
INSERT INTO role_menu
(role_id, menu_id, create_by, create_time, update_by, update_time, invalid)
VALUES(#{roleId}, #{menuId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
</insert>
<update id="updateByPrimaryKey">
UPDATE role_menu
<set>
<if test="roleId!=null and roleId!='' ">
role_id = #{roleId},
</if>
<if test="menuId!=null and menuId!='' ">
menu_id = #{menuId},
</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_menu where id = #{id}
</delete>
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.RoleMenu">
select * from role_menu where id = #{id}
</select>
</mapper>