<?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.landtool.lanbase.modules.res.dao.RoleResCatalogMapper" >
|
<resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Role_ResCatalog" >
|
<id column="ID" property="id" jdbcType="INTEGER" />
|
<result column="ROLEID" property="roleid" jdbcType="INTEGER" />
|
<result column="CATALOGID" property="catalogid" jdbcType="INTEGER" />
|
<result column="CREATETIME" property="createtime" jdbcType="TIMESTAMP" />
|
<result column="STATUS" property="status" jdbcType="INTEGER" />
|
<result column="ADDUSERID" property="adduserid" jdbcType="INTEGER" />
|
</resultMap>
|
|
<select id="queryRoleResCatalogRel" resultType="com.landtool.lanbase.modules.res.entity.Role_ResCatalog" parameterType="com.landtool.lanbase.modules.res.entity.Role_ResCatalog">
|
SELECT
|
ID,
|
ROLEID,
|
CATALOGID,
|
CREATETIME,
|
STATUS,
|
ADDUSERID
|
FROM
|
ROLE_CATALOGID_REL
|
WHERE 1=1
|
<if test="roleid!=null and roleid!=''">
|
and ROLEID=#{roleid}
|
</if>
|
<if test="status!=null and status!=''">
|
and STATUS=#{status}
|
</if>
|
</select>
|
|
<insert id="insertRoleResCatalogRel" parameterType="com.landtool.lanbase.modules.res.entity.Role_ResCatalog" >
|
<selectKey keyProperty="id" resultType="java.lang.Integer" order="BEFORE">
|
select NEXTVAL('ROLE_CATALOGID_REL_INS_SEQ') from dual
|
</selectKey>
|
insert into ROLE_CATALOGID_REL
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="roleid != null" >
|
ROLEID,
|
</if>
|
<if test="id != null" >
|
ID,
|
</if>
|
<if test="catalogid != null" >
|
CATALOGID,
|
</if>
|
<if test="adduserid != null" >
|
ADDUSERID,
|
</if>
|
<if test="status != null" >
|
STATUS,
|
</if>
|
<if test="createtime != null" >
|
CREATETIME,
|
</if>
|
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="roleid != null" >
|
#{roleid},
|
</if>
|
<if test="id != null" >
|
#{id},
|
</if>
|
<if test="catalogid != null" >
|
#{catalogid},
|
</if>
|
<if test="adduserid != null" >
|
#{adduserid},
|
</if>
|
<if test="status != null" >
|
#{status},
|
</if>
|
<if test="createtime != null" >
|
#{createtime,jdbcType=TIMESTAMP},
|
</if>
|
|
</trim>
|
</insert>
|
|
<update id="updateRoleResCatalogRel" parameterType="com.landtool.lanbase.modules.res.entity.Role_ResCatalog" >
|
update ROLE_CATALOGID_REL
|
<set >
|
<if test="roleid != null" >
|
#{roleid,jdbcType=INTEGER},
|
</if>
|
<if test="catalogid != null" >
|
#{catalogid,jdbcType=INTEGER},
|
</if>
|
<if test="adduserid != null" >
|
#{adduserid,jdbcType=INTEGER},
|
</if>
|
<if test="status != null" >
|
#{status,jdbcType=INTEGER},
|
</if>
|
<if test="createtime != null" >
|
#{createtime,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where ID = #{id,jdbcType=INTEGER}
|
</update>
|
</mapper>
|