351 lines
13 KiB
XML
351 lines
13 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.joylink.ms.dao.OperateDefinitionDAO">
|
||
|
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.OperateDefinition">
|
||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||
|
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||
|
<result column="training_type" jdbcType="VARCHAR" property="trainingType" />
|
||
|
<result column="operate_type" jdbcType="VARCHAR" property="operateType" />
|
||
|
<result column="training_name" jdbcType="VARCHAR" property="trainingName" />
|
||
|
<result column="training_remark" jdbcType="VARCHAR" property="trainingRemark" />
|
||
|
<result column="min_duration" jdbcType="INTEGER" property="minDuration" />
|
||
|
<result column="max_duration" jdbcType="INTEGER" property="maxDuration" />
|
||
|
<result column="product_types" jdbcType="VARCHAR" property="productTypes" />
|
||
|
</resultMap>
|
||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.OperateDefinition">
|
||
|
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||
|
</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, map_id, training_type, operate_type, training_name, training_remark, min_duration,
|
||
|
max_duration, product_types
|
||
|
</sql>
|
||
|
<sql id="Blob_Column_List">
|
||
|
config
|
||
|
</sql>
|
||
|
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.OperateDefinitionExample" resultMap="ResultMapWithBLOBs">
|
||
|
select
|
||
|
<if test="distinct">
|
||
|
distinct
|
||
|
</if>
|
||
|
<include refid="Base_Column_List" />
|
||
|
,
|
||
|
<include refid="Blob_Column_List" />
|
||
|
from operate_definition
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
<if test="orderByClause != null">
|
||
|
order by ${orderByClause}
|
||
|
</if>
|
||
|
<if test="limit != null">
|
||
|
<if test="offset != null">
|
||
|
limit ${offset}, ${limit}
|
||
|
</if>
|
||
|
<if test="offset == null">
|
||
|
limit ${limit}
|
||
|
</if>
|
||
|
</if>
|
||
|
</select>
|
||
|
<select id="selectByExample" parameterType="com.joylink.ms.entity.OperateDefinitionExample" resultMap="BaseResultMap">
|
||
|
select
|
||
|
<if test="distinct">
|
||
|
distinct
|
||
|
</if>
|
||
|
<include refid="Base_Column_List" />
|
||
|
from operate_definition
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
<if test="orderByClause != null">
|
||
|
order by ${orderByClause}
|
||
|
</if>
|
||
|
<if test="limit != null">
|
||
|
<if test="offset != null">
|
||
|
limit ${offset}, ${limit}
|
||
|
</if>
|
||
|
<if test="offset == null">
|
||
|
limit ${limit}
|
||
|
</if>
|
||
|
</if>
|
||
|
</select>
|
||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||
|
select
|
||
|
<include refid="Base_Column_List" />
|
||
|
,
|
||
|
<include refid="Blob_Column_List" />
|
||
|
from operate_definition
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</select>
|
||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||
|
delete from operate_definition
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</delete>
|
||
|
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.OperateDefinitionExample">
|
||
|
delete from operate_definition
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
</delete>
|
||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.OperateDefinition" useGeneratedKeys="true">
|
||
|
insert into operate_definition (map_id, training_type, operate_type,
|
||
|
training_name, training_remark, min_duration,
|
||
|
max_duration, product_types, config
|
||
|
)
|
||
|
values (#{mapId,jdbcType=BIGINT}, #{trainingType,jdbcType=VARCHAR}, #{operateType,jdbcType=VARCHAR},
|
||
|
#{trainingName,jdbcType=VARCHAR}, #{trainingRemark,jdbcType=VARCHAR}, #{minDuration,jdbcType=INTEGER},
|
||
|
#{maxDuration,jdbcType=INTEGER}, #{productTypes,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR}
|
||
|
)
|
||
|
</insert>
|
||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.OperateDefinition" useGeneratedKeys="true">
|
||
|
insert into operate_definition
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="mapId != null">
|
||
|
map_id,
|
||
|
</if>
|
||
|
<if test="trainingType != null">
|
||
|
training_type,
|
||
|
</if>
|
||
|
<if test="operateType != null">
|
||
|
operate_type,
|
||
|
</if>
|
||
|
<if test="trainingName != null">
|
||
|
training_name,
|
||
|
</if>
|
||
|
<if test="trainingRemark != null">
|
||
|
training_remark,
|
||
|
</if>
|
||
|
<if test="minDuration != null">
|
||
|
min_duration,
|
||
|
</if>
|
||
|
<if test="maxDuration != null">
|
||
|
max_duration,
|
||
|
</if>
|
||
|
<if test="productTypes != null">
|
||
|
product_types,
|
||
|
</if>
|
||
|
<if test="config != null">
|
||
|
config,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="mapId != null">
|
||
|
#{mapId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="trainingType != null">
|
||
|
#{trainingType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="operateType != null">
|
||
|
#{operateType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="trainingName != null">
|
||
|
#{trainingName,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="trainingRemark != null">
|
||
|
#{trainingRemark,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="minDuration != null">
|
||
|
#{minDuration,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="maxDuration != null">
|
||
|
#{maxDuration,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="productTypes != null">
|
||
|
#{productTypes,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="config != null">
|
||
|
#{config,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
<select id="countByExample" parameterType="com.joylink.ms.entity.OperateDefinitionExample" resultType="java.lang.Long">
|
||
|
select count(*) from operate_definition
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Example_Where_Clause" />
|
||
|
</if>
|
||
|
</select>
|
||
|
<update id="updateByExampleSelective" parameterType="map">
|
||
|
update operate_definition
|
||
|
<set>
|
||
|
<if test="record.id != null">
|
||
|
id = #{record.id,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="record.mapId != null">
|
||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="record.trainingType != null">
|
||
|
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.operateType != null">
|
||
|
operate_type = #{record.operateType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.trainingName != null">
|
||
|
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.trainingRemark != null">
|
||
|
training_remark = #{record.trainingRemark,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.minDuration != null">
|
||
|
min_duration = #{record.minDuration,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="record.maxDuration != null">
|
||
|
max_duration = #{record.maxDuration,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="record.productTypes != null">
|
||
|
product_types = #{record.productTypes,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="record.config != null">
|
||
|
config = #{record.config,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
</set>
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||
|
update operate_definition
|
||
|
set id = #{record.id,jdbcType=BIGINT},
|
||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||
|
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||
|
operate_type = #{record.operateType,jdbcType=VARCHAR},
|
||
|
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
||
|
training_remark = #{record.trainingRemark,jdbcType=VARCHAR},
|
||
|
min_duration = #{record.minDuration,jdbcType=INTEGER},
|
||
|
max_duration = #{record.maxDuration,jdbcType=INTEGER},
|
||
|
product_types = #{record.productTypes,jdbcType=VARCHAR},
|
||
|
config = #{record.config,jdbcType=LONGVARCHAR}
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByExample" parameterType="map">
|
||
|
update operate_definition
|
||
|
set id = #{record.id,jdbcType=BIGINT},
|
||
|
map_id = #{record.mapId,jdbcType=BIGINT},
|
||
|
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||
|
operate_type = #{record.operateType,jdbcType=VARCHAR},
|
||
|
training_name = #{record.trainingName,jdbcType=VARCHAR},
|
||
|
training_remark = #{record.trainingRemark,jdbcType=VARCHAR},
|
||
|
min_duration = #{record.minDuration,jdbcType=INTEGER},
|
||
|
max_duration = #{record.maxDuration,jdbcType=INTEGER},
|
||
|
product_types = #{record.productTypes,jdbcType=VARCHAR}
|
||
|
<if test="_parameter != null">
|
||
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
</if>
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.OperateDefinition">
|
||
|
update operate_definition
|
||
|
<set>
|
||
|
<if test="mapId != null">
|
||
|
map_id = #{mapId,jdbcType=BIGINT},
|
||
|
</if>
|
||
|
<if test="trainingType != null">
|
||
|
training_type = #{trainingType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="operateType != null">
|
||
|
operate_type = #{operateType,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="trainingName != null">
|
||
|
training_name = #{trainingName,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="trainingRemark != null">
|
||
|
training_remark = #{trainingRemark,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="minDuration != null">
|
||
|
min_duration = #{minDuration,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="maxDuration != null">
|
||
|
max_duration = #{maxDuration,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="productTypes != null">
|
||
|
product_types = #{productTypes,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="config != null">
|
||
|
config = #{config,jdbcType=LONGVARCHAR},
|
||
|
</if>
|
||
|
</set>
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.OperateDefinition">
|
||
|
update operate_definition
|
||
|
set map_id = #{mapId,jdbcType=BIGINT},
|
||
|
training_type = #{trainingType,jdbcType=VARCHAR},
|
||
|
operate_type = #{operateType,jdbcType=VARCHAR},
|
||
|
training_name = #{trainingName,jdbcType=VARCHAR},
|
||
|
training_remark = #{trainingRemark,jdbcType=VARCHAR},
|
||
|
min_duration = #{minDuration,jdbcType=INTEGER},
|
||
|
max_duration = #{maxDuration,jdbcType=INTEGER},
|
||
|
product_types = #{productTypes,jdbcType=VARCHAR},
|
||
|
config = #{config,jdbcType=LONGVARCHAR}
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.OperateDefinition">
|
||
|
update operate_definition
|
||
|
set map_id = #{mapId,jdbcType=BIGINT},
|
||
|
training_type = #{trainingType,jdbcType=VARCHAR},
|
||
|
operate_type = #{operateType,jdbcType=VARCHAR},
|
||
|
training_name = #{trainingName,jdbcType=VARCHAR},
|
||
|
training_remark = #{trainingRemark,jdbcType=VARCHAR},
|
||
|
min_duration = #{minDuration,jdbcType=INTEGER},
|
||
|
max_duration = #{maxDuration,jdbcType=INTEGER},
|
||
|
product_types = #{productTypes,jdbcType=VARCHAR}
|
||
|
where id = #{id,jdbcType=BIGINT}
|
||
|
</update>
|
||
|
</mapper>
|