Commit eeee3157 authored by shiyu's avatar shiyu

打印标签

parent ce00e0d2
<?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.wwdz.ch.db.mapper.ItemTagOperateRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.ItemTagOperateRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="item_id" jdbcType="BIGINT" property="itemId" />
<result column="category_id" jdbcType="INTEGER" property="categoryId" />
<result column="category_name" jdbcType="VARCHAR" property="categoryName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="operator_id" jdbcType="BIGINT" property="operatorId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.ItemTagOperateRecord">
<result column="images" jdbcType="LONGVARCHAR" property="images" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
<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 close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, item_id, category_id, category_name, create_time, operator_id
</sql>
<sql id="Blob_Column_List">
images
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecordExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from item_tag_operate_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from item_tag_operate_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, item_id, category_id, category_name, create_time, operator_id, images
</otherwise>
</choose>
from item_tag_operate_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from item_tag_operate_record
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, item_id, category_id, category_name, create_time, operator_id, images
</otherwise>
</choose>
from item_tag_operate_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from item_tag_operate_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecordExample">
delete from item_tag_operate_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into item_tag_operate_record (item_id, category_id, category_name,
create_time, operator_id, images
)
values (#{itemId,jdbcType=BIGINT}, #{categoryId,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{operatorId,jdbcType=BIGINT}, #{images,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into item_tag_operate_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="itemId != null">
item_id,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="categoryName != null">
category_name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="images != null">
images,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemId != null">
#{itemId,jdbcType=BIGINT},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
<if test="categoryName != null">
#{categoryName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=BIGINT},
</if>
<if test="images != null">
#{images,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecordExample" resultType="java.lang.Long">
select count(*) from item_tag_operate_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update item_tag_operate_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.itemId != null">
item_id = #{record.itemId,jdbcType=BIGINT},
</if>
<if test="record.categoryId != null">
category_id = #{record.categoryId,jdbcType=INTEGER},
</if>
<if test="record.categoryName != null">
category_name = #{record.categoryName,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.operatorId != null">
operator_id = #{record.operatorId,jdbcType=BIGINT},
</if>
<if test="record.images != null">
images = #{record.images,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update item_tag_operate_record
set id = #{record.id,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
category_id = #{record.categoryId,jdbcType=INTEGER},
category_name = #{record.categoryName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
operator_id = #{record.operatorId,jdbcType=BIGINT},
images = #{record.images,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update item_tag_operate_record
set id = #{record.id,jdbcType=BIGINT},
item_id = #{record.itemId,jdbcType=BIGINT},
category_id = #{record.categoryId,jdbcType=INTEGER},
category_name = #{record.categoryName,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
operator_id = #{record.operatorId,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecord">
update item_tag_operate_record
<set>
<if test="itemId != null">
item_id = #{itemId,jdbcType=BIGINT},
</if>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=INTEGER},
</if>
<if test="categoryName != null">
category_name = #{categoryName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=BIGINT},
</if>
<if test="images != null">
images = #{images,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecord">
update item_tag_operate_record
set item_id = #{itemId,jdbcType=BIGINT},
category_id = #{categoryId,jdbcType=INTEGER},
category_name = #{categoryName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
operator_id = #{operatorId,jdbcType=BIGINT},
images = #{images,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecord">
update item_tag_operate_record
set item_id = #{itemId,jdbcType=BIGINT},
category_id = #{categoryId,jdbcType=INTEGER},
category_name = #{categoryName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
operator_id = #{operatorId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecordExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from item_tag_operate_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ItemTagOperateRecordExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from item_tag_operate_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, item_id, category_id, category_name, create_time, operator_id, images
</otherwise>
</choose>
from item_tag_operate_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment