<?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="cn.com.basic.dao.SysFunctionItemMapper" >
|
<resultMap id="BaseResultMap" type="cn.com.basic.entity.SysFunctionItem" >
|
<id column="id" property="id" jdbcType="VARCHAR" />
|
<result column="name" property="name" jdbcType="VARCHAR" />
|
<result column="pid" property="pid" jdbcType="VARCHAR" />
|
<result column="src_url" property="srcUrl" jdbcType="VARCHAR" />
|
<result column="target_url" property="targetUrl" jdbcType="VARCHAR" />
|
<result column="url_param" property="urlParam" jdbcType="VARCHAR" />
|
<result column="default_privilege" property="defaultPrivilege" jdbcType="BIGINT" />
|
<result column="order_num" property="orderNum" jdbcType="BIGINT" />
|
<result column="comment" property="comment" jdbcType="VARCHAR" />
|
<result column="status" property="status" jdbcType="TINYINT" />
|
<result column="is_valid" property="isValid" jdbcType="TINYINT" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="update_user_id" property="updateUserId" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Example_Where_Clause" >
|
<where >
|
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
<if test="criteria.valid" >
|
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
<foreach collection="criteria.criteria" item="criterion" >
|
<choose >
|
<when test="criterion.noValue" >
|
and ${criterion.condition}
|
</when>
|
<when test="criterion.singleValue" >
|
and ${criterion.condition} #{criterion.value}
|
</when>
|
<when test="criterion.betweenValue" >
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
</when>
|
<when test="criterion.listValue" >
|
and ${criterion.condition}
|
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
#{listItem}
|
</foreach>
|
</when>
|
</choose>
|
</foreach>
|
</trim>
|
</if>
|
</foreach>
|
</where>
|
</sql>
|
<sql id="Update_By_Example_Where_Clause" >
|
<where >
|
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
<if test="criteria.valid" >
|
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
<foreach collection="criteria.criteria" item="criterion" >
|
<choose >
|
<when test="criterion.noValue" >
|
and ${criterion.condition}
|
</when>
|
<when test="criterion.singleValue" >
|
and ${criterion.condition} #{criterion.value}
|
</when>
|
<when test="criterion.betweenValue" >
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
</when>
|
<when test="criterion.listValue" >
|
and ${criterion.condition}
|
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
#{listItem}
|
</foreach>
|
</when>
|
</choose>
|
</foreach>
|
</trim>
|
</if>
|
</foreach>
|
</where>
|
</sql>
|
<sql id="Base_Column_List" >
|
id, name, pid, src_url, target_url, url_param, default_privilege, order_num, comment,
|
status, is_valid, update_time, update_user_id
|
</sql>
|
<select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.com.basic.entity.SysFunctionItemExample" >
|
select
|
<if test="distinct" >
|
distinct
|
</if>
|
<include refid="Base_Column_List" />
|
from t_sys_function_item
|
<if test="_parameter != null" >
|
<include refid="Example_Where_Clause" />
|
</if>
|
<if test="orderByClause != null" >
|
order by ${orderByClause}
|
</if>
|
<if test="limitStart != null and limitStart>=0" >
|
limit #{limitStart} , #{limitEnd}
|
</if>
|
</select>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
select
|
<include refid="Base_Column_List" />
|
from t_sys_function_item
|
where id = #{id,jdbcType=VARCHAR}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
delete from t_sys_function_item
|
where id = #{id,jdbcType=VARCHAR}
|
</delete>
|
<delete id="deleteByExample" parameterType="cn.com.basic.entity.SysFunctionItemExample" >
|
delete from t_sys_function_item
|
<if test="_parameter != null" >
|
<include refid="Example_Where_Clause" />
|
</if>
|
</delete>
|
<insert id="insert" parameterType="cn.com.basic.entity.SysFunctionItem" >
|
insert into t_sys_function_item (id, name, pid,
|
src_url, target_url, url_param,
|
default_privilege, order_num, comment,
|
status, is_valid, update_time,
|
update_user_id)
|
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
#{srcUrl,jdbcType=VARCHAR}, #{targetUrl,jdbcType=VARCHAR}, #{urlParam,jdbcType=VARCHAR},
|
#{defaultPrivilege,jdbcType=BIGINT}, #{orderNum,jdbcType=BIGINT}, #{comment,jdbcType=VARCHAR},
|
#{status,jdbcType=TINYINT}, #{isValid,jdbcType=TINYINT}, #{updateTime,jdbcType=TIMESTAMP},
|
#{updateUserId,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="cn.com.basic.entity.SysFunctionItem" >
|
insert into t_sys_function_item
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="name != null" >
|
name,
|
</if>
|
<if test="pid != null" >
|
pid,
|
</if>
|
<if test="srcUrl != null" >
|
src_url,
|
</if>
|
<if test="targetUrl != null" >
|
target_url,
|
</if>
|
<if test="urlParam != null" >
|
url_param,
|
</if>
|
<if test="defaultPrivilege != null" >
|
default_privilege,
|
</if>
|
<if test="orderNum != null" >
|
order_num,
|
</if>
|
<if test="comment != null" >
|
comment,
|
</if>
|
<if test="status != null" >
|
status,
|
</if>
|
<if test="isValid != null" >
|
is_valid,
|
</if>
|
<if test="updateTime != null" >
|
update_time,
|
</if>
|
<if test="updateUserId != null" >
|
update_user_id,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=VARCHAR},
|
</if>
|
<if test="name != null" >
|
#{name,jdbcType=VARCHAR},
|
</if>
|
<if test="pid != null" >
|
#{pid,jdbcType=VARCHAR},
|
</if>
|
<if test="srcUrl != null" >
|
#{srcUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="targetUrl != null" >
|
#{targetUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="urlParam != null" >
|
#{urlParam,jdbcType=VARCHAR},
|
</if>
|
<if test="defaultPrivilege != null" >
|
#{defaultPrivilege,jdbcType=BIGINT},
|
</if>
|
<if test="orderNum != null" >
|
#{orderNum,jdbcType=BIGINT},
|
</if>
|
<if test="comment != null" >
|
#{comment,jdbcType=VARCHAR},
|
</if>
|
<if test="status != null" >
|
#{status,jdbcType=TINYINT},
|
</if>
|
<if test="isValid != null" >
|
#{isValid,jdbcType=TINYINT},
|
</if>
|
<if test="updateTime != null" >
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateUserId != null" >
|
#{updateUserId,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<select id="countByExample" parameterType="cn.com.basic.entity.SysFunctionItemExample" resultType="java.lang.Integer" >
|
select count(*) from t_sys_function_item
|
<if test="_parameter != null" >
|
<include refid="Example_Where_Clause" />
|
</if>
|
</select>
|
<update id="updateByExampleSelective" parameterType="map" >
|
update t_sys_function_item
|
<set >
|
<if test="record.id != null" >
|
id = #{record.id,jdbcType=VARCHAR},
|
</if>
|
<if test="record.name != null" >
|
name = #{record.name,jdbcType=VARCHAR},
|
</if>
|
<if test="record.pid != null" >
|
pid = #{record.pid,jdbcType=VARCHAR},
|
</if>
|
<if test="record.srcUrl != null" >
|
src_url = #{record.srcUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="record.targetUrl != null" >
|
target_url = #{record.targetUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="record.urlParam != null" >
|
url_param = #{record.urlParam,jdbcType=VARCHAR},
|
</if>
|
<if test="record.defaultPrivilege != null" >
|
default_privilege = #{record.defaultPrivilege,jdbcType=BIGINT},
|
</if>
|
<if test="record.orderNum != null" >
|
order_num = #{record.orderNum,jdbcType=BIGINT},
|
</if>
|
<if test="record.comment != null" >
|
comment = #{record.comment,jdbcType=VARCHAR},
|
</if>
|
<if test="record.status != null" >
|
status = #{record.status,jdbcType=TINYINT},
|
</if>
|
<if test="record.isValid != null" >
|
is_valid = #{record.isValid,jdbcType=TINYINT},
|
</if>
|
<if test="record.updateTime != null" >
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="record.updateUserId != null" >
|
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
</if>
|
</set>
|
<if test="_parameter != null" >
|
<include refid="Update_By_Example_Where_Clause" />
|
</if>
|
</update>
|
<update id="updateByExample" parameterType="map" >
|
update t_sys_function_item
|
set id = #{record.id,jdbcType=VARCHAR},
|
name = #{record.name,jdbcType=VARCHAR},
|
pid = #{record.pid,jdbcType=VARCHAR},
|
src_url = #{record.srcUrl,jdbcType=VARCHAR},
|
target_url = #{record.targetUrl,jdbcType=VARCHAR},
|
url_param = #{record.urlParam,jdbcType=VARCHAR},
|
default_privilege = #{record.defaultPrivilege,jdbcType=BIGINT},
|
order_num = #{record.orderNum,jdbcType=BIGINT},
|
comment = #{record.comment,jdbcType=VARCHAR},
|
status = #{record.status,jdbcType=TINYINT},
|
is_valid = #{record.isValid,jdbcType=TINYINT},
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
update_user_id = #{record.updateUserId,jdbcType=VARCHAR}
|
<if test="_parameter != null" >
|
<include refid="Update_By_Example_Where_Clause" />
|
</if>
|
</update>
|
<update id="updateByPrimaryKeySelective" parameterType="cn.com.basic.entity.SysFunctionItem" >
|
update t_sys_function_item
|
<set >
|
<if test="name != null" >
|
name = #{name,jdbcType=VARCHAR},
|
</if>
|
<if test="pid != null" >
|
pid = #{pid,jdbcType=VARCHAR},
|
</if>
|
<if test="srcUrl != null" >
|
src_url = #{srcUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="targetUrl != null" >
|
target_url = #{targetUrl,jdbcType=VARCHAR},
|
</if>
|
<if test="urlParam != null" >
|
url_param = #{urlParam,jdbcType=VARCHAR},
|
</if>
|
<if test="defaultPrivilege != null" >
|
default_privilege = #{defaultPrivilege,jdbcType=BIGINT},
|
</if>
|
<if test="orderNum != null" >
|
order_num = #{orderNum,jdbcType=BIGINT},
|
</if>
|
<if test="comment != null" >
|
comment = #{comment,jdbcType=VARCHAR},
|
</if>
|
<if test="status != null" >
|
status = #{status,jdbcType=TINYINT},
|
</if>
|
<if test="isValid != null" >
|
is_valid = #{isValid,jdbcType=TINYINT},
|
</if>
|
<if test="updateTime != null" >
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateUserId != null" >
|
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where id = #{id,jdbcType=VARCHAR}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="cn.com.basic.entity.SysFunctionItem" >
|
update t_sys_function_item
|
set name = #{name,jdbcType=VARCHAR},
|
pid = #{pid,jdbcType=VARCHAR},
|
src_url = #{srcUrl,jdbcType=VARCHAR},
|
target_url = #{targetUrl,jdbcType=VARCHAR},
|
url_param = #{urlParam,jdbcType=VARCHAR},
|
default_privilege = #{defaultPrivilege,jdbcType=BIGINT},
|
order_num = #{orderNum,jdbcType=BIGINT},
|
comment = #{comment,jdbcType=VARCHAR},
|
status = #{status,jdbcType=TINYINT},
|
is_valid = #{isValid,jdbcType=TINYINT},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
update_user_id = #{updateUserId,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
</update>
|
</mapper>
|