54 lines
1.8 KiB
XML
54 lines
1.8 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.RoleMapper">
|
|
|
|
<select id="selectAll" resultType="com.bbyb.operating.examination.model.po.Role">
|
|
select * from role
|
|
</select>
|
|
|
|
|
|
<insert id="insert">
|
|
INSERT INTO role
|
|
(role_code, role_name, create_by, create_time, update_by, update_time, invalid)
|
|
VALUES(#{roleCode}, #{roleName}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{invalid})
|
|
</insert>
|
|
|
|
<update id="updateByPrimaryKey">
|
|
UPDATE role
|
|
<set>
|
|
<if test="roleCode!=null and roleCode!='' ">
|
|
role_code = #{roleCode},
|
|
</if>
|
|
<if test="roleName!=null and roleName!='' ">
|
|
role_name = #{roleName},
|
|
</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 where id = #{id}
|
|
</delete>
|
|
|
|
<select id="selectByPrimaryKey" resultType="com.bbyb.operating.examination.model.po.Role">
|
|
select * from role where id = #{id}
|
|
</select>
|
|
</mapper> |