轨道交通项目迁出
This commit is contained in:
parent
ee5c36469d
commit
4cc89f9c2d
|
@ -0,0 +1,276 @@
|
|||
<?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.CommandDefinitionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.CommandDefinition">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="line_code" jdbcType="VARCHAR" property="lineCode" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="simulation_role" jdbcType="VARCHAR" property="simulationRole" />
|
||||
<result column="control_mode" jdbcType="VARCHAR" property="controlMode" />
|
||||
<result column="operate_object" jdbcType="VARCHAR" property="operateObject" />
|
||||
<result column="operate" jdbcType="VARCHAR" property="operate" />
|
||||
<result column="conditions" jdbcType="VARCHAR" property="conditions" />
|
||||
<result column="params" jdbcType="VARCHAR" property="params" />
|
||||
</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, line_code, prd_type, simulation_role, control_mode, operate_object, operate,
|
||||
conditions, params
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.CommandDefinitionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from command_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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from command_definition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from command_definition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.CommandDefinitionExample">
|
||||
delete from command_definition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.CommandDefinition" useGeneratedKeys="true">
|
||||
insert into command_definition (line_code, prd_type, simulation_role,
|
||||
control_mode, operate_object, operate,
|
||||
conditions, params)
|
||||
values (#{lineCode,jdbcType=VARCHAR}, #{prdType,jdbcType=VARCHAR}, #{simulationRole,jdbcType=VARCHAR},
|
||||
#{controlMode,jdbcType=VARCHAR}, #{operateObject,jdbcType=VARCHAR}, #{operate,jdbcType=VARCHAR},
|
||||
#{conditions,jdbcType=VARCHAR}, #{params,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.CommandDefinition" useGeneratedKeys="true">
|
||||
insert into command_definition
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lineCode != null">
|
||||
line_code,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="simulationRole != null">
|
||||
simulation_role,
|
||||
</if>
|
||||
<if test="controlMode != null">
|
||||
control_mode,
|
||||
</if>
|
||||
<if test="operateObject != null">
|
||||
operate_object,
|
||||
</if>
|
||||
<if test="operate != null">
|
||||
operate,
|
||||
</if>
|
||||
<if test="conditions != null">
|
||||
conditions,
|
||||
</if>
|
||||
<if test="params != null">
|
||||
params,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lineCode != null">
|
||||
#{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="simulationRole != null">
|
||||
#{simulationRole,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="controlMode != null">
|
||||
#{controlMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operateObject != null">
|
||||
#{operateObject,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operate != null">
|
||||
#{operate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="conditions != null">
|
||||
#{conditions,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="params != null">
|
||||
#{params,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.CommandDefinitionExample" resultType="java.lang.Long">
|
||||
select count(*) from command_definition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update command_definition
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lineCode != null">
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.simulationRole != null">
|
||||
simulation_role = #{record.simulationRole,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.controlMode != null">
|
||||
control_mode = #{record.controlMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.operateObject != null">
|
||||
operate_object = #{record.operateObject,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.operate != null">
|
||||
operate = #{record.operate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.conditions != null">
|
||||
conditions = #{record.conditions,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.params != null">
|
||||
params = #{record.params,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update command_definition
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
simulation_role = #{record.simulationRole,jdbcType=VARCHAR},
|
||||
control_mode = #{record.controlMode,jdbcType=VARCHAR},
|
||||
operate_object = #{record.operateObject,jdbcType=VARCHAR},
|
||||
operate = #{record.operate,jdbcType=VARCHAR},
|
||||
conditions = #{record.conditions,jdbcType=VARCHAR},
|
||||
params = #{record.params,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.CommandDefinition">
|
||||
update command_definition
|
||||
<set>
|
||||
<if test="lineCode != null">
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="simulationRole != null">
|
||||
simulation_role = #{simulationRole,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="controlMode != null">
|
||||
control_mode = #{controlMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operateObject != null">
|
||||
operate_object = #{operateObject,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operate != null">
|
||||
operate = #{operate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="conditions != null">
|
||||
conditions = #{conditions,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="params != null">
|
||||
params = #{params,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.CommandDefinition">
|
||||
update command_definition
|
||||
set line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
simulation_role = #{simulationRole,jdbcType=VARCHAR},
|
||||
control_mode = #{controlMode,jdbcType=VARCHAR},
|
||||
operate_object = #{operateObject,jdbcType=VARCHAR},
|
||||
operate = #{operate,jdbcType=VARCHAR},
|
||||
conditions = #{conditions,jdbcType=VARCHAR},
|
||||
params = #{params,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,198 @@
|
|||
<?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.CompanyDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Company">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="address" jdbcType="VARCHAR" property="address" />
|
||||
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
||||
</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, `name`, address, phone
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.CompanyExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from company
|
||||
<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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from company
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from company
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.CompanyExample">
|
||||
delete from company
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Company" useGeneratedKeys="true">
|
||||
insert into company (`name`, address, phone
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Company" useGeneratedKeys="true">
|
||||
insert into company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="address != null">
|
||||
address,
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="address != null">
|
||||
#{address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
#{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.CompanyExample" resultType="java.lang.Long">
|
||||
select count(*) from company
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update company
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.address != null">
|
||||
address = #{record.address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.phone != null">
|
||||
phone = #{record.phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update company
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
address = #{record.address,jdbcType=VARCHAR},
|
||||
phone = #{record.phone,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Company">
|
||||
update company
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="address != null">
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="phone != null">
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Company">
|
||||
update company
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
address = #{address,jdbcType=VARCHAR},
|
||||
phone = #{phone,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,363 @@
|
|||
<?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.CompetitionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Competition">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="main" jdbcType="BIT" property="main" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="disposal_processes" jdbcType="VARCHAR" property="disposalProcesses" />
|
||||
<result column="operation_score" jdbcType="REAL" property="operationScore" />
|
||||
<result column="script_id" jdbcType="BIGINT" property="scriptId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.CompetitionWithBLOBs">
|
||||
<result column="steps_json" jdbcType="LONGVARCHAR" property="stepsJson" />
|
||||
<result column="command_evaluation_rules_json" jdbcType="LONGVARCHAR" property="commandEvaluationRulesJson" />
|
||||
<result column="operation_statistics_json" jdbcType="LONGVARCHAR" property="operationStatisticsJson" />
|
||||
<result column="operation_index_json" jdbcType="LONGVARCHAR" property="operationIndexJson" />
|
||||
</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, `name`, main, description, disposal_processes, operation_score, script_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
steps_json, command_evaluation_rules_json, operation_statistics_json, operation_index_json
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.CompetitionExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from competition
|
||||
<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.CompetitionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from competition
|
||||
<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 competition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from competition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.CompetitionExample">
|
||||
delete from competition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.CompetitionWithBLOBs" useGeneratedKeys="true">
|
||||
insert into competition (`name`, main, description,
|
||||
disposal_processes, operation_score, script_id,
|
||||
steps_json, command_evaluation_rules_json,
|
||||
operation_statistics_json, operation_index_json
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{main,jdbcType=BIT}, #{description,jdbcType=VARCHAR},
|
||||
#{disposalProcesses,jdbcType=VARCHAR}, #{operationScore,jdbcType=REAL}, #{scriptId,jdbcType=BIGINT},
|
||||
#{stepsJson,jdbcType=LONGVARCHAR}, #{commandEvaluationRulesJson,jdbcType=LONGVARCHAR},
|
||||
#{operationStatisticsJson,jdbcType=LONGVARCHAR}, #{operationIndexJson,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.CompetitionWithBLOBs" useGeneratedKeys="true">
|
||||
insert into competition
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="main != null">
|
||||
main,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="disposalProcesses != null">
|
||||
disposal_processes,
|
||||
</if>
|
||||
<if test="operationScore != null">
|
||||
operation_score,
|
||||
</if>
|
||||
<if test="scriptId != null">
|
||||
script_id,
|
||||
</if>
|
||||
<if test="stepsJson != null">
|
||||
steps_json,
|
||||
</if>
|
||||
<if test="commandEvaluationRulesJson != null">
|
||||
command_evaluation_rules_json,
|
||||
</if>
|
||||
<if test="operationStatisticsJson != null">
|
||||
operation_statistics_json,
|
||||
</if>
|
||||
<if test="operationIndexJson != null">
|
||||
operation_index_json,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="main != null">
|
||||
#{main,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="disposalProcesses != null">
|
||||
#{disposalProcesses,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operationScore != null">
|
||||
#{operationScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="scriptId != null">
|
||||
#{scriptId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stepsJson != null">
|
||||
#{stepsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="commandEvaluationRulesJson != null">
|
||||
#{commandEvaluationRulesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="operationStatisticsJson != null">
|
||||
#{operationStatisticsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="operationIndexJson != null">
|
||||
#{operationIndexJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.CompetitionExample" resultType="java.lang.Long">
|
||||
select count(*) from competition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update competition
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.main != null">
|
||||
main = #{record.main,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.disposalProcesses != null">
|
||||
disposal_processes = #{record.disposalProcesses,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.operationScore != null">
|
||||
operation_score = #{record.operationScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.scriptId != null">
|
||||
script_id = #{record.scriptId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.stepsJson != null">
|
||||
steps_json = #{record.stepsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.commandEvaluationRulesJson != null">
|
||||
command_evaluation_rules_json = #{record.commandEvaluationRulesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.operationStatisticsJson != null">
|
||||
operation_statistics_json = #{record.operationStatisticsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.operationIndexJson != null">
|
||||
operation_index_json = #{record.operationIndexJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update competition
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
main = #{record.main,jdbcType=BIT},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
disposal_processes = #{record.disposalProcesses,jdbcType=VARCHAR},
|
||||
operation_score = #{record.operationScore,jdbcType=REAL},
|
||||
script_id = #{record.scriptId,jdbcType=BIGINT},
|
||||
steps_json = #{record.stepsJson,jdbcType=LONGVARCHAR},
|
||||
command_evaluation_rules_json = #{record.commandEvaluationRulesJson,jdbcType=LONGVARCHAR},
|
||||
operation_statistics_json = #{record.operationStatisticsJson,jdbcType=LONGVARCHAR},
|
||||
operation_index_json = #{record.operationIndexJson,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update competition
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
main = #{record.main,jdbcType=BIT},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
disposal_processes = #{record.disposalProcesses,jdbcType=VARCHAR},
|
||||
operation_score = #{record.operationScore,jdbcType=REAL},
|
||||
script_id = #{record.scriptId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.CompetitionWithBLOBs">
|
||||
update competition
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="main != null">
|
||||
main = #{main,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="disposalProcesses != null">
|
||||
disposal_processes = #{disposalProcesses,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="operationScore != null">
|
||||
operation_score = #{operationScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="scriptId != null">
|
||||
script_id = #{scriptId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stepsJson != null">
|
||||
steps_json = #{stepsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="commandEvaluationRulesJson != null">
|
||||
command_evaluation_rules_json = #{commandEvaluationRulesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="operationStatisticsJson != null">
|
||||
operation_statistics_json = #{operationStatisticsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="operationIndexJson != null">
|
||||
operation_index_json = #{operationIndexJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.CompetitionWithBLOBs">
|
||||
update competition
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
main = #{main,jdbcType=BIT},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
disposal_processes = #{disposalProcesses,jdbcType=VARCHAR},
|
||||
operation_score = #{operationScore,jdbcType=REAL},
|
||||
script_id = #{scriptId,jdbcType=BIGINT},
|
||||
steps_json = #{stepsJson,jdbcType=LONGVARCHAR},
|
||||
command_evaluation_rules_json = #{commandEvaluationRulesJson,jdbcType=LONGVARCHAR},
|
||||
operation_statistics_json = #{operationStatisticsJson,jdbcType=LONGVARCHAR},
|
||||
operation_index_json = #{operationIndexJson,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Competition">
|
||||
update competition
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
main = #{main,jdbcType=BIT},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
disposal_processes = #{disposalProcesses,jdbcType=VARCHAR},
|
||||
operation_score = #{operationScore,jdbcType=REAL},
|
||||
script_id = #{scriptId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?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.CompetitionRecordDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.CompetitionRecord">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="competition_id" jdbcType="BIGINT" property="competitionId" />
|
||||
<result column="score" jdbcType="REAL" property="score" />
|
||||
<result column="date_time" jdbcType="TIMESTAMP" property="dateTime" />
|
||||
</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, user_id, competition_id, score, date_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.CompetitionRecordExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from competition_record
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from competition_record
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from competition_record
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.CompetitionRecordExample">
|
||||
delete from competition_record
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.CompetitionRecord" useGeneratedKeys="true">
|
||||
insert into competition_record (user_id, competition_id, score,
|
||||
date_time)
|
||||
values (#{userId,jdbcType=BIGINT}, #{competitionId,jdbcType=BIGINT}, #{score,jdbcType=REAL},
|
||||
#{dateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.CompetitionRecord" useGeneratedKeys="true">
|
||||
insert into competition_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="competitionId != null">
|
||||
competition_id,
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score,
|
||||
</if>
|
||||
<if test="dateTime != null">
|
||||
date_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="competitionId != null">
|
||||
#{competitionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
#{score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="dateTime != null">
|
||||
#{dateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.CompetitionRecordExample" resultType="java.lang.Long">
|
||||
select count(*) from competition_record
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update competition_record
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.competitionId != null">
|
||||
competition_id = #{record.competitionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.score != null">
|
||||
score = #{record.score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.dateTime != null">
|
||||
date_time = #{record.dateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update competition_record
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
competition_id = #{record.competitionId,jdbcType=BIGINT},
|
||||
score = #{record.score,jdbcType=REAL},
|
||||
date_time = #{record.dateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.CompetitionRecord">
|
||||
update competition_record
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="competitionId != null">
|
||||
competition_id = #{competitionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score = #{score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="dateTime != null">
|
||||
date_time = #{dateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.CompetitionRecord">
|
||||
update competition_record
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
competition_id = #{competitionId,jdbcType=BIGINT},
|
||||
score = #{score,jdbcType=REAL},
|
||||
date_time = #{dateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,278 @@
|
|||
<?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.DraftIbpDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftIbp">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="station_code" jdbcType="VARCHAR" property="stationCode" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftIbp">
|
||||
<result column="data" jdbcType="LONGVARCHAR" property="data" />
|
||||
</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, station_code, creator_id, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`data`
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftIbpExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_ibp
|
||||
<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.DraftIbpExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_ibp
|
||||
<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 draft_ibp
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_ibp
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftIbpExample">
|
||||
delete from draft_ibp
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftIbp" useGeneratedKeys="true">
|
||||
insert into draft_ibp (map_id, station_code, creator_id,
|
||||
create_time, `data`)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{stationCode,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{data,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftIbp" useGeneratedKeys="true">
|
||||
insert into draft_ibp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="data != null">
|
||||
`data`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
#{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
#{data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftIbpExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_ibp
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_ibp
|
||||
<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.stationCode != null">
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.data != null">
|
||||
`data` = #{record.data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_ibp
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
`data` = #{record.data,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_ibp
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftIbp">
|
||||
update draft_ibp
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
`data` = #{data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftIbp">
|
||||
update draft_ibp
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
`data` = #{data,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftIbp">
|
||||
update draft_ibp
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,357 @@
|
|||
<?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.DraftMap3dDataDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMap3dData">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMap3dDataWithBLOBs">
|
||||
<result column="assets" jdbcType="LONGVARCHAR" property="assets" />
|
||||
<result column="sections" jdbcType="LONGVARCHAR" property="sections" />
|
||||
<result column="switchs" jdbcType="LONGVARCHAR" property="switchs" />
|
||||
<result column="signals" jdbcType="LONGVARCHAR" property="signals" />
|
||||
<result column="stands" jdbcType="LONGVARCHAR" property="stands" />
|
||||
<result column="trains" jdbcType="LONGVARCHAR" property="trains" />
|
||||
</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, creator_id, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
assets, sections, switchs, signals, stands, trains
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMap3dDataExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_3d_data
|
||||
<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.DraftMap3dDataExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_3d_data
|
||||
<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 draft_map_3d_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_3d_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMap3dDataExample">
|
||||
delete from draft_map_3d_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMap3dDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into draft_map_3d_data (map_id, creator_id, create_time,
|
||||
update_time, assets, sections,
|
||||
switchs, signals, stands,
|
||||
trains)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{assets,jdbcType=LONGVARCHAR}, #{sections,jdbcType=LONGVARCHAR},
|
||||
#{switchs,jdbcType=LONGVARCHAR}, #{signals,jdbcType=LONGVARCHAR}, #{stands,jdbcType=LONGVARCHAR},
|
||||
#{trains,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMap3dDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into draft_map_3d_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="assets != null">
|
||||
assets,
|
||||
</if>
|
||||
<if test="sections != null">
|
||||
sections,
|
||||
</if>
|
||||
<if test="switchs != null">
|
||||
switchs,
|
||||
</if>
|
||||
<if test="signals != null">
|
||||
signals,
|
||||
</if>
|
||||
<if test="stands != null">
|
||||
stands,
|
||||
</if>
|
||||
<if test="trains != null">
|
||||
trains,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="assets != null">
|
||||
#{assets,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="sections != null">
|
||||
#{sections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="switchs != null">
|
||||
#{switchs,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="signals != null">
|
||||
#{signals,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stands != null">
|
||||
#{stands,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="trains != null">
|
||||
#{trains,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMap3dDataExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_3d_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_3d_data
|
||||
<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.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.assets != null">
|
||||
assets = #{record.assets,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.sections != null">
|
||||
sections = #{record.sections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.switchs != null">
|
||||
switchs = #{record.switchs,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.signals != null">
|
||||
signals = #{record.signals,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.stands != null">
|
||||
stands = #{record.stands,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.trains != null">
|
||||
trains = #{record.trains,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_3d_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
assets = #{record.assets,jdbcType=LONGVARCHAR},
|
||||
sections = #{record.sections,jdbcType=LONGVARCHAR},
|
||||
switchs = #{record.switchs,jdbcType=LONGVARCHAR},
|
||||
signals = #{record.signals,jdbcType=LONGVARCHAR},
|
||||
stands = #{record.stands,jdbcType=LONGVARCHAR},
|
||||
trains = #{record.trains,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_3d_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMap3dDataWithBLOBs">
|
||||
update draft_map_3d_data
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="assets != null">
|
||||
assets = #{assets,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="sections != null">
|
||||
sections = #{sections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="switchs != null">
|
||||
switchs = #{switchs,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="signals != null">
|
||||
signals = #{signals,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stands != null">
|
||||
stands = #{stands,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="trains != null">
|
||||
trains = #{trains,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMap3dDataWithBLOBs">
|
||||
update draft_map_3d_data
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
assets = #{assets,jdbcType=LONGVARCHAR},
|
||||
sections = #{sections,jdbcType=LONGVARCHAR},
|
||||
switchs = #{switchs,jdbcType=LONGVARCHAR},
|
||||
signals = #{signals,jdbcType=LONGVARCHAR},
|
||||
stands = #{stands,jdbcType=LONGVARCHAR},
|
||||
trains = #{trains,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMap3dData">
|
||||
update draft_map_3d_data
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.DraftMapAutoReentryDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapAutoReentry">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapAutoReentry">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, code, `name`, map_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapAutoReentryExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_auto_reentry
|
||||
<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.DraftMapAutoReentryExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_auto_reentry
|
||||
<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 draft_map_auto_reentry
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_auto_reentry
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapAutoReentryExample">
|
||||
delete from draft_map_auto_reentry
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapAutoReentry" useGeneratedKeys="true">
|
||||
insert into draft_map_auto_reentry (code, `name`, map_id,
|
||||
rel_data)
|
||||
values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT},
|
||||
#{relData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapAutoReentry" useGeneratedKeys="true">
|
||||
insert into draft_map_auto_reentry
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapAutoReentryExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_auto_reentry
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_auto_reentry
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_auto_reentry
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_auto_reentry
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapAutoReentry">
|
||||
update draft_map_auto_reentry
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapAutoReentry">
|
||||
update draft_map_auto_reentry
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapAutoReentry">
|
||||
update draft_map_auto_reentry
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.DraftMapAutoSignalDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapAutoSignal">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="signal_code" jdbcType="VARCHAR" property="signalCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapAutoSignal">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, code, signal_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapAutoSignalExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_auto_signal
|
||||
<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.DraftMapAutoSignalExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_auto_signal
|
||||
<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 draft_map_auto_signal
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_auto_signal
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapAutoSignalExample">
|
||||
delete from draft_map_auto_signal
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapAutoSignal" useGeneratedKeys="true">
|
||||
insert into draft_map_auto_signal (map_id, code, signal_code,
|
||||
rel_data)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{signalCode,jdbcType=VARCHAR},
|
||||
#{relData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapAutoSignal" useGeneratedKeys="true">
|
||||
insert into draft_map_auto_signal
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="signalCode != null">
|
||||
signal_code,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="signalCode != null">
|
||||
#{signalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapAutoSignalExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_auto_signal
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_auto_signal
|
||||
<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.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.signalCode != null">
|
||||
signal_code = #{record.signalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_auto_signal
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
signal_code = #{record.signalCode,jdbcType=VARCHAR},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_auto_signal
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
signal_code = #{record.signalCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapAutoSignal">
|
||||
update draft_map_auto_signal
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="signalCode != null">
|
||||
signal_code = #{signalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapAutoSignal">
|
||||
update draft_map_auto_signal
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
signal_code = #{signalCode,jdbcType=VARCHAR},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapAutoSignal">
|
||||
update draft_map_auto_signal
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
signal_code = #{signalCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,312 @@
|
|||
<?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.DraftMapDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMap">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="author_id" jdbcType="BIGINT" property="authorId" />
|
||||
<result column="line_code" jdbcType="VARCHAR" property="lineCode" />
|
||||
<result column="draw_way" jdbcType="BIT" property="drawWay" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapWithBLOBs">
|
||||
<result column="graph_data" jdbcType="LONGVARCHAR" property="graphData" />
|
||||
<result column="logic_data" jdbcType="LONGVARCHAR" property="logicData" />
|
||||
</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, `name`, update_time, author_id, line_code, draw_way
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
graph_data, logic_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map
|
||||
<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.DraftMapExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map
|
||||
<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 draft_map
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapExample">
|
||||
delete from draft_map
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapWithBLOBs" useGeneratedKeys="true">
|
||||
insert into draft_map (`name`, update_time, author_id,
|
||||
line_code, draw_way, graph_data,
|
||||
logic_data)
|
||||
values (#{name,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{authorId,jdbcType=BIGINT},
|
||||
#{lineCode,jdbcType=VARCHAR}, #{drawWay,jdbcType=BIT}, #{graphData,jdbcType=LONGVARCHAR},
|
||||
#{logicData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapWithBLOBs" useGeneratedKeys="true">
|
||||
insert into draft_map
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id,
|
||||
</if>
|
||||
<if test="lineCode != null">
|
||||
line_code,
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
draw_way,
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data,
|
||||
</if>
|
||||
<if test="logicData != null">
|
||||
logic_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
#{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="lineCode != null">
|
||||
#{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
#{drawWay,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
#{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="logicData != null">
|
||||
#{logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.authorId != null">
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lineCode != null">
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.drawWay != null">
|
||||
draw_way = #{record.drawWay,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.graphData != null">
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.logicData != null">
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{record.drawWay,jdbcType=BIT},
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{record.drawWay,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapWithBLOBs">
|
||||
update draft_map
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="lineCode != null">
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
draw_way = #{drawWay,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="logicData != null">
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapWithBLOBs">
|
||||
update draft_map
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{drawWay,jdbcType=BIT},
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMap">
|
||||
update draft_map
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
draw_way = #{drawWay,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.DraftMapOverlapDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapOverlap">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapOverlap">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, code, `name`, map_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapOverlapExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_overlap
|
||||
<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.DraftMapOverlapExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_overlap
|
||||
<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 draft_map_overlap
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_overlap
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapOverlapExample">
|
||||
delete from draft_map_overlap
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapOverlap" useGeneratedKeys="true">
|
||||
insert into draft_map_overlap (code, `name`, map_id,
|
||||
rel_data)
|
||||
values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT},
|
||||
#{relData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapOverlap" useGeneratedKeys="true">
|
||||
insert into draft_map_overlap
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapOverlapExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_overlap
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_overlap
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_overlap
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_overlap
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapOverlap">
|
||||
update draft_map_overlap
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapOverlap">
|
||||
update draft_map_overlap
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapOverlap">
|
||||
update draft_map_overlap
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,244 @@
|
|||
<?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.DraftMapParkingTimeDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapParkingTime">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="station_code" jdbcType="VARCHAR" property="stationCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapParkingTime">
|
||||
<result column="section_parking_time" jdbcType="LONGVARCHAR" property="sectionParkingTime" />
|
||||
</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, station_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
section_parking_time
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapParkingTimeExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_parking_time
|
||||
<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.DraftMapParkingTimeExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_parking_time
|
||||
<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 draft_map_parking_time
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_parking_time
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapParkingTimeExample">
|
||||
delete from draft_map_parking_time
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapParkingTime" useGeneratedKeys="true">
|
||||
insert into draft_map_parking_time (map_id, station_code, section_parking_time
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{stationCode,jdbcType=VARCHAR}, #{sectionParkingTime,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapParkingTime" useGeneratedKeys="true">
|
||||
insert into draft_map_parking_time
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code,
|
||||
</if>
|
||||
<if test="sectionParkingTime != null">
|
||||
section_parking_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
#{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sectionParkingTime != null">
|
||||
#{sectionParkingTime,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapParkingTimeExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_parking_time
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_parking_time
|
||||
<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.stationCode != null">
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.sectionParkingTime != null">
|
||||
section_parking_time = #{record.sectionParkingTime,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_parking_time
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
section_parking_time = #{record.sectionParkingTime,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_parking_time
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapParkingTime">
|
||||
update draft_map_parking_time
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="sectionParkingTime != null">
|
||||
section_parking_time = #{sectionParkingTime,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapParkingTime">
|
||||
update draft_map_parking_time
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
section_parking_time = #{sectionParkingTime,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapParkingTime">
|
||||
update draft_map_parking_time
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,331 @@
|
|||
<?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.DraftMapRouteDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapRoute">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="station_code" jdbcType="VARCHAR" property="stationCode" />
|
||||
<result column="start_signal_code" jdbcType="VARCHAR" property="startSignalCode" />
|
||||
<result column="end_signal_code" jdbcType="VARCHAR" property="endSignalCode" />
|
||||
<result column="near_section_code" jdbcType="VARCHAR" property="nearSectionCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapRoute">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, `name`, code, station_code, start_signal_code, end_signal_code, near_section_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRouteExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_route
|
||||
<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.DraftMapRouteExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_route
|
||||
<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 draft_map_route
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_route
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapRouteExample">
|
||||
delete from draft_map_route
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRoute" useGeneratedKeys="true">
|
||||
insert into draft_map_route (map_id, `name`, code,
|
||||
station_code, start_signal_code, end_signal_code,
|
||||
near_section_code, rel_data)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||||
#{stationCode,jdbcType=VARCHAR}, #{startSignalCode,jdbcType=VARCHAR}, #{endSignalCode,jdbcType=VARCHAR},
|
||||
#{nearSectionCode,jdbcType=VARCHAR}, #{relData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRoute" useGeneratedKeys="true">
|
||||
insert into draft_map_route
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code,
|
||||
</if>
|
||||
<if test="startSignalCode != null">
|
||||
start_signal_code,
|
||||
</if>
|
||||
<if test="endSignalCode != null">
|
||||
end_signal_code,
|
||||
</if>
|
||||
<if test="nearSectionCode != null">
|
||||
near_section_code,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
#{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSignalCode != null">
|
||||
#{startSignalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSignalCode != null">
|
||||
#{endSignalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nearSectionCode != null">
|
||||
#{nearSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapRouteExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_route
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_route
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.stationCode != null">
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startSignalCode != null">
|
||||
start_signal_code = #{record.startSignalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endSignalCode != null">
|
||||
end_signal_code = #{record.endSignalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nearSectionCode != null">
|
||||
near_section_code = #{record.nearSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_route
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
start_signal_code = #{record.startSignalCode,jdbcType=VARCHAR},
|
||||
end_signal_code = #{record.endSignalCode,jdbcType=VARCHAR},
|
||||
near_section_code = #{record.nearSectionCode,jdbcType=VARCHAR},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_route
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
start_signal_code = #{record.startSignalCode,jdbcType=VARCHAR},
|
||||
end_signal_code = #{record.endSignalCode,jdbcType=VARCHAR},
|
||||
near_section_code = #{record.nearSectionCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapRoute">
|
||||
update draft_map_route
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSignalCode != null">
|
||||
start_signal_code = #{startSignalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSignalCode != null">
|
||||
end_signal_code = #{endSignalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nearSectionCode != null">
|
||||
near_section_code = #{nearSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRoute">
|
||||
update draft_map_route
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
start_signal_code = #{startSignalCode,jdbcType=VARCHAR},
|
||||
end_signal_code = #{endSignalCode,jdbcType=VARCHAR},
|
||||
near_section_code = #{nearSectionCode,jdbcType=VARCHAR},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapRoute">
|
||||
update draft_map_route
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
start_signal_code = #{startSignalCode,jdbcType=VARCHAR},
|
||||
end_signal_code = #{endSignalCode,jdbcType=VARCHAR},
|
||||
near_section_code = #{nearSectionCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,297 @@
|
|||
<?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.DraftMapRouteFlankProtectionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapRouteFlankProtection">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="station_code" jdbcType="VARCHAR" property="stationCode" />
|
||||
<result column="number" jdbcType="VARCHAR" property="number" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapRouteFlankProtection">
|
||||
<result column="detail_data" jdbcType="LONGVARCHAR" property="detailData" />
|
||||
</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, code, station_code, `number`, `name`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
detail_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtectionExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_route_flank_protection
|
||||
<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.DraftMapRouteFlankProtectionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_route_flank_protection
|
||||
<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 draft_map_route_flank_protection
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_route_flank_protection
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtectionExample">
|
||||
delete from draft_map_route_flank_protection
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtection" useGeneratedKeys="true">
|
||||
insert into draft_map_route_flank_protection (map_id, code, station_code,
|
||||
`number`, `name`, detail_data
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR},
|
||||
#{number,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{detailData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtection" useGeneratedKeys="true">
|
||||
insert into draft_map_route_flank_protection
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code,
|
||||
</if>
|
||||
<if test="number != null">
|
||||
`number`,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="detailData != null">
|
||||
detail_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
#{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
#{number,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="detailData != null">
|
||||
#{detailData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtectionExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_route_flank_protection
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_route_flank_protection
|
||||
<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.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.stationCode != null">
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.number != null">
|
||||
`number` = #{record.number,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.detailData != null">
|
||||
detail_data = #{record.detailData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_route_flank_protection
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
`number` = #{record.number,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
detail_data = #{record.detailData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_route_flank_protection
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
`number` = #{record.number,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtection">
|
||||
update draft_map_route_flank_protection
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="number != null">
|
||||
`number` = #{number,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="detailData != null">
|
||||
detail_data = #{detailData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtection">
|
||||
update draft_map_route_flank_protection
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
`number` = #{number,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
detail_data = #{detailData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapRouteFlankProtection">
|
||||
update draft_map_route_flank_protection
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
`number` = #{number,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,278 @@
|
|||
<?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.DraftMapRouteUnitDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapRouteUnit">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="start_section_code" jdbcType="VARCHAR" property="startSectionCode" />
|
||||
<result column="end_section_code" jdbcType="VARCHAR" property="endSectionCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapRouteUnit">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, code, start_section_code, end_section_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRouteUnitExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_route_unit
|
||||
<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.DraftMapRouteUnitExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_route_unit
|
||||
<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 draft_map_route_unit
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_route_unit
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapRouteUnitExample">
|
||||
delete from draft_map_route_unit
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRouteUnit" useGeneratedKeys="true">
|
||||
insert into draft_map_route_unit (map_id, code, start_section_code,
|
||||
end_section_code, rel_data)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{startSectionCode,jdbcType=VARCHAR},
|
||||
#{endSectionCode,jdbcType=VARCHAR}, #{relData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRouteUnit" useGeneratedKeys="true">
|
||||
insert into draft_map_route_unit
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code,
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
#{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
#{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapRouteUnitExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_route_unit
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_route_unit
|
||||
<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.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startSectionCode != null">
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endSectionCode != null">
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_route_unit
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_route_unit
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapRouteUnit">
|
||||
update draft_map_route_unit
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRouteUnit">
|
||||
update draft_map_route_unit
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapRouteUnit">
|
||||
update draft_map_route_unit
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,404 @@
|
|||
<?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.DraftMapRoutingDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapRouting">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="start_station_code" jdbcType="VARCHAR" property="startStationCode" />
|
||||
<result column="start_section_code" jdbcType="VARCHAR" property="startSectionCode" />
|
||||
<result column="end_station_code" jdbcType="VARCHAR" property="endStationCode" />
|
||||
<result column="end_section_code" jdbcType="VARCHAR" property="endSectionCode" />
|
||||
<result column="direction_code" jdbcType="VARCHAR" property="directionCode" />
|
||||
<result column="right" jdbcType="BIT" property="right" />
|
||||
<result column="destination_code" jdbcType="VARCHAR" property="destinationCode" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapRouting">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, `name`, code, start_station_code, start_section_code, end_station_code,
|
||||
end_section_code, direction_code, `right`, destination_code, remarks
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRoutingExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_routing
|
||||
<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.DraftMapRoutingExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_routing
|
||||
<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 draft_map_routing
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_routing
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapRoutingExample">
|
||||
delete from draft_map_routing
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRouting" useGeneratedKeys="true">
|
||||
insert into draft_map_routing (map_id, `name`, code,
|
||||
start_station_code, start_section_code, end_station_code,
|
||||
end_section_code, direction_code, `right`,
|
||||
destination_code, remarks, rel_data
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||||
#{startStationCode,jdbcType=VARCHAR}, #{startSectionCode,jdbcType=VARCHAR}, #{endStationCode,jdbcType=VARCHAR},
|
||||
#{endSectionCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR}, #{right,jdbcType=BIT},
|
||||
#{destinationCode,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{relData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRouting" useGeneratedKeys="true">
|
||||
insert into draft_map_routing
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
start_station_code,
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code,
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
end_station_code,
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code,
|
||||
</if>
|
||||
<if test="directionCode != null">
|
||||
direction_code,
|
||||
</if>
|
||||
<if test="right != null">
|
||||
`right`,
|
||||
</if>
|
||||
<if test="destinationCode != null">
|
||||
destination_code,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
#{startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
#{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
#{endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
#{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="directionCode != null">
|
||||
#{directionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="right != null">
|
||||
#{right,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="destinationCode != null">
|
||||
#{destinationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapRoutingExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_routing
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_routing
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startStationCode != null">
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startSectionCode != null">
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endStationCode != null">
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endSectionCode != null">
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.directionCode != null">
|
||||
direction_code = #{record.directionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.right != null">
|
||||
`right` = #{record.right,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.destinationCode != null">
|
||||
destination_code = #{record.destinationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_routing
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
direction_code = #{record.directionCode,jdbcType=VARCHAR},
|
||||
`right` = #{record.right,jdbcType=BIT},
|
||||
destination_code = #{record.destinationCode,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_routing
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
direction_code = #{record.directionCode,jdbcType=VARCHAR},
|
||||
`right` = #{record.right,jdbcType=BIT},
|
||||
destination_code = #{record.destinationCode,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapRouting">
|
||||
update draft_map_routing
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="directionCode != null">
|
||||
direction_code = #{directionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="right != null">
|
||||
`right` = #{right,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="destinationCode != null">
|
||||
destination_code = #{destinationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRouting">
|
||||
update draft_map_routing
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
direction_code = #{directionCode,jdbcType=VARCHAR},
|
||||
`right` = #{right,jdbcType=BIT},
|
||||
destination_code = #{destinationCode,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapRouting">
|
||||
update draft_map_routing
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
direction_code = #{directionCode,jdbcType=VARCHAR},
|
||||
`right` = #{right,jdbcType=BIT},
|
||||
destination_code = #{destinationCode,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.DraftMapRunLevelDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapRunLevel">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="start_section_code" jdbcType="VARCHAR" property="startSectionCode" />
|
||||
<result column="end_section_code" jdbcType="VARCHAR" property="endSectionCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapRunLevel">
|
||||
<result column="run_level_data" jdbcType="LONGVARCHAR" property="runLevelData" />
|
||||
</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, start_section_code, end_section_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
run_level_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRunLevelExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_run_level
|
||||
<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.DraftMapRunLevelExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_run_level
|
||||
<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 draft_map_run_level
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_run_level
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapRunLevelExample">
|
||||
delete from draft_map_run_level
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRunLevel" useGeneratedKeys="true">
|
||||
insert into draft_map_run_level (map_id, start_section_code, end_section_code,
|
||||
run_level_data)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{startSectionCode,jdbcType=VARCHAR}, #{endSectionCode,jdbcType=VARCHAR},
|
||||
#{runLevelData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRunLevel" useGeneratedKeys="true">
|
||||
insert into draft_map_run_level
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code,
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code,
|
||||
</if>
|
||||
<if test="runLevelData != null">
|
||||
run_level_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
#{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
#{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="runLevelData != null">
|
||||
#{runLevelData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapRunLevelExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_run_level
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_run_level
|
||||
<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.startSectionCode != null">
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endSectionCode != null">
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.runLevelData != null">
|
||||
run_level_data = #{record.runLevelData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_run_level
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
run_level_data = #{record.runLevelData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_run_level
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapRunLevel">
|
||||
update draft_map_run_level
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="runLevelData != null">
|
||||
run_level_data = #{runLevelData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRunLevel">
|
||||
update draft_map_run_level
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
run_level_data = #{runLevelData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapRunLevel">
|
||||
update draft_map_run_level
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.DraftMapRunPlanDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapRunPlan">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapRunPlan">
|
||||
<result column="trips" jdbcType="LONGVARCHAR" property="trips" />
|
||||
</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, `name`, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
trips
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRunPlanExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_run_plan
|
||||
<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.DraftMapRunPlanExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_run_plan
|
||||
<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 draft_map_run_plan
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_run_plan
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapRunPlanExample">
|
||||
delete from draft_map_run_plan
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRunPlan" useGeneratedKeys="true">
|
||||
insert into draft_map_run_plan (map_id, `name`, create_time,
|
||||
trips)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{trips,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapRunPlan" useGeneratedKeys="true">
|
||||
insert into draft_map_run_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
#{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapRunPlanExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_run_plan
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_run_plan
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.trips != null">
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_run_plan
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_run_plan
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapRunPlan">
|
||||
update draft_map_run_plan
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips = #{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapRunPlan">
|
||||
update draft_map_run_plan
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
trips = #{trips,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapRunPlan">
|
||||
update draft_map_run_plan
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,244 @@
|
|||
<?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.DraftMapSignalApproachSectionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapSignalApproachSection">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="signal_code" jdbcType="VARCHAR" property="signalCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.DraftMapSignalApproachSection">
|
||||
<result column="rel_data" jdbcType="LONGVARCHAR" property="relData" />
|
||||
</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, signal_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
rel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSectionExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from draft_map_signal_approach_section
|
||||
<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.DraftMapSignalApproachSectionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_signal_approach_section
|
||||
<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 draft_map_signal_approach_section
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_signal_approach_section
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSectionExample">
|
||||
delete from draft_map_signal_approach_section
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSection" useGeneratedKeys="true">
|
||||
insert into draft_map_signal_approach_section (map_id, signal_code, rel_data
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{signalCode,jdbcType=VARCHAR}, #{relData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSection" useGeneratedKeys="true">
|
||||
insert into draft_map_signal_approach_section
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="signalCode != null">
|
||||
signal_code,
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="signalCode != null">
|
||||
#{signalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
#{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSectionExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_signal_approach_section
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_signal_approach_section
|
||||
<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.signalCode != null">
|
||||
signal_code = #{record.signalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.relData != null">
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update draft_map_signal_approach_section
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
signal_code = #{record.signalCode,jdbcType=VARCHAR},
|
||||
rel_data = #{record.relData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_signal_approach_section
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
signal_code = #{record.signalCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSection">
|
||||
update draft_map_signal_approach_section
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="signalCode != null">
|
||||
signal_code = #{signalCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="relData != null">
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSection">
|
||||
update draft_map_signal_approach_section
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
signal_code = #{signalCode,jdbcType=VARCHAR},
|
||||
rel_data = #{relData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapSignalApproachSection">
|
||||
update draft_map_signal_approach_section
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
signal_code = #{signalCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,198 @@
|
|||
<?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.DraftMapSwitchCoupledDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.DraftMapSwitchCoupled">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="switcha_code" jdbcType="VARCHAR" property="switchaCode" />
|
||||
<result column="switchb_code" jdbcType="VARCHAR" property="switchbCode" />
|
||||
</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, switcha_code, switchb_code
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupledExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_switch_coupled
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from draft_map_switch_coupled
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from draft_map_switch_coupled
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupledExample">
|
||||
delete from draft_map_switch_coupled
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupled" useGeneratedKeys="true">
|
||||
insert into draft_map_switch_coupled (map_id, switcha_code, switchb_code
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{switchaCode,jdbcType=VARCHAR}, #{switchbCode,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupled" useGeneratedKeys="true">
|
||||
insert into draft_map_switch_coupled
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="switchaCode != null">
|
||||
switcha_code,
|
||||
</if>
|
||||
<if test="switchbCode != null">
|
||||
switchb_code,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="switchaCode != null">
|
||||
#{switchaCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="switchbCode != null">
|
||||
#{switchbCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupledExample" resultType="java.lang.Long">
|
||||
select count(*) from draft_map_switch_coupled
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update draft_map_switch_coupled
|
||||
<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.switchaCode != null">
|
||||
switcha_code = #{record.switchaCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.switchbCode != null">
|
||||
switchb_code = #{record.switchbCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update draft_map_switch_coupled
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
switcha_code = #{record.switchaCode,jdbcType=VARCHAR},
|
||||
switchb_code = #{record.switchbCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupled">
|
||||
update draft_map_switch_coupled
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="switchaCode != null">
|
||||
switcha_code = #{switchaCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="switchbCode != null">
|
||||
switchb_code = #{switchbCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.DraftMapSwitchCoupled">
|
||||
update draft_map_switch_coupled
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
switcha_code = #{switchaCode,jdbcType=VARCHAR},
|
||||
switchb_code = #{switchbCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,355 @@
|
|||
<?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.ExamDefinitionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.ExamDefinition">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="duration" jdbcType="INTEGER" property="duration" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="full_point" jdbcType="INTEGER" property="fullPoint" />
|
||||
<result column="passing_point" jdbcType="INTEGER" property="passingPoint" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="trial" jdbcType="BIT" property="trial" />
|
||||
</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, lesson_id, `name`, `type`, duration, start_time, end_time, full_point, passing_point,
|
||||
creator_id, create_time, remarks, `status`, trial
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.ExamDefinitionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_definition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from exam_definition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ExamDefinitionExample">
|
||||
delete from exam_definition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ExamDefinition" useGeneratedKeys="true">
|
||||
insert into exam_definition (lesson_id, `name`, `type`,
|
||||
duration, start_time, end_time,
|
||||
full_point, passing_point, creator_id,
|
||||
create_time, remarks, `status`,
|
||||
trial)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{duration,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
||||
#{fullPoint,jdbcType=INTEGER}, #{passingPoint,jdbcType=INTEGER}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{trial,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ExamDefinition" useGeneratedKeys="true">
|
||||
insert into exam_definition
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
duration,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="fullPoint != null">
|
||||
full_point,
|
||||
</if>
|
||||
<if test="passingPoint != null">
|
||||
passing_point,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
#{duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="fullPoint != null">
|
||||
#{fullPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingPoint != null">
|
||||
#{passingPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
#{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ExamDefinitionExample" resultType="java.lang.Long">
|
||||
select count(*) from exam_definition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update exam_definition
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.duration != null">
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.fullPoint != null">
|
||||
full_point = #{record.fullPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.passingPoint != null">
|
||||
passing_point = #{record.passingPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trial != null">
|
||||
trial = #{record.trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update exam_definition
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
full_point = #{record.fullPoint,jdbcType=INTEGER},
|
||||
passing_point = #{record.passingPoint,jdbcType=INTEGER},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
trial = #{record.trial,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ExamDefinition">
|
||||
update exam_definition
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="fullPoint != null">
|
||||
full_point = #{fullPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingPoint != null">
|
||||
passing_point = #{passingPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial = #{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.ExamDefinition">
|
||||
update exam_definition
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
full_point = #{fullPoint,jdbcType=INTEGER},
|
||||
passing_point = #{passingPoint,jdbcType=INTEGER},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
trial = #{trial,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,361 @@
|
|||
<?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.ExamDefinitionMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.ExamDefinition">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="duration" jdbcType="INTEGER" property="duration" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="full_point" jdbcType="INTEGER" property="fullPoint" />
|
||||
<result column="passing_point" jdbcType="INTEGER" property="passingPoint" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="trial" jdbcType="BIT" property="trial" />
|
||||
</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, lesson_id, name, type, duration, start_time, end_time, full_point, passing_point,
|
||||
creator_id, create_time, remarks, status, trial
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.ExamDefinitionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_definition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from exam_definition
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ExamDefinitionExample">
|
||||
delete from exam_definition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.ExamDefinition">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into exam_definition (lesson_id, name, type,
|
||||
duration, start_time, end_time,
|
||||
full_point, passing_point, creator_id,
|
||||
create_time, remarks, status,
|
||||
trial)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{duration,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
||||
#{fullPoint,jdbcType=INTEGER}, #{passingPoint,jdbcType=INTEGER}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{trial,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.ExamDefinition">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into exam_definition
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
duration,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="fullPoint != null">
|
||||
full_point,
|
||||
</if>
|
||||
<if test="passingPoint != null">
|
||||
passing_point,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
#{duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="fullPoint != null">
|
||||
#{fullPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingPoint != null">
|
||||
#{passingPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
#{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ExamDefinitionExample" resultType="java.lang.Long">
|
||||
select count(*) from exam_definition
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update exam_definition
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.duration != null">
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.fullPoint != null">
|
||||
full_point = #{record.fullPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.passingPoint != null">
|
||||
passing_point = #{record.passingPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trial != null">
|
||||
trial = #{record.trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update exam_definition
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
duration = #{record.duration,jdbcType=INTEGER},
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
full_point = #{record.fullPoint,jdbcType=INTEGER},
|
||||
passing_point = #{record.passingPoint,jdbcType=INTEGER},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
trial = #{record.trial,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ExamDefinition">
|
||||
update exam_definition
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="duration != null">
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="fullPoint != null">
|
||||
full_point = #{fullPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingPoint != null">
|
||||
passing_point = #{passingPoint,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial = #{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.ExamDefinition">
|
||||
update exam_definition
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
duration = #{duration,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
full_point = #{fullPoint,jdbcType=INTEGER},
|
||||
passing_point = #{passingPoint,jdbcType=INTEGER},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
trial = #{trial,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.ExamDefinitionRulesDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="exam_id" jdbcType="BIGINT" property="examId" />
|
||||
<result column="training_type" jdbcType="VARCHAR" property="trainingType" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="point" jdbcType="INTEGER" property="point" />
|
||||
<result column="operate_type" jdbcType="VARCHAR" property="operateType" />
|
||||
</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, exam_id, training_type, num, point, operate_type
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.ExamDefinitionRulesExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_definition_rules
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_definition_rules
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from exam_definition_rules
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ExamDefinitionRulesExample">
|
||||
delete from exam_definition_rules
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ExamDefinitionRules" useGeneratedKeys="true">
|
||||
insert into exam_definition_rules (exam_id, training_type, num,
|
||||
point, operate_type)
|
||||
values (#{examId,jdbcType=BIGINT}, #{trainingType,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{point,jdbcType=INTEGER}, #{operateType,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ExamDefinitionRules" useGeneratedKeys="true">
|
||||
insert into exam_definition_rules
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="examId != null">
|
||||
exam_id,
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
training_type,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="point != null">
|
||||
point,
|
||||
</if>
|
||||
<if test="operateType != null">
|
||||
operate_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="examId != null">
|
||||
#{examId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
#{trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="point != null">
|
||||
#{point,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operateType != null">
|
||||
#{operateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ExamDefinitionRulesExample" resultType="java.lang.Long">
|
||||
select count(*) from exam_definition_rules
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update exam_definition_rules
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.examId != null">
|
||||
exam_id = #{record.examId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trainingType != null">
|
||||
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.point != null">
|
||||
point = #{record.point,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.operateType != null">
|
||||
operate_type = #{record.operateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update exam_definition_rules
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
exam_id = #{record.examId,jdbcType=BIGINT},
|
||||
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
point = #{record.point,jdbcType=INTEGER},
|
||||
operate_type = #{record.operateType,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
update exam_definition_rules
|
||||
<set>
|
||||
<if test="examId != null">
|
||||
exam_id = #{examId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
training_type = #{trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="point != null">
|
||||
point = #{point,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operateType != null">
|
||||
operate_type = #{operateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
update exam_definition_rules
|
||||
set exam_id = #{examId,jdbcType=BIGINT},
|
||||
training_type = #{trainingType,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
point = #{point,jdbcType=INTEGER},
|
||||
operate_type = #{operateType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,234 @@
|
|||
<?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.ExamDefinitionRulesMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="exam_id" jdbcType="BIGINT" property="examId" />
|
||||
<result column="training_type" jdbcType="VARCHAR" property="trainingType" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="point" jdbcType="INTEGER" property="point" />
|
||||
<result column="operate_type" jdbcType="VARCHAR" property="operateType" />
|
||||
</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, exam_id, training_type, num, point, operate_type
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.ExamDefinitionRulesExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_definition_rules
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from exam_definition_rules
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from exam_definition_rules
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ExamDefinitionRulesExample">
|
||||
delete from exam_definition_rules
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into exam_definition_rules (exam_id, training_type, num,
|
||||
point, operate_type)
|
||||
values (#{examId,jdbcType=BIGINT}, #{trainingType,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER},
|
||||
#{point,jdbcType=INTEGER}, #{operateType,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into exam_definition_rules
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="examId != null">
|
||||
exam_id,
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
training_type,
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num,
|
||||
</if>
|
||||
<if test="point != null">
|
||||
point,
|
||||
</if>
|
||||
<if test="operateType != null">
|
||||
operate_type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="examId != null">
|
||||
#{examId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
#{trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
#{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="point != null">
|
||||
#{point,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operateType != null">
|
||||
#{operateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ExamDefinitionRulesExample" resultType="java.lang.Long">
|
||||
select count(*) from exam_definition_rules
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update exam_definition_rules
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.examId != null">
|
||||
exam_id = #{record.examId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trainingType != null">
|
||||
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.num != null">
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.point != null">
|
||||
point = #{record.point,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.operateType != null">
|
||||
operate_type = #{record.operateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update exam_definition_rules
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
exam_id = #{record.examId,jdbcType=BIGINT},
|
||||
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||||
num = #{record.num,jdbcType=INTEGER},
|
||||
point = #{record.point,jdbcType=INTEGER},
|
||||
operate_type = #{record.operateType,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
update exam_definition_rules
|
||||
<set>
|
||||
<if test="examId != null">
|
||||
exam_id = #{examId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
training_type = #{trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="num != null">
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="point != null">
|
||||
point = #{point,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operateType != null">
|
||||
operate_type = #{operateType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.ExamDefinitionRules">
|
||||
update exam_definition_rules
|
||||
set exam_id = #{examId,jdbcType=BIGINT},
|
||||
training_type = #{trainingType,jdbcType=VARCHAR},
|
||||
num = #{num,jdbcType=INTEGER},
|
||||
point = #{point,jdbcType=INTEGER},
|
||||
operate_type = #{operateType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,278 @@
|
|||
<?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.FaultRuleDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.FaultRule">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="line_code" jdbcType="VARCHAR" property="lineCode" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="device_code" jdbcType="VARCHAR" property="deviceCode" />
|
||||
<result column="fault_type" jdbcType="VARCHAR" property="faultType" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.FaultRule">
|
||||
<result column="trigger_condition" jdbcType="LONGVARCHAR" property="triggerCondition" />
|
||||
</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, line_code, device_type, device_code, fault_type
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
trigger_condition
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.FaultRuleExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from fault_rule
|
||||
<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.FaultRuleExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from fault_rule
|
||||
<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 fault_rule
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from fault_rule
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.FaultRuleExample">
|
||||
delete from fault_rule
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.FaultRule" useGeneratedKeys="true">
|
||||
insert into fault_rule (line_code, device_type, device_code,
|
||||
fault_type, trigger_condition)
|
||||
values (#{lineCode,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR},
|
||||
#{faultType,jdbcType=VARCHAR}, #{triggerCondition,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.FaultRule" useGeneratedKeys="true">
|
||||
insert into fault_rule
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lineCode != null">
|
||||
line_code,
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type,
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code,
|
||||
</if>
|
||||
<if test="faultType != null">
|
||||
fault_type,
|
||||
</if>
|
||||
<if test="triggerCondition != null">
|
||||
trigger_condition,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lineCode != null">
|
||||
#{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
#{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
#{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="faultType != null">
|
||||
#{faultType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="triggerCondition != null">
|
||||
#{triggerCondition,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.FaultRuleExample" resultType="java.lang.Long">
|
||||
select count(*) from fault_rule
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update fault_rule
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lineCode != null">
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceCode != null">
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.faultType != null">
|
||||
fault_type = #{record.faultType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.triggerCondition != null">
|
||||
trigger_condition = #{record.triggerCondition,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update fault_rule
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
fault_type = #{record.faultType,jdbcType=VARCHAR},
|
||||
trigger_condition = #{record.triggerCondition,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update fault_rule
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
fault_type = #{record.faultType,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.FaultRule">
|
||||
update fault_rule
|
||||
<set>
|
||||
<if test="lineCode != null">
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="faultType != null">
|
||||
fault_type = #{faultType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="triggerCondition != null">
|
||||
trigger_condition = #{triggerCondition,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.FaultRule">
|
||||
update fault_rule
|
||||
set line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
fault_type = #{faultType,jdbcType=VARCHAR},
|
||||
trigger_condition = #{triggerCondition,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.FaultRule">
|
||||
update fault_rule
|
||||
set line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
fault_type = #{faultType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,314 @@
|
|||
<?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.IbpDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Ibp">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="station_code" jdbcType="VARCHAR" property="stationCode" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.Ibp">
|
||||
<result column="data" jdbcType="LONGVARCHAR" property="data" />
|
||||
</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, station_code, creator_id, create_time, update_user_id, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`data`
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.IbpExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from ibp
|
||||
<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.IbpExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ibp
|
||||
<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 ibp
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ibp
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.IbpExample">
|
||||
delete from ibp
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Ibp" useGeneratedKeys="true">
|
||||
insert into ibp (map_id, station_code, creator_id,
|
||||
create_time, update_user_id, update_time,
|
||||
`data`)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{stationCode,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{data,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Ibp" useGeneratedKeys="true">
|
||||
insert into ibp
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="data != null">
|
||||
`data`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
#{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
#{data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.IbpExample" resultType="java.lang.Long">
|
||||
select count(*) from ibp
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ibp
|
||||
<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.stationCode != null">
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.data != null">
|
||||
`data` = #{record.data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update ibp
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
`data` = #{record.data,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ibp
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Ibp">
|
||||
update ibp
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
`data` = #{data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.Ibp">
|
||||
update ibp
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
`data` = #{data,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Ibp">
|
||||
update ibp
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,297 @@
|
|||
<?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.IscsDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Iscs">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="line_code" jdbcType="VARCHAR" property="lineCode" />
|
||||
<result column="station_code" jdbcType="VARCHAR" property="stationCode" />
|
||||
<result column="total_system" jdbcType="VARCHAR" property="totalSystem" />
|
||||
<result column="system" jdbcType="VARCHAR" property="system" />
|
||||
<result column="user_interface" jdbcType="VARCHAR" property="userInterface" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.Iscs">
|
||||
<result column="graph_data" jdbcType="LONGVARCHAR" property="graphData" />
|
||||
</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, line_code, station_code, total_system, `system`, user_interface
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
graph_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.IscsExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from iscs
|
||||
<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.IscsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from iscs
|
||||
<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.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from iscs
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from iscs
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.IscsExample">
|
||||
delete from iscs
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Iscs" useGeneratedKeys="true">
|
||||
insert into iscs (line_code, station_code, total_system,
|
||||
`system`, user_interface, graph_data
|
||||
)
|
||||
values (#{lineCode,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR}, #{totalSystem,jdbcType=VARCHAR},
|
||||
#{system,jdbcType=VARCHAR}, #{userInterface,jdbcType=VARCHAR}, #{graphData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Iscs" useGeneratedKeys="true">
|
||||
insert into iscs
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lineCode != null">
|
||||
line_code,
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code,
|
||||
</if>
|
||||
<if test="totalSystem != null">
|
||||
total_system,
|
||||
</if>
|
||||
<if test="system != null">
|
||||
`system`,
|
||||
</if>
|
||||
<if test="userInterface != null">
|
||||
user_interface,
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lineCode != null">
|
||||
#{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
#{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="totalSystem != null">
|
||||
#{totalSystem,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="system != null">
|
||||
#{system,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userInterface != null">
|
||||
#{userInterface,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
#{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.IscsExample" resultType="java.lang.Long">
|
||||
select count(*) from iscs
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update iscs
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.lineCode != null">
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.stationCode != null">
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.totalSystem != null">
|
||||
total_system = #{record.totalSystem,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.system != null">
|
||||
`system` = #{record.system,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userInterface != null">
|
||||
user_interface = #{record.userInterface,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.graphData != null">
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update iscs
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
total_system = #{record.totalSystem,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=VARCHAR},
|
||||
user_interface = #{record.userInterface,jdbcType=VARCHAR},
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update iscs
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
station_code = #{record.stationCode,jdbcType=VARCHAR},
|
||||
total_system = #{record.totalSystem,jdbcType=VARCHAR},
|
||||
`system` = #{record.system,jdbcType=VARCHAR},
|
||||
user_interface = #{record.userInterface,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Iscs">
|
||||
update iscs
|
||||
<set>
|
||||
<if test="lineCode != null">
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="stationCode != null">
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="totalSystem != null">
|
||||
total_system = #{totalSystem,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="system != null">
|
||||
`system` = #{system,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userInterface != null">
|
||||
user_interface = #{userInterface,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.Iscs">
|
||||
update iscs
|
||||
set line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
total_system = #{totalSystem,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=VARCHAR},
|
||||
user_interface = #{userInterface,jdbcType=VARCHAR},
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Iscs">
|
||||
update iscs
|
||||
set line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
station_code = #{stationCode,jdbcType=VARCHAR},
|
||||
total_system = #{totalSystem,jdbcType=VARCHAR},
|
||||
`system` = #{system,jdbcType=VARCHAR},
|
||||
user_interface = #{userInterface,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,275 @@
|
|||
<?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.LearnCommentDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LearnComment">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="message_id" jdbcType="BIGINT" property="messageId" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="root_id" jdbcType="BIGINT" property="rootId" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="like" jdbcType="INTEGER" property="like" />
|
||||
<result column="unlike" jdbcType="INTEGER" property="unlike" />
|
||||
</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, message_id, content, creator_id, create_time, root_id, parent_id, `like`, unlike
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LearnCommentExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from learn_comment
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from learn_comment
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from learn_comment
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LearnCommentExample">
|
||||
delete from learn_comment
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LearnComment" useGeneratedKeys="true">
|
||||
insert into learn_comment (message_id, content, creator_id,
|
||||
create_time, root_id, parent_id,
|
||||
`like`, unlike)
|
||||
values (#{messageId,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{rootId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT},
|
||||
#{like,jdbcType=INTEGER}, #{unlike,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LearnComment" useGeneratedKeys="true">
|
||||
insert into learn_comment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="messageId != null">
|
||||
message_id,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="rootId != null">
|
||||
root_id,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="like != null">
|
||||
`like`,
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
unlike,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="messageId != null">
|
||||
#{messageId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="rootId != null">
|
||||
#{rootId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="like != null">
|
||||
#{like,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
#{unlike,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LearnCommentExample" resultType="java.lang.Long">
|
||||
select count(*) from learn_comment
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update learn_comment
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.messageId != null">
|
||||
message_id = #{record.messageId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.rootId != null">
|
||||
root_id = #{record.rootId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.like != null">
|
||||
`like` = #{record.like,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.unlike != null">
|
||||
unlike = #{record.unlike,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update learn_comment
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
message_id = #{record.messageId,jdbcType=BIGINT},
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
root_id = #{record.rootId,jdbcType=BIGINT},
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
`like` = #{record.like,jdbcType=INTEGER},
|
||||
unlike = #{record.unlike,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LearnComment">
|
||||
update learn_comment
|
||||
<set>
|
||||
<if test="messageId != null">
|
||||
message_id = #{messageId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="rootId != null">
|
||||
root_id = #{rootId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="like != null">
|
||||
`like` = #{like,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
unlike = #{unlike,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LearnComment">
|
||||
update learn_comment
|
||||
set message_id = #{messageId,jdbcType=BIGINT},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
root_id = #{rootId,jdbcType=BIGINT},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
`like` = #{like,jdbcType=INTEGER},
|
||||
unlike = #{unlike,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,329 @@
|
|||
<?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.LearnMessageDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LearnMessage">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="post_id" jdbcType="BIGINT" property="postId" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="picture_urls" jdbcType="VARCHAR" property="pictureUrls" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="topping" jdbcType="BIT" property="topping" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.LearnMessageWithBLOBs">
|
||||
<result column="like" jdbcType="LONGVARCHAR" property="like" />
|
||||
<result column="unlike" jdbcType="LONGVARCHAR" property="unlike" />
|
||||
</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, post_id, content, picture_urls, creator_id, create_time, topping
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
`like`, unlike
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.LearnMessageExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from learn_message
|
||||
<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.LearnMessageExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from learn_message
|
||||
<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 learn_message
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from learn_message
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LearnMessageExample">
|
||||
delete from learn_message
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LearnMessageWithBLOBs" useGeneratedKeys="true">
|
||||
insert into learn_message (post_id, content, picture_urls,
|
||||
creator_id, create_time, topping,
|
||||
`like`, unlike)
|
||||
values (#{postId,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, #{pictureUrls,jdbcType=VARCHAR},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{topping,jdbcType=BIT},
|
||||
#{like,jdbcType=LONGVARCHAR}, #{unlike,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LearnMessageWithBLOBs" useGeneratedKeys="true">
|
||||
insert into learn_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="postId != null">
|
||||
post_id,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
<if test="pictureUrls != null">
|
||||
picture_urls,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="topping != null">
|
||||
topping,
|
||||
</if>
|
||||
<if test="like != null">
|
||||
`like`,
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
unlike,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="postId != null">
|
||||
#{postId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pictureUrls != null">
|
||||
#{pictureUrls,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="topping != null">
|
||||
#{topping,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="like != null">
|
||||
#{like,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
#{unlike,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LearnMessageExample" resultType="java.lang.Long">
|
||||
select count(*) from learn_message
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update learn_message
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.postId != null">
|
||||
post_id = #{record.postId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.pictureUrls != null">
|
||||
picture_urls = #{record.pictureUrls,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.topping != null">
|
||||
topping = #{record.topping,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.like != null">
|
||||
`like` = #{record.like,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.unlike != null">
|
||||
unlike = #{record.unlike,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update learn_message
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
post_id = #{record.postId,jdbcType=BIGINT},
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
picture_urls = #{record.pictureUrls,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
topping = #{record.topping,jdbcType=BIT},
|
||||
`like` = #{record.like,jdbcType=LONGVARCHAR},
|
||||
unlike = #{record.unlike,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update learn_message
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
post_id = #{record.postId,jdbcType=BIGINT},
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
picture_urls = #{record.pictureUrls,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
topping = #{record.topping,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LearnMessageWithBLOBs">
|
||||
update learn_message
|
||||
<set>
|
||||
<if test="postId != null">
|
||||
post_id = #{postId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pictureUrls != null">
|
||||
picture_urls = #{pictureUrls,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="topping != null">
|
||||
topping = #{topping,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="like != null">
|
||||
`like` = #{like,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
unlike = #{unlike,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.LearnMessageWithBLOBs">
|
||||
update learn_message
|
||||
set post_id = #{postId,jdbcType=BIGINT},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
picture_urls = #{pictureUrls,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
topping = #{topping,jdbcType=BIT},
|
||||
`like` = #{like,jdbcType=LONGVARCHAR},
|
||||
unlike = #{unlike,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LearnMessage">
|
||||
update learn_message
|
||||
set post_id = #{postId,jdbcType=BIGINT},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
picture_urls = #{pictureUrls,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
topping = #{topping,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,260 @@
|
|||
<?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.LearnPostDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LearnPost">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="project" jdbcType="VARCHAR" property="project" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="topping" jdbcType="BIT" property="topping" />
|
||||
<result column="like" jdbcType="INTEGER" property="like" />
|
||||
<result column="unlike" jdbcType="INTEGER" property="unlike" />
|
||||
</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, project, title, creator_id, create_time, topping, `like`, unlike
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LearnPostExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from learn_post
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from learn_post
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from learn_post
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LearnPostExample">
|
||||
delete from learn_post
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LearnPost" useGeneratedKeys="true">
|
||||
insert into learn_post (project, title, creator_id,
|
||||
create_time, topping, `like`,
|
||||
unlike)
|
||||
values (#{project,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{topping,jdbcType=BIT}, #{like,jdbcType=INTEGER},
|
||||
#{unlike,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LearnPost" useGeneratedKeys="true">
|
||||
insert into learn_post
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="topping != null">
|
||||
topping,
|
||||
</if>
|
||||
<if test="like != null">
|
||||
`like`,
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
unlike,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="topping != null">
|
||||
#{topping,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="like != null">
|
||||
#{like,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
#{unlike,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LearnPostExample" resultType="java.lang.Long">
|
||||
select count(*) from learn_post
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update learn_post
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.project != null">
|
||||
project = #{record.project,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.topping != null">
|
||||
topping = #{record.topping,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.like != null">
|
||||
`like` = #{record.like,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.unlike != null">
|
||||
unlike = #{record.unlike,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update learn_post
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
project = #{record.project,jdbcType=VARCHAR},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
topping = #{record.topping,jdbcType=BIT},
|
||||
`like` = #{record.like,jdbcType=INTEGER},
|
||||
unlike = #{record.unlike,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LearnPost">
|
||||
update learn_post
|
||||
<set>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="topping != null">
|
||||
topping = #{topping,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="like != null">
|
||||
`like` = #{like,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="unlike != null">
|
||||
unlike = #{unlike,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LearnPost">
|
||||
update learn_post
|
||||
set project = #{project,jdbcType=VARCHAR},
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
topping = #{topping,jdbcType=BIT},
|
||||
`like` = #{like,jdbcType=INTEGER},
|
||||
unlike = #{unlike,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.LicenseDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.License">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="over_time" jdbcType="TIMESTAMP" property="overTime" />
|
||||
<result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
|
||||
<result column="license" jdbcType="VARCHAR" property="license" />
|
||||
<result column="available" jdbcType="TINYINT" property="available" />
|
||||
</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, `name`, over_time, secret_key, license, available
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LicenseExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from license
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from license
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from license
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LicenseExample">
|
||||
delete from license
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.License" useGeneratedKeys="true">
|
||||
insert into license (`name`, over_time, secret_key,
|
||||
license, available)
|
||||
values (#{name,jdbcType=VARCHAR}, #{overTime,jdbcType=TIMESTAMP}, #{secretKey,jdbcType=VARCHAR},
|
||||
#{license,jdbcType=VARCHAR}, #{available,jdbcType=TINYINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.License" useGeneratedKeys="true">
|
||||
insert into license
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="overTime != null">
|
||||
over_time,
|
||||
</if>
|
||||
<if test="secretKey != null">
|
||||
secret_key,
|
||||
</if>
|
||||
<if test="license != null">
|
||||
license,
|
||||
</if>
|
||||
<if test="available != null">
|
||||
available,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="overTime != null">
|
||||
#{overTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="secretKey != null">
|
||||
#{secretKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="license != null">
|
||||
#{license,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="available != null">
|
||||
#{available,jdbcType=TINYINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LicenseExample" resultType="java.lang.Long">
|
||||
select count(*) from license
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update license
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.overTime != null">
|
||||
over_time = #{record.overTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.secretKey != null">
|
||||
secret_key = #{record.secretKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.license != null">
|
||||
license = #{record.license,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.available != null">
|
||||
available = #{record.available,jdbcType=TINYINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update license
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
over_time = #{record.overTime,jdbcType=TIMESTAMP},
|
||||
secret_key = #{record.secretKey,jdbcType=VARCHAR},
|
||||
license = #{record.license,jdbcType=VARCHAR},
|
||||
available = #{record.available,jdbcType=TINYINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.License">
|
||||
update license
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="overTime != null">
|
||||
over_time = #{overTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="secretKey != null">
|
||||
secret_key = #{secretKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="license != null">
|
||||
license = #{license,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="available != null">
|
||||
available = #{available,jdbcType=TINYINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.License">
|
||||
update license
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
over_time = #{overTime,jdbcType=TIMESTAMP},
|
||||
secret_key = #{secretKey,jdbcType=VARCHAR},
|
||||
license = #{license,jdbcType=VARCHAR},
|
||||
available = #{available,jdbcType=TINYINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,270 @@
|
|||
<?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.LsDraftLessonChapterDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsDraftLessonChapter">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
</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, lesson_id, `name`, remarks, parent_id, order_num
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsDraftLessonChapterExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_lesson_chapter
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_lesson_chapter
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_draft_lesson_chapter
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsDraftLessonChapterExample">
|
||||
delete from ls_draft_lesson_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsDraftLessonChapter" useGeneratedKeys="true">
|
||||
insert into ls_draft_lesson_chapter (lesson_id, `name`, remarks,
|
||||
parent_id, order_num)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
||||
#{parentId,jdbcType=BIGINT}, #{orderNum,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsDraftLessonChapter" useGeneratedKeys="true">
|
||||
insert into ls_draft_lesson_chapter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsDraftLessonChapterExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_draft_lesson_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_draft_lesson_chapter
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_draft_lesson_chapter
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsDraftLessonChapter">
|
||||
update ls_draft_lesson_chapter
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsDraftLessonChapter">
|
||||
update ls_draft_lesson_chapter
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<resultMap id="RelResultMap" type="com.joylink.ms.vo.client.LessonChapterVO">
|
||||
<id column="cId" jdbcType="BIGINT" property="id" />
|
||||
<result column="lessonId" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="cName" jdbcType="VARCHAR" property="name" />
|
||||
<result column="cRemarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="cParentId" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="cOrderNum" jdbcType="INTEGER" property="orderNum" />
|
||||
<collection property="trainingVos" ofType="com.joylink.ms.vo.client.training.TrainingVO">
|
||||
<id column="tId" jdbcType="BIGINT" property="id" />
|
||||
<result column="tName" jdbcType="VARCHAR" property="name" />
|
||||
<result column="tRemarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="tPrdType" jdbcType="VARCHAR" property="prdType"/>
|
||||
<result column="tType" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="tStationCode" jdbcType="VARCHAR" property="locateDeviceCode"/>
|
||||
<result column="tOrderNum" jdbcType="INTEGER" property="orderNum"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="selectChapterTrainingByLessonId"
|
||||
resultMap="RelResultMap">
|
||||
SELECT
|
||||
c.id AS cId,
|
||||
c.lesson_id AS lessonId,
|
||||
c.`name` AS cName,
|
||||
c.remarks AS cRemarks,
|
||||
c.parent_id AS cParentId,
|
||||
c.order_num AS cOrderNum,
|
||||
t.id AS tId,
|
||||
t.`name` AS tName,
|
||||
t.remarks AS tRemarks,
|
||||
t.prd_type AS tPrdType,
|
||||
t.type AS tType,
|
||||
t.locate_device_code AS tStationCode,
|
||||
rel.order_num AS tOrderNum,
|
||||
rel.trial AS trial
|
||||
FROM
|
||||
ls_draft_lesson_chapter AS c
|
||||
LEFT JOIN ls_draft_rel_chapter_training AS rel ON rel.chapter_id = c.id
|
||||
AND c.lesson_id = rel.lesson_id
|
||||
LEFT JOIN training AS t ON rel.training_id = t.id
|
||||
WHERE
|
||||
c.lesson_id = #{lessonId}
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,293 @@
|
|||
<?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.LsDraftLessonDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsDraftLesson">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="author_id" jdbcType="BIGINT" property="authorId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="explanation" jdbcType="VARCHAR" property="explanation" />
|
||||
</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, prd_type, `name`, remarks, author_id, update_time, creator_id, `status`,
|
||||
explanation
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsDraftLessonExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_lesson
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_lesson
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_draft_lesson
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsDraftLessonExample">
|
||||
delete from ls_draft_lesson
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsDraftLesson" useGeneratedKeys="true">
|
||||
insert into ls_draft_lesson (map_id, prd_type, `name`,
|
||||
remarks, author_id, update_time,
|
||||
creator_id, `status`, explanation
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{prdType,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR}, #{authorId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{creatorId,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR}, #{explanation,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsDraftLesson" useGeneratedKeys="true">
|
||||
insert into ls_draft_lesson
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
explanation,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
#{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
#{explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsDraftLessonExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_draft_lesson
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_draft_lesson
|
||||
<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.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.authorId != null">
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.explanation != null">
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_draft_lesson
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsDraftLesson">
|
||||
update ls_draft_lesson
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
explanation = #{explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsDraftLesson">
|
||||
update ls_draft_lesson
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
explanation = #{explanation,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.LsDraftRelChapterTrainingDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="chapter_id" jdbcType="BIGINT" property="chapterId" />
|
||||
<result column="training_id" jdbcType="BIGINT" property="trainingId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
<result column="trial" jdbcType="BIT" property="trial" />
|
||||
</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, lesson_id, chapter_id, training_id, order_num, trial
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsDraftRelChapterTrainingExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_rel_chapter_training
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_rel_chapter_training
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_draft_rel_chapter_training
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsDraftRelChapterTrainingExample">
|
||||
delete from ls_draft_rel_chapter_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining" useGeneratedKeys="true">
|
||||
insert into ls_draft_rel_chapter_training (lesson_id, chapter_id, training_id,
|
||||
order_num, trial)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{chapterId,jdbcType=BIGINT}, #{trainingId,jdbcType=BIGINT},
|
||||
#{orderNum,jdbcType=INTEGER}, #{trial,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining" useGeneratedKeys="true">
|
||||
insert into ls_draft_rel_chapter_training
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
chapter_id,
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
training_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
#{chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
#{trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
#{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsDraftRelChapterTrainingExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_draft_rel_chapter_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_draft_rel_chapter_training
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.chapterId != null">
|
||||
chapter_id = #{record.chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trainingId != null">
|
||||
training_id = #{record.trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.trial != null">
|
||||
trial = #{record.trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_draft_rel_chapter_training
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
chapter_id = #{record.chapterId,jdbcType=BIGINT},
|
||||
training_id = #{record.trainingId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
trial = #{record.trial,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
update ls_draft_rel_chapter_training
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
chapter_id = #{chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
training_id = #{trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial = #{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
update ls_draft_rel_chapter_training
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
chapter_id = #{chapterId,jdbcType=BIGINT},
|
||||
training_id = #{trainingId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
trial = #{trial,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,234 @@
|
|||
<?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.LsDraftRelChapterTrainingMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="chapter_id" jdbcType="BIGINT" property="chapterId" />
|
||||
<result column="training_id" jdbcType="BIGINT" property="trainingId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
<result column="trial" jdbcType="BIT" property="trial" />
|
||||
</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, lesson_id, chapter_id, training_id, order_num, trial
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsDraftRelChapterTrainingExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_rel_chapter_training
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_draft_rel_chapter_training
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_draft_rel_chapter_training
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsDraftRelChapterTrainingExample">
|
||||
delete from ls_draft_rel_chapter_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ls_draft_rel_chapter_training (lesson_id, chapter_id, training_id,
|
||||
order_num, trial)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{chapterId,jdbcType=BIGINT}, #{trainingId,jdbcType=BIGINT},
|
||||
#{orderNum,jdbcType=INTEGER}, #{trial,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ls_draft_rel_chapter_training
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
chapter_id,
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
training_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
#{chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
#{trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
#{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsDraftRelChapterTrainingExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_draft_rel_chapter_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_draft_rel_chapter_training
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.chapterId != null">
|
||||
chapter_id = #{record.chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trainingId != null">
|
||||
training_id = #{record.trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.trial != null">
|
||||
trial = #{record.trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_draft_rel_chapter_training
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
chapter_id = #{record.chapterId,jdbcType=BIGINT},
|
||||
training_id = #{record.trainingId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
trial = #{record.trial,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
update ls_draft_rel_chapter_training
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
chapter_id = #{chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
training_id = #{trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial = #{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsDraftRelChapterTraining">
|
||||
update ls_draft_rel_chapter_training
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
chapter_id = #{chapterId,jdbcType=BIGINT},
|
||||
training_id = #{trainingId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
trial = #{trial,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.LsLessonChapterDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsLessonChapter">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
</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, lesson_id, `name`, remarks, parent_id, order_num
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsLessonChapterExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson_chapter
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson_chapter
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_lesson_chapter
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsLessonChapterExample">
|
||||
delete from ls_lesson_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsLessonChapter" useGeneratedKeys="true">
|
||||
insert into ls_lesson_chapter (lesson_id, `name`, remarks,
|
||||
parent_id, order_num)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
||||
#{parentId,jdbcType=BIGINT}, #{orderNum,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsLessonChapter" useGeneratedKeys="true">
|
||||
insert into ls_lesson_chapter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsLessonChapterExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_lesson_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_lesson_chapter
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_lesson_chapter
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsLessonChapter">
|
||||
update ls_lesson_chapter
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsLessonChapter">
|
||||
update ls_lesson_chapter
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,234 @@
|
|||
<?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.LsLessonChapterMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsLessonChapter">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_code" jdbcType="VARCHAR" property="lessonCode" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
</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, lesson_code, name, remarks, parent_id, order_num
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsLessonChapterExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson_chapter
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson_chapter
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_lesson_chapter
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsLessonChapterExample">
|
||||
delete from ls_lesson_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.LsLessonChapter">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ls_lesson_chapter (lesson_code, name, remarks,
|
||||
parent_id, order_num)
|
||||
values (#{lessonCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR},
|
||||
#{parentId,jdbcType=BIGINT}, #{orderNum,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.LsLessonChapter">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ls_lesson_chapter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonCode != null">
|
||||
lesson_code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonCode != null">
|
||||
#{lessonCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsLessonChapterExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_lesson_chapter
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_lesson_chapter
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonCode != null">
|
||||
lesson_code = #{record.lessonCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_lesson_chapter
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_code = #{record.lessonCode,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsLessonChapter">
|
||||
update ls_lesson_chapter
|
||||
<set>
|
||||
<if test="lessonCode != null">
|
||||
lesson_code = #{lessonCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsLessonChapter">
|
||||
update ls_lesson_chapter
|
||||
set lesson_code = #{lessonCode,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,293 @@
|
|||
<?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.LsLessonDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsLesson">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="author_id" jdbcType="BIGINT" property="authorId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="city_code" jdbcType="VARCHAR" property="cityCode" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, prd_type, `name`, remarks, author_id, update_time, creator_id, city_code,
|
||||
`status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsLessonExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_lesson
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsLessonExample">
|
||||
delete from ls_lesson
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsLesson" useGeneratedKeys="true">
|
||||
insert into ls_lesson (map_id, prd_type, `name`,
|
||||
remarks, author_id, update_time,
|
||||
creator_id, city_code, `status`
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{prdType,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR}, #{authorId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{creatorId,jdbcType=BIGINT}, #{cityCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsLesson" useGeneratedKeys="true">
|
||||
insert into ls_lesson
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="cityCode != null">
|
||||
city_code,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
#{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="cityCode != null">
|
||||
#{cityCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsLessonExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_lesson
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_lesson
|
||||
<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.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.authorId != null">
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.cityCode != null">
|
||||
city_code = #{record.cityCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_lesson
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
city_code = #{record.cityCode,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsLesson">
|
||||
update ls_lesson
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="cityCode != null">
|
||||
city_code = #{cityCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsLesson">
|
||||
update ls_lesson
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
city_code = #{cityCode,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?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.LsLessonVersionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsLessonVersion">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</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, lesson_id, version, creator_id, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsLessonVersionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson_version
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_lesson_version
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_lesson_version
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsLessonVersionExample">
|
||||
delete from ls_lesson_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsLessonVersion" useGeneratedKeys="true">
|
||||
insert into ls_lesson_version (lesson_id, version, creator_id,
|
||||
update_time)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{version,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsLessonVersion" useGeneratedKeys="true">
|
||||
insert into ls_lesson_version
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
#{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsLessonVersionExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_lesson_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_lesson_version
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.version != null">
|
||||
version = #{record.version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_lesson_version
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
version = #{record.version,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsLessonVersion">
|
||||
update ls_lesson_version
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsLessonVersion">
|
||||
update ls_lesson_version
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.LsRelChapterTrainingDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.LsRelChapterTraining">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="chapter_id" jdbcType="BIGINT" property="chapterId" />
|
||||
<result column="training_id" jdbcType="BIGINT" property="trainingId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
<result column="trial" jdbcType="BIT" property="trial" />
|
||||
</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, lesson_id, chapter_id, training_id, order_num, trial
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.LsRelChapterTrainingExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_rel_chapter_training
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from ls_rel_chapter_training
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from ls_rel_chapter_training
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.LsRelChapterTrainingExample">
|
||||
delete from ls_rel_chapter_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsRelChapterTraining" useGeneratedKeys="true">
|
||||
insert into ls_rel_chapter_training (lesson_id, chapter_id, training_id,
|
||||
order_num, trial)
|
||||
values (#{lessonId,jdbcType=BIGINT}, #{chapterId,jdbcType=BIGINT}, #{trainingId,jdbcType=BIGINT},
|
||||
#{orderNum,jdbcType=INTEGER}, #{trial,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.LsRelChapterTraining" useGeneratedKeys="true">
|
||||
insert into ls_rel_chapter_training
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
chapter_id,
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
training_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
#{chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
#{trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
#{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.LsRelChapterTrainingExample" resultType="java.lang.Long">
|
||||
select count(*) from ls_rel_chapter_training
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update ls_rel_chapter_training
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.chapterId != null">
|
||||
chapter_id = #{record.chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trainingId != null">
|
||||
training_id = #{record.trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.trial != null">
|
||||
trial = #{record.trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update ls_rel_chapter_training
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
chapter_id = #{record.chapterId,jdbcType=BIGINT},
|
||||
training_id = #{record.trainingId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
trial = #{record.trial,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.LsRelChapterTraining">
|
||||
update ls_rel_chapter_training
|
||||
<set>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="chapterId != null">
|
||||
chapter_id = #{chapterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingId != null">
|
||||
training_id = #{trainingId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="trial != null">
|
||||
trial = #{trial,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.LsRelChapterTraining">
|
||||
update ls_rel_chapter_training
|
||||
set lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
chapter_id = #{chapterId,jdbcType=BIGINT},
|
||||
training_id = #{trainingId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
trial = #{trial,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,374 @@
|
|||
<?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.Map3dDataDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Map3dData">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.Map3dDataWithBLOBs">
|
||||
<result column="assets" jdbcType="LONGVARCHAR" property="assets" />
|
||||
<result column="sections" jdbcType="LONGVARCHAR" property="sections" />
|
||||
<result column="switchs" jdbcType="LONGVARCHAR" property="switchs" />
|
||||
<result column="signals" jdbcType="LONGVARCHAR" property="signals" />
|
||||
<result column="stands" jdbcType="LONGVARCHAR" property="stands" />
|
||||
<result column="trains" jdbcType="LONGVARCHAR" property="trains" />
|
||||
</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, creator_id, create_time, update_user_id, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
assets, sections, switchs, signals, stands, trains
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.Map3dDataExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from map_3d_data
|
||||
<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.Map3dDataExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_3d_data
|
||||
<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 map_3d_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_3d_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.Map3dDataExample">
|
||||
delete from map_3d_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Map3dDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_3d_data (map_id, creator_id, create_time,
|
||||
update_user_id, update_time, assets,
|
||||
sections, switchs, signals,
|
||||
stands, trains)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{assets,jdbcType=LONGVARCHAR},
|
||||
#{sections,jdbcType=LONGVARCHAR}, #{switchs,jdbcType=LONGVARCHAR}, #{signals,jdbcType=LONGVARCHAR},
|
||||
#{stands,jdbcType=LONGVARCHAR}, #{trains,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Map3dDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_3d_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="assets != null">
|
||||
assets,
|
||||
</if>
|
||||
<if test="sections != null">
|
||||
sections,
|
||||
</if>
|
||||
<if test="switchs != null">
|
||||
switchs,
|
||||
</if>
|
||||
<if test="signals != null">
|
||||
signals,
|
||||
</if>
|
||||
<if test="stands != null">
|
||||
stands,
|
||||
</if>
|
||||
<if test="trains != null">
|
||||
trains,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="assets != null">
|
||||
#{assets,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="sections != null">
|
||||
#{sections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="switchs != null">
|
||||
#{switchs,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="signals != null">
|
||||
#{signals,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stands != null">
|
||||
#{stands,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="trains != null">
|
||||
#{trains,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.Map3dDataExample" resultType="java.lang.Long">
|
||||
select count(*) from map_3d_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_3d_data
|
||||
<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.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.assets != null">
|
||||
assets = #{record.assets,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.sections != null">
|
||||
sections = #{record.sections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.switchs != null">
|
||||
switchs = #{record.switchs,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.signals != null">
|
||||
signals = #{record.signals,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.stands != null">
|
||||
stands = #{record.stands,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.trains != null">
|
||||
trains = #{record.trains,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update map_3d_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
assets = #{record.assets,jdbcType=LONGVARCHAR},
|
||||
sections = #{record.sections,jdbcType=LONGVARCHAR},
|
||||
switchs = #{record.switchs,jdbcType=LONGVARCHAR},
|
||||
signals = #{record.signals,jdbcType=LONGVARCHAR},
|
||||
stands = #{record.stands,jdbcType=LONGVARCHAR},
|
||||
trains = #{record.trains,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_3d_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Map3dDataWithBLOBs">
|
||||
update map_3d_data
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="assets != null">
|
||||
assets = #{assets,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="sections != null">
|
||||
sections = #{sections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="switchs != null">
|
||||
switchs = #{switchs,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="signals != null">
|
||||
signals = #{signals,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="stands != null">
|
||||
stands = #{stands,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="trains != null">
|
||||
trains = #{trains,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.Map3dDataWithBLOBs">
|
||||
update map_3d_data
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
assets = #{assets,jdbcType=LONGVARCHAR},
|
||||
sections = #{sections,jdbcType=LONGVARCHAR},
|
||||
switchs = #{switchs,jdbcType=LONGVARCHAR},
|
||||
signals = #{signals,jdbcType=LONGVARCHAR},
|
||||
stands = #{stands,jdbcType=LONGVARCHAR},
|
||||
trains = #{trains,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Map3dData">
|
||||
update map_3d_data
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,340 @@
|
|||
<?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.Map3dModelDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Map3dModel">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="url" jdbcType="VARCHAR" property="url" />
|
||||
<result column="package_name" jdbcType="VARCHAR" property="packageName" />
|
||||
<result column="file_type" jdbcType="VARCHAR" property="fileType" />
|
||||
<result column="resource_type" jdbcType="VARCHAR" property="resourceType" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="line" jdbcType="VARCHAR" property="line" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="uploader_id" jdbcType="BIGINT" property="uploaderId" />
|
||||
<result column="upload_time" jdbcType="TIMESTAMP" property="uploadTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, `name`, url, package_name, file_type, resource_type, device_type, line, remarks,
|
||||
uploader_id, upload_time, update_time, `status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.Map3dModelExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_3d_model
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from map_3d_model
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_3d_model
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.Map3dModelExample">
|
||||
delete from map_3d_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Map3dModel" useGeneratedKeys="true">
|
||||
insert into map_3d_model (`name`, url, package_name,
|
||||
file_type, resource_type, device_type,
|
||||
line, remarks, uploader_id,
|
||||
upload_time, update_time, `status`
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{packageName,jdbcType=VARCHAR},
|
||||
#{fileType,jdbcType=VARCHAR}, #{resourceType,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR},
|
||||
#{line,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{uploaderId,jdbcType=BIGINT},
|
||||
#{uploadTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Map3dModel" useGeneratedKeys="true">
|
||||
insert into map_3d_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url,
|
||||
</if>
|
||||
<if test="packageName != null">
|
||||
package_name,
|
||||
</if>
|
||||
<if test="fileType != null">
|
||||
file_type,
|
||||
</if>
|
||||
<if test="resourceType != null">
|
||||
resource_type,
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type,
|
||||
</if>
|
||||
<if test="line != null">
|
||||
line,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="uploaderId != null">
|
||||
uploader_id,
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
upload_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
#{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packageName != null">
|
||||
#{packageName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileType != null">
|
||||
#{fileType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceType != null">
|
||||
#{resourceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
#{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="line != null">
|
||||
#{line,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uploaderId != null">
|
||||
#{uploaderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
#{uploadTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.Map3dModelExample" resultType="java.lang.Long">
|
||||
select count(*) from map_3d_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_3d_model
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.url != null">
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.packageName != null">
|
||||
package_name = #{record.packageName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fileType != null">
|
||||
file_type = #{record.fileType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.resourceType != null">
|
||||
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.line != null">
|
||||
line = #{record.line,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.uploaderId != null">
|
||||
uploader_id = #{record.uploaderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.uploadTime != null">
|
||||
upload_time = #{record.uploadTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_3d_model
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
url = #{record.url,jdbcType=VARCHAR},
|
||||
package_name = #{record.packageName,jdbcType=VARCHAR},
|
||||
file_type = #{record.fileType,jdbcType=VARCHAR},
|
||||
resource_type = #{record.resourceType,jdbcType=VARCHAR},
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
line = #{record.line,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
uploader_id = #{record.uploaderId,jdbcType=BIGINT},
|
||||
upload_time = #{record.uploadTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Map3dModel">
|
||||
update map_3d_model
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="packageName != null">
|
||||
package_name = #{packageName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileType != null">
|
||||
file_type = #{fileType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="resourceType != null">
|
||||
resource_type = #{resourceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="line != null">
|
||||
line = #{line,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uploaderId != null">
|
||||
uploader_id = #{uploaderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
upload_time = #{uploadTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Map3dModel">
|
||||
update map_3d_model
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
package_name = #{packageName,jdbcType=VARCHAR},
|
||||
file_type = #{fileType,jdbcType=VARCHAR},
|
||||
resource_type = #{resourceType,jdbcType=VARCHAR},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
line = #{line,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
uploader_id = #{uploaderId,jdbcType=BIGINT},
|
||||
upload_time = #{uploadTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,242 @@
|
|||
<?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.MapDataDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MapData">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.MapDataWithBLOBs">
|
||||
<result column="graph_data" jdbcType="LONGVARCHAR" property="graphData" />
|
||||
<result column="logic_data" jdbcType="LONGVARCHAR" property="logicData" />
|
||||
</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
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
graph_data, logic_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.MapDataExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from map_data
|
||||
<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.MapDataExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_data
|
||||
<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 map_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_data
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MapDataExample">
|
||||
delete from map_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_data (map_id, graph_data, logic_data
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{graphData,jdbcType=LONGVARCHAR}, #{logicData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapDataWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_data
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data,
|
||||
</if>
|
||||
<if test="logicData != null">
|
||||
logic_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
#{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="logicData != null">
|
||||
#{logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MapDataExample" resultType="java.lang.Long">
|
||||
select count(*) from map_data
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_data
|
||||
<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.graphData != null">
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.logicData != null">
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update map_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
graph_data = #{record.graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{record.logicData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_data
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MapDataWithBLOBs">
|
||||
update map_data
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="graphData != null">
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="logicData != null">
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.MapDataWithBLOBs">
|
||||
update map_data
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
graph_data = #{graphData,jdbcType=LONGVARCHAR},
|
||||
logic_data = #{logicData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MapData">
|
||||
update map_data
|
||||
set map_id = #{mapId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,275 @@
|
|||
<?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.MapInfoDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MapInfo">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="line_code" jdbcType="VARCHAR" property="lineCode" />
|
||||
<result column="city_code" jdbcType="VARCHAR" property="cityCode" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="project" jdbcType="BIT" property="project" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="draw_way" jdbcType="BIT" property="drawWay" />
|
||||
<result column="order_number" jdbcType="INTEGER" property="orderNumber" />
|
||||
</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, `name`, line_code, city_code, `status`, project, project_code, draw_way, order_number
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.MapInfoExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_info
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from map_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MapInfoExample">
|
||||
delete from map_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapInfo" useGeneratedKeys="true">
|
||||
insert into map_info (`name`, line_code, city_code,
|
||||
`status`, project, project_code,
|
||||
draw_way, order_number)
|
||||
values (#{name,jdbcType=VARCHAR}, #{lineCode,jdbcType=VARCHAR}, #{cityCode,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{project,jdbcType=BIT}, #{projectCode,jdbcType=VARCHAR},
|
||||
#{drawWay,jdbcType=BIT}, #{orderNumber,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapInfo" useGeneratedKeys="true">
|
||||
insert into map_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="lineCode != null">
|
||||
line_code,
|
||||
</if>
|
||||
<if test="cityCode != null">
|
||||
city_code,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
draw_way,
|
||||
</if>
|
||||
<if test="orderNumber != null">
|
||||
order_number,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lineCode != null">
|
||||
#{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cityCode != null">
|
||||
#{cityCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
#{drawWay,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="orderNumber != null">
|
||||
#{orderNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MapInfoExample" resultType="java.lang.Long">
|
||||
select count(*) from map_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_info
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lineCode != null">
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.cityCode != null">
|
||||
city_code = #{record.cityCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.project != null">
|
||||
project = #{record.project,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.drawWay != null">
|
||||
draw_way = #{record.drawWay,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.orderNumber != null">
|
||||
order_number = #{record.orderNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_info
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
line_code = #{record.lineCode,jdbcType=VARCHAR},
|
||||
city_code = #{record.cityCode,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
project = #{record.project,jdbcType=BIT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
draw_way = #{record.drawWay,jdbcType=BIT},
|
||||
order_number = #{record.orderNumber,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MapInfo">
|
||||
update map_info
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lineCode != null">
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cityCode != null">
|
||||
city_code = #{cityCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="drawWay != null">
|
||||
draw_way = #{drawWay,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="orderNumber != null">
|
||||
order_number = #{orderNumber,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MapInfo">
|
||||
update map_info
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
line_code = #{lineCode,jdbcType=VARCHAR},
|
||||
city_code = #{cityCode,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
project = #{project,jdbcType=BIT},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
draw_way = #{drawWay,jdbcType=BIT},
|
||||
order_number = #{orderNumber,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,242 @@
|
|||
<?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.MapPassengerFlowDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MapPassengerFlow">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.MapPassengerFlowWithBLOBs">
|
||||
<result column="stand_pf" jdbcType="LONGVARCHAR" property="standPf" />
|
||||
<result column="trip_pf" jdbcType="LONGVARCHAR" property="tripPf" />
|
||||
</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
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
stand_pf, trip_pf
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.MapPassengerFlowExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from map_passenger_flow
|
||||
<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.MapPassengerFlowExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_passenger_flow
|
||||
<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 map_passenger_flow
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_passenger_flow
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MapPassengerFlowExample">
|
||||
delete from map_passenger_flow
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapPassengerFlowWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_passenger_flow (map_id, stand_pf, trip_pf
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{standPf,jdbcType=LONGVARCHAR}, #{tripPf,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapPassengerFlowWithBLOBs" useGeneratedKeys="true">
|
||||
insert into map_passenger_flow
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="standPf != null">
|
||||
stand_pf,
|
||||
</if>
|
||||
<if test="tripPf != null">
|
||||
trip_pf,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="standPf != null">
|
||||
#{standPf,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="tripPf != null">
|
||||
#{tripPf,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MapPassengerFlowExample" resultType="java.lang.Long">
|
||||
select count(*) from map_passenger_flow
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_passenger_flow
|
||||
<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.standPf != null">
|
||||
stand_pf = #{record.standPf,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.tripPf != null">
|
||||
trip_pf = #{record.tripPf,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update map_passenger_flow
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
stand_pf = #{record.standPf,jdbcType=LONGVARCHAR},
|
||||
trip_pf = #{record.tripPf,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_passenger_flow
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MapPassengerFlowWithBLOBs">
|
||||
update map_passenger_flow
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="standPf != null">
|
||||
stand_pf = #{standPf,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="tripPf != null">
|
||||
trip_pf = #{tripPf,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.MapPassengerFlowWithBLOBs">
|
||||
update map_passenger_flow
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
stand_pf = #{standPf,jdbcType=LONGVARCHAR},
|
||||
trip_pf = #{tripPf,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MapPassengerFlow">
|
||||
update map_passenger_flow
|
||||
set map_id = #{mapId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,245 @@
|
|||
<?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.MapSystemDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MapSystem">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="customized" jdbcType="VARCHAR" property="customized" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, `name`, `type`, map_id, prd_type, customized, `status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.MapSystemExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_system
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from map_system
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_system
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MapSystemExample">
|
||||
delete from map_system
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapSystem" useGeneratedKeys="true">
|
||||
insert into map_system (`name`, `type`, map_id,
|
||||
prd_type, customized, `status`
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT},
|
||||
#{prdType,jdbcType=VARCHAR}, #{customized,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapSystem" useGeneratedKeys="true">
|
||||
insert into map_system
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="customized != null">
|
||||
customized,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="customized != null">
|
||||
#{customized,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MapSystemExample" resultType="java.lang.Long">
|
||||
select count(*) from map_system
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_system
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.customized != null">
|
||||
customized = #{record.customized,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_system
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
customized = #{record.customized,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MapSystem">
|
||||
update map_system
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="customized != null">
|
||||
customized = #{customized,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MapSystem">
|
||||
update map_system
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
customized = #{customized,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?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.MapVersionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MapVersion">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="author_id" jdbcType="BIGINT" property="authorId" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
</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, version, update_time, author_id, map_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.MapVersionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from map_version
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from map_version
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from map_version
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MapVersionExample">
|
||||
delete from map_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapVersion" useGeneratedKeys="true">
|
||||
insert into map_version (version, update_time, author_id,
|
||||
map_id)
|
||||
values (#{version,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{authorId,jdbcType=BIGINT},
|
||||
#{mapId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MapVersion" useGeneratedKeys="true">
|
||||
insert into map_version
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="version != null">
|
||||
version,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="version != null">
|
||||
#{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
#{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MapVersionExample" resultType="java.lang.Long">
|
||||
select count(*) from map_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update map_version
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.version != null">
|
||||
version = #{record.version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.authorId != null">
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update map_version
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
version = #{record.version,jdbcType=VARCHAR},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{record.authorId,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MapVersion">
|
||||
update map_version
|
||||
<set>
|
||||
<if test="version != null">
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="authorId != null">
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MapVersion">
|
||||
update map_version
|
||||
set version = #{version,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
author_id = #{authorId,jdbcType=BIGINT},
|
||||
map_id = #{mapId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,245 @@
|
|||
<?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.MpMapPrdDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MpMapPrd">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="train_types" jdbcType="VARCHAR" property="trainTypes" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, prd_type, `name`, train_types, remarks, `status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.MpMapPrdExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from mp_map_prd
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from mp_map_prd
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from mp_map_prd
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MpMapPrdExample">
|
||||
delete from mp_map_prd
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MpMapPrd" useGeneratedKeys="true">
|
||||
insert into mp_map_prd (map_id, prd_type, `name`,
|
||||
train_types, remarks, `status`
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{prdType,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||
#{trainTypes,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MpMapPrd" useGeneratedKeys="true">
|
||||
insert into mp_map_prd
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="trainTypes != null">
|
||||
train_types,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trainTypes != null">
|
||||
#{trainTypes,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MpMapPrdExample" resultType="java.lang.Long">
|
||||
select count(*) from mp_map_prd
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update mp_map_prd
|
||||
<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.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trainTypes != null">
|
||||
train_types = #{record.trainTypes,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update mp_map_prd
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
train_types = #{record.trainTypes,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MpMapPrd">
|
||||
update mp_map_prd
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trainTypes != null">
|
||||
train_types = #{trainTypes,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MpMapPrd">
|
||||
update mp_map_prd
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
train_types = #{trainTypes,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.MpStationRunningDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.MpStationRunning">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="start_station_code" jdbcType="VARCHAR" property="startStationCode" />
|
||||
<result column="start_section_code" jdbcType="VARCHAR" property="startSectionCode" />
|
||||
<result column="end_station_code" jdbcType="VARCHAR" property="endStationCode" />
|
||||
<result column="end_section_code" jdbcType="VARCHAR" property="endSectionCode" />
|
||||
<result column="direction_code" jdbcType="VARCHAR" property="directionCode" />
|
||||
<result column="distance" jdbcType="INTEGER" property="distance" />
|
||||
</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, start_station_code, start_section_code, end_station_code, end_section_code,
|
||||
direction_code, distance
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.MpStationRunningExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from mp_station_running
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from mp_station_running
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from mp_station_running
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.MpStationRunningExample">
|
||||
delete from mp_station_running
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MpStationRunning" useGeneratedKeys="true">
|
||||
insert into mp_station_running (map_id, start_station_code, start_section_code,
|
||||
end_station_code, end_section_code, direction_code,
|
||||
distance)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{startStationCode,jdbcType=VARCHAR}, #{startSectionCode,jdbcType=VARCHAR},
|
||||
#{endStationCode,jdbcType=VARCHAR}, #{endSectionCode,jdbcType=VARCHAR}, #{directionCode,jdbcType=VARCHAR},
|
||||
#{distance,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.MpStationRunning" useGeneratedKeys="true">
|
||||
insert into mp_station_running
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
start_station_code,
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code,
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
end_station_code,
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code,
|
||||
</if>
|
||||
<if test="directionCode != null">
|
||||
direction_code,
|
||||
</if>
|
||||
<if test="distance != null">
|
||||
distance,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
#{startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
#{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
#{endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
#{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="directionCode != null">
|
||||
#{directionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="distance != null">
|
||||
#{distance,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.MpStationRunningExample" resultType="java.lang.Long">
|
||||
select count(*) from mp_station_running
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update mp_station_running
|
||||
<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.startStationCode != null">
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startSectionCode != null">
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endStationCode != null">
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endSectionCode != null">
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.directionCode != null">
|
||||
direction_code = #{record.directionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.distance != null">
|
||||
distance = #{record.distance,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update mp_station_running
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
direction_code = #{record.directionCode,jdbcType=VARCHAR},
|
||||
distance = #{record.distance,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.MpStationRunning">
|
||||
update mp_station_running
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="directionCode != null">
|
||||
direction_code = #{directionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="distance != null">
|
||||
distance = #{distance,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.MpStationRunning">
|
||||
update mp_station_running
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
direction_code = #{directionCode,jdbcType=VARCHAR},
|
||||
distance = #{distance,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,351 @@
|
|||
<?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>
|
|
@ -0,0 +1,243 @@
|
|||
<?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.OperatePlaceholderDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.OperatePlaceholder">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="code" jdbcType="BIGINT" property="code" />
|
||||
<result column="training_type" jdbcType="VARCHAR" property="trainingType" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="val" jdbcType="VARCHAR" property="val" />
|
||||
<result column="val_new" jdbcType="VARCHAR" property="valNew" />
|
||||
</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, code, training_type, `type`, `name`, val, val_new
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.OperatePlaceholderExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from operate_placeholder
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from operate_placeholder
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from operate_placeholder
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.OperatePlaceholderExample">
|
||||
delete from operate_placeholder
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.OperatePlaceholder" useGeneratedKeys="true">
|
||||
insert into operate_placeholder (code, training_type, `type`,
|
||||
`name`, val, val_new)
|
||||
values (#{code,jdbcType=BIGINT}, #{trainingType,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{val,jdbcType=VARCHAR}, #{valNew,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.OperatePlaceholder" useGeneratedKeys="true">
|
||||
insert into operate_placeholder
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
training_type,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="val != null">
|
||||
val,
|
||||
</if>
|
||||
<if test="valNew != null">
|
||||
val_new,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
#{trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="val != null">
|
||||
#{val,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="valNew != null">
|
||||
#{valNew,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.OperatePlaceholderExample" resultType="java.lang.Long">
|
||||
select count(*) from operate_placeholder
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update operate_placeholder
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trainingType != null">
|
||||
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.val != null">
|
||||
val = #{record.val,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.valNew != null">
|
||||
val_new = #{record.valNew,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update operate_placeholder
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=BIGINT},
|
||||
training_type = #{record.trainingType,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
val = #{record.val,jdbcType=VARCHAR},
|
||||
val_new = #{record.valNew,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.OperatePlaceholder">
|
||||
update operate_placeholder
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trainingType != null">
|
||||
training_type = #{trainingType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="val != null">
|
||||
val = #{val,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="valNew != null">
|
||||
val_new = #{valNew,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.OperatePlaceholder">
|
||||
update operate_placeholder
|
||||
set code = #{code,jdbcType=BIGINT},
|
||||
training_type = #{trainingType,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
val = #{val,jdbcType=VARCHAR},
|
||||
val_new = #{valNew,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,275 @@
|
|||
<?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.OperateStepDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.OperateStep">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="definition_id" jdbcType="BIGINT" property="definitionId" />
|
||||
<result column="order_num" jdbcType="INTEGER" property="orderNum" />
|
||||
<result column="operate_code" jdbcType="VARCHAR" property="operateCode" />
|
||||
<result column="tip" jdbcType="VARCHAR" property="tip" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="sub_type" jdbcType="VARCHAR" property="subType" />
|
||||
<result column="val" jdbcType="VARCHAR" property="val" />
|
||||
<result column="code_Type" jdbcType="VARCHAR" property="codeType" />
|
||||
</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, definition_id, order_num, operate_code, tip, device_type, sub_type, val, code_Type
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.OperateStepExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from operate_step
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from operate_step
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from operate_step
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.OperateStepExample">
|
||||
delete from operate_step
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.OperateStep" useGeneratedKeys="true">
|
||||
insert into operate_step (definition_id, order_num, operate_code,
|
||||
tip, device_type, sub_type,
|
||||
val, code_Type)
|
||||
values (#{definitionId,jdbcType=BIGINT}, #{orderNum,jdbcType=INTEGER}, #{operateCode,jdbcType=VARCHAR},
|
||||
#{tip,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR}, #{subType,jdbcType=VARCHAR},
|
||||
#{val,jdbcType=VARCHAR}, #{codeType,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.OperateStep" useGeneratedKeys="true">
|
||||
insert into operate_step
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="definitionId != null">
|
||||
definition_id,
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num,
|
||||
</if>
|
||||
<if test="operateCode != null">
|
||||
operate_code,
|
||||
</if>
|
||||
<if test="tip != null">
|
||||
tip,
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type,
|
||||
</if>
|
||||
<if test="subType != null">
|
||||
sub_type,
|
||||
</if>
|
||||
<if test="val != null">
|
||||
val,
|
||||
</if>
|
||||
<if test="codeType != null">
|
||||
code_Type,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="definitionId != null">
|
||||
#{definitionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
#{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operateCode != null">
|
||||
#{operateCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tip != null">
|
||||
#{tip,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
#{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="subType != null">
|
||||
#{subType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="val != null">
|
||||
#{val,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="codeType != null">
|
||||
#{codeType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.OperateStepExample" resultType="java.lang.Long">
|
||||
select count(*) from operate_step
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update operate_step
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.definitionId != null">
|
||||
definition_id = #{record.definitionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderNum != null">
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.operateCode != null">
|
||||
operate_code = #{record.operateCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tip != null">
|
||||
tip = #{record.tip,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.subType != null">
|
||||
sub_type = #{record.subType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.val != null">
|
||||
val = #{record.val,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.codeType != null">
|
||||
code_Type = #{record.codeType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update operate_step
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
definition_id = #{record.definitionId,jdbcType=BIGINT},
|
||||
order_num = #{record.orderNum,jdbcType=INTEGER},
|
||||
operate_code = #{record.operateCode,jdbcType=VARCHAR},
|
||||
tip = #{record.tip,jdbcType=VARCHAR},
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
sub_type = #{record.subType,jdbcType=VARCHAR},
|
||||
val = #{record.val,jdbcType=VARCHAR},
|
||||
code_Type = #{record.codeType,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.OperateStep">
|
||||
update operate_step
|
||||
<set>
|
||||
<if test="definitionId != null">
|
||||
definition_id = #{definitionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderNum != null">
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="operateCode != null">
|
||||
operate_code = #{operateCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tip != null">
|
||||
tip = #{tip,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="subType != null">
|
||||
sub_type = #{subType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="val != null">
|
||||
val = #{val,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="codeType != null">
|
||||
code_Type = #{codeType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.OperateStep">
|
||||
update operate_step
|
||||
set definition_id = #{definitionId,jdbcType=BIGINT},
|
||||
order_num = #{orderNum,jdbcType=INTEGER},
|
||||
operate_code = #{operateCode,jdbcType=VARCHAR},
|
||||
tip = #{tip,jdbcType=VARCHAR},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
sub_type = #{subType,jdbcType=VARCHAR},
|
||||
val = #{val,jdbcType=VARCHAR},
|
||||
code_Type = #{codeType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,166 @@
|
|||
<?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.OrganizationDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Organization">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</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, `name`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.OrganizationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from organization
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from organization
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from organization
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.OrganizationExample">
|
||||
delete from organization
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Organization" useGeneratedKeys="true">
|
||||
insert into organization (`name`)
|
||||
values (#{name,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Organization" useGeneratedKeys="true">
|
||||
insert into organization
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.OrganizationExample" resultType="java.lang.Long">
|
||||
select count(*) from organization
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update organization
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update organization
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Organization">
|
||||
update organization
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Organization">
|
||||
update organization
|
||||
set `name` = #{name,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,172 @@
|
|||
<?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.OrganizationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Organization">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</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, name
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.OrganizationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from organization
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from organization
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from organization
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.OrganizationExample">
|
||||
delete from organization
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.joylink.ms.entity.Organization">
|
||||
insert into organization (id, name)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.Organization">
|
||||
insert into organization
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.OrganizationExample" resultType="java.lang.Long">
|
||||
select count(*) from organization
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update organization
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update organization
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Organization">
|
||||
update organization
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Organization">
|
||||
update organization
|
||||
set name = #{name,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,340 @@
|
|||
<?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.PermissionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Permission">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="is_package" jdbcType="BIT" property="isPackage" />
|
||||
<result column="rel_permissions" jdbcType="VARCHAR" property="relPermissions" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="lesson_id" jdbcType="BIGINT" property="lessonId" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
</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, `name`, is_package, rel_permissions, `type`, map_id, prd_type, lesson_id, creator_id,
|
||||
create_time, update_user_id, update_time, remarks
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.PermissionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from permission
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from permission
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from permission
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.PermissionExample">
|
||||
delete from permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Permission" useGeneratedKeys="true">
|
||||
insert into permission (`name`, is_package, rel_permissions,
|
||||
`type`, map_id, prd_type,
|
||||
lesson_id, creator_id, create_time,
|
||||
update_user_id, update_time, remarks
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{isPackage,jdbcType=BIT}, #{relPermissions,jdbcType=VARCHAR},
|
||||
#{type,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, #{prdType,jdbcType=VARCHAR},
|
||||
#{lessonId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Permission" useGeneratedKeys="true">
|
||||
insert into permission
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="isPackage != null">
|
||||
is_package,
|
||||
</if>
|
||||
<if test="relPermissions != null">
|
||||
rel_permissions,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="lessonId != null">
|
||||
lesson_id,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPackage != null">
|
||||
#{isPackage,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="relPermissions != null">
|
||||
#{relPermissions,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lessonId != null">
|
||||
#{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.PermissionExample" resultType="java.lang.Long">
|
||||
select count(*) from permission
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update permission
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isPackage != null">
|
||||
is_package = #{record.isPackage,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.relPermissions != null">
|
||||
rel_permissions = #{record.relPermissions,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lessonId != null">
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update permission
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
is_package = #{record.isPackage,jdbcType=BIT},
|
||||
rel_permissions = #{record.relPermissions,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
lesson_id = #{record.lessonId,jdbcType=BIGINT},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Permission">
|
||||
update permission
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isPackage != null">
|
||||
is_package = #{isPackage,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="relPermissions != null">
|
||||
rel_permissions = #{relPermissions,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lessonId != null">
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Permission">
|
||||
update permission
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
is_package = #{isPackage,jdbcType=BIT},
|
||||
rel_permissions = #{relPermissions,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
lesson_id = #{lessonId,jdbcType=BIGINT},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
remarks = #{remarks,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,418 @@
|
|||
<?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.PermissionDistributeDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.PermissionDistribute">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
|
||||
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
||||
<result column="organization_id" jdbcType="BIGINT" property="organizationId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="amount" jdbcType="INTEGER" property="amount" />
|
||||
<result column="remains" jdbcType="INTEGER" property="remains" />
|
||||
<result column="forever" jdbcType="BIT" property="forever" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="can_distribute" jdbcType="BIT" property="canDistribute" />
|
||||
<result column="is_package" jdbcType="BIT" property="isPackage" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="source" jdbcType="VARCHAR" property="source" />
|
||||
<result column="only_get_one" jdbcType="BIT" property="onlyGetOne" />
|
||||
<result column="from_user_permission_id" jdbcType="BIGINT" property="fromUserPermissionId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</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, permission_id, order_code, organization_id, user_id, amount, remains, forever,
|
||||
start_time, end_time, `status`, can_distribute, is_package, parent_id, `source`,
|
||||
only_get_one, from_user_permission_id, create_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.PermissionDistributeExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from permission_distribute
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from permission_distribute
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from permission_distribute
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.PermissionDistributeExample">
|
||||
delete from permission_distribute
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PermissionDistribute" useGeneratedKeys="true">
|
||||
insert into permission_distribute (permission_id, order_code, organization_id,
|
||||
user_id, amount, remains,
|
||||
forever, start_time, end_time,
|
||||
`status`, can_distribute, is_package,
|
||||
parent_id, `source`, only_get_one,
|
||||
from_user_permission_id, create_time)
|
||||
values (#{permissionId,jdbcType=BIGINT}, #{orderCode,jdbcType=VARCHAR}, #{organizationId,jdbcType=BIGINT},
|
||||
#{userId,jdbcType=BIGINT}, #{amount,jdbcType=INTEGER}, #{remains,jdbcType=INTEGER},
|
||||
#{forever,jdbcType=BIT}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
|
||||
#{status,jdbcType=VARCHAR}, #{canDistribute,jdbcType=BIT}, #{isPackage,jdbcType=BIT},
|
||||
#{parentId,jdbcType=BIGINT}, #{source,jdbcType=VARCHAR}, #{onlyGetOne,jdbcType=BIT},
|
||||
#{fromUserPermissionId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PermissionDistribute" useGeneratedKeys="true">
|
||||
insert into permission_distribute
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="permissionId != null">
|
||||
permission_id,
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code,
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
organization_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount,
|
||||
</if>
|
||||
<if test="remains != null">
|
||||
remains,
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
forever,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="canDistribute != null">
|
||||
can_distribute,
|
||||
</if>
|
||||
<if test="isPackage != null">
|
||||
is_package,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="source != null">
|
||||
`source`,
|
||||
</if>
|
||||
<if test="onlyGetOne != null">
|
||||
only_get_one,
|
||||
</if>
|
||||
<if test="fromUserPermissionId != null">
|
||||
from_user_permission_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="permissionId != null">
|
||||
#{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
#{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
#{organizationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
#{amount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="remains != null">
|
||||
#{remains,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
#{forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="canDistribute != null">
|
||||
#{canDistribute,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="isPackage != null">
|
||||
#{isPackage,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
#{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="onlyGetOne != null">
|
||||
#{onlyGetOne,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="fromUserPermissionId != null">
|
||||
#{fromUserPermissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.PermissionDistributeExample" resultType="java.lang.Long">
|
||||
select count(*) from permission_distribute
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update permission_distribute
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.permissionId != null">
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderCode != null">
|
||||
order_code = #{record.orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.organizationId != null">
|
||||
organization_id = #{record.organizationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.amount != null">
|
||||
amount = #{record.amount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.remains != null">
|
||||
remains = #{record.remains,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.forever != null">
|
||||
forever = #{record.forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.canDistribute != null">
|
||||
can_distribute = #{record.canDistribute,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.isPackage != null">
|
||||
is_package = #{record.isPackage,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.source != null">
|
||||
`source` = #{record.source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.onlyGetOne != null">
|
||||
only_get_one = #{record.onlyGetOne,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.fromUserPermissionId != null">
|
||||
from_user_permission_id = #{record.fromUserPermissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update permission_distribute
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
order_code = #{record.orderCode,jdbcType=VARCHAR},
|
||||
organization_id = #{record.organizationId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
amount = #{record.amount,jdbcType=INTEGER},
|
||||
remains = #{record.remains,jdbcType=INTEGER},
|
||||
forever = #{record.forever,jdbcType=BIT},
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{record.endTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
can_distribute = #{record.canDistribute,jdbcType=BIT},
|
||||
is_package = #{record.isPackage,jdbcType=BIT},
|
||||
parent_id = #{record.parentId,jdbcType=BIGINT},
|
||||
`source` = #{record.source,jdbcType=VARCHAR},
|
||||
only_get_one = #{record.onlyGetOne,jdbcType=BIT},
|
||||
from_user_permission_id = #{record.fromUserPermissionId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.PermissionDistribute">
|
||||
update permission_distribute
|
||||
<set>
|
||||
<if test="permissionId != null">
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="orderCode != null">
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
organization_id = #{organizationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="amount != null">
|
||||
amount = #{amount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="remains != null">
|
||||
remains = #{remains,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
forever = #{forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="canDistribute != null">
|
||||
can_distribute = #{canDistribute,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="isPackage != null">
|
||||
is_package = #{isPackage,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="source != null">
|
||||
`source` = #{source,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="onlyGetOne != null">
|
||||
only_get_one = #{onlyGetOne,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="fromUserPermissionId != null">
|
||||
from_user_permission_id = #{fromUserPermissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.PermissionDistribute">
|
||||
update permission_distribute
|
||||
set permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
order_code = #{orderCode,jdbcType=VARCHAR},
|
||||
organization_id = #{organizationId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
amount = #{amount,jdbcType=INTEGER},
|
||||
remains = #{remains,jdbcType=INTEGER},
|
||||
forever = #{forever,jdbcType=BIT},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
end_time = #{endTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
can_distribute = #{canDistribute,jdbcType=BIT},
|
||||
is_package = #{isPackage,jdbcType=BIT},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
`source` = #{source,jdbcType=VARCHAR},
|
||||
only_get_one = #{onlyGetOne,jdbcType=BIT},
|
||||
from_user_permission_id = #{fromUserPermissionId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,385 @@
|
|||
<?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.PlanRoutingDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.PlanRouting">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="start_station_code" jdbcType="VARCHAR" property="startStationCode" />
|
||||
<result column="start_section_code" jdbcType="VARCHAR" property="startSectionCode" />
|
||||
<result column="end_station_code" jdbcType="VARCHAR" property="endStationCode" />
|
||||
<result column="end_section_code" jdbcType="VARCHAR" property="endSectionCode" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.PlanRouting">
|
||||
<result column="via_sections" jdbcType="LONGVARCHAR" property="viaSections" />
|
||||
</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, `name`, start_station_code, start_section_code, end_station_code, end_section_code,
|
||||
description, user_id, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
via_sections
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.PlanRoutingExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from plan_routing
|
||||
<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.PlanRoutingExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from plan_routing
|
||||
<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 plan_routing
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from plan_routing
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.PlanRoutingExample">
|
||||
delete from plan_routing
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlanRouting" useGeneratedKeys="true">
|
||||
insert into plan_routing (map_id, `name`, start_station_code,
|
||||
start_section_code, end_station_code, end_section_code,
|
||||
description, user_id, create_time,
|
||||
update_time, via_sections)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{startStationCode,jdbcType=VARCHAR},
|
||||
#{startSectionCode,jdbcType=VARCHAR}, #{endStationCode,jdbcType=VARCHAR}, #{endSectionCode,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{viaSections,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlanRouting" useGeneratedKeys="true">
|
||||
insert into plan_routing
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
start_station_code,
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code,
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
end_station_code,
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="viaSections != null">
|
||||
via_sections,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
#{startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
#{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
#{endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
#{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="viaSections != null">
|
||||
#{viaSections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.PlanRoutingExample" resultType="java.lang.Long">
|
||||
select count(*) from plan_routing
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update plan_routing
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startStationCode != null">
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startSectionCode != null">
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endStationCode != null">
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.endSectionCode != null">
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.viaSections != null">
|
||||
via_sections = #{record.viaSections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update plan_routing
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
via_sections = #{record.viaSections,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update plan_routing
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
start_station_code = #{record.startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{record.startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{record.endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{record.endSectionCode,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.PlanRouting">
|
||||
update plan_routing
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startStationCode != null">
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startSectionCode != null">
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endStationCode != null">
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="endSectionCode != null">
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="viaSections != null">
|
||||
via_sections = #{viaSections,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.PlanRouting">
|
||||
update plan_routing
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
via_sections = #{viaSections,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.PlanRouting">
|
||||
update plan_routing
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
start_station_code = #{startStationCode,jdbcType=VARCHAR},
|
||||
start_section_code = #{startSectionCode,jdbcType=VARCHAR},
|
||||
end_station_code = #{endStationCode,jdbcType=VARCHAR},
|
||||
end_section_code = #{endSectionCode,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,278 @@
|
|||
<?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.PlanStationRunLevelDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.PlanStationRunLevel">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.PlanStationRunLevel">
|
||||
<result column="json_data" jdbcType="LONGVARCHAR" property="jsonData" />
|
||||
</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, user_id, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
json_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.PlanStationRunLevelExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from plan_station_run_level
|
||||
<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.PlanStationRunLevelExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from plan_station_run_level
|
||||
<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 plan_station_run_level
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from plan_station_run_level
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.PlanStationRunLevelExample">
|
||||
delete from plan_station_run_level
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlanStationRunLevel" useGeneratedKeys="true">
|
||||
insert into plan_station_run_level (map_id, user_id, create_time,
|
||||
update_time, json_data)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{jsonData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlanStationRunLevel" useGeneratedKeys="true">
|
||||
insert into plan_station_run_level
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="jsonData != null">
|
||||
json_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="jsonData != null">
|
||||
#{jsonData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.PlanStationRunLevelExample" resultType="java.lang.Long">
|
||||
select count(*) from plan_station_run_level
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update plan_station_run_level
|
||||
<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.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.jsonData != null">
|
||||
json_data = #{record.jsonData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update plan_station_run_level
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
json_data = #{record.jsonData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update plan_station_run_level
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.PlanStationRunLevel">
|
||||
update plan_station_run_level
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="jsonData != null">
|
||||
json_data = #{jsonData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.PlanStationRunLevel">
|
||||
update plan_station_run_level
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
json_data = #{jsonData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.PlanStationRunLevel">
|
||||
update plan_station_run_level
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,278 @@
|
|||
<?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.PlanStationStopDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.PlanStationStop">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.PlanStationStop">
|
||||
<result column="json_data" jdbcType="LONGVARCHAR" property="jsonData" />
|
||||
</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, user_id, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
json_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.PlanStationStopExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from plan_station_stop
|
||||
<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.PlanStationStopExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from plan_station_stop
|
||||
<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 plan_station_stop
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from plan_station_stop
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.PlanStationStopExample">
|
||||
delete from plan_station_stop
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlanStationStop" useGeneratedKeys="true">
|
||||
insert into plan_station_stop (map_id, user_id, create_time,
|
||||
update_time, json_data)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime,jdbcType=TIMESTAMP}, #{jsonData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlanStationStop" useGeneratedKeys="true">
|
||||
insert into plan_station_stop
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="jsonData != null">
|
||||
json_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="jsonData != null">
|
||||
#{jsonData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.PlanStationStopExample" resultType="java.lang.Long">
|
||||
select count(*) from plan_station_stop
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update plan_station_stop
|
||||
<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.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.jsonData != null">
|
||||
json_data = #{record.jsonData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update plan_station_stop
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
json_data = #{record.jsonData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update plan_station_stop
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.PlanStationStop">
|
||||
update plan_station_stop
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="jsonData != null">
|
||||
json_data = #{jsonData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.PlanStationStop">
|
||||
update plan_station_stop
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
json_data = #{jsonData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.PlanStationStop">
|
||||
update plan_station_stop
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.PlcConfigDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.PlcConfig">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="gateway_id" jdbcType="VARCHAR" property="gatewayId" />
|
||||
<result column="group" jdbcType="VARCHAR" property="group" />
|
||||
<result column="gateway_name" jdbcType="VARCHAR" property="gatewayName" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.PlcConfig">
|
||||
<result column="plc_config" jdbcType="LONGVARCHAR" property="plcConfig" />
|
||||
</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, gateway_id, `group`, gateway_name
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
plc_config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.PlcConfigExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from plc_config
|
||||
<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.PlcConfigExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from plc_config
|
||||
<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 plc_config
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from plc_config
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.PlcConfigExample">
|
||||
delete from plc_config
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlcConfig" useGeneratedKeys="true">
|
||||
insert into plc_config (gateway_id, `group`, gateway_name,
|
||||
plc_config)
|
||||
values (#{gatewayId,jdbcType=VARCHAR}, #{group,jdbcType=VARCHAR}, #{gatewayName,jdbcType=VARCHAR},
|
||||
#{plcConfig,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.PlcConfig" useGeneratedKeys="true">
|
||||
insert into plc_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="gatewayId != null">
|
||||
gateway_id,
|
||||
</if>
|
||||
<if test="group != null">
|
||||
`group`,
|
||||
</if>
|
||||
<if test="gatewayName != null">
|
||||
gateway_name,
|
||||
</if>
|
||||
<if test="plcConfig != null">
|
||||
plc_config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="gatewayId != null">
|
||||
#{gatewayId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="group != null">
|
||||
#{group,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gatewayName != null">
|
||||
#{gatewayName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plcConfig != null">
|
||||
#{plcConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.PlcConfigExample" resultType="java.lang.Long">
|
||||
select count(*) from plc_config
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update plc_config
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.gatewayId != null">
|
||||
gateway_id = #{record.gatewayId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.group != null">
|
||||
`group` = #{record.group,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.gatewayName != null">
|
||||
gateway_name = #{record.gatewayName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.plcConfig != null">
|
||||
plc_config = #{record.plcConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update plc_config
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
gateway_id = #{record.gatewayId,jdbcType=VARCHAR},
|
||||
`group` = #{record.group,jdbcType=VARCHAR},
|
||||
gateway_name = #{record.gatewayName,jdbcType=VARCHAR},
|
||||
plc_config = #{record.plcConfig,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update plc_config
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
gateway_id = #{record.gatewayId,jdbcType=VARCHAR},
|
||||
`group` = #{record.group,jdbcType=VARCHAR},
|
||||
gateway_name = #{record.gatewayName,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.PlcConfig">
|
||||
update plc_config
|
||||
<set>
|
||||
<if test="gatewayId != null">
|
||||
gateway_id = #{gatewayId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="group != null">
|
||||
`group` = #{group,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="gatewayName != null">
|
||||
gateway_name = #{gatewayName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="plcConfig != null">
|
||||
plc_config = #{plcConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.PlcConfig">
|
||||
update plc_config
|
||||
set gateway_id = #{gatewayId,jdbcType=VARCHAR},
|
||||
`group` = #{group,jdbcType=VARCHAR},
|
||||
gateway_name = #{gatewayName,jdbcType=VARCHAR},
|
||||
plc_config = #{plcConfig,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.PlcConfig">
|
||||
update plc_config
|
||||
set gateway_id = #{gatewayId,jdbcType=VARCHAR},
|
||||
`group` = #{group,jdbcType=VARCHAR},
|
||||
gateway_name = #{gatewayName,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,297 @@
|
|||
<?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.ProjectDeviceDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.ProjectDevice">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="creator" jdbcType="BIGINT" property="creator" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.ProjectDevice">
|
||||
<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, project_code, code, `type`, creator, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.ProjectDeviceExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from project_device
|
||||
<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.ProjectDeviceExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from project_device
|
||||
<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 project_device
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from project_device
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ProjectDeviceExample">
|
||||
delete from project_device
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ProjectDevice" useGeneratedKeys="true">
|
||||
insert into project_device (project_code, code, `type`,
|
||||
creator, create_time, config
|
||||
)
|
||||
values (#{projectCode,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{creator,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{config,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ProjectDevice" useGeneratedKeys="true">
|
||||
insert into project_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ProjectDeviceExample" resultType="java.lang.Long">
|
||||
select count(*) from project_device
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update project_device
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creator != null">
|
||||
creator = #{record.creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</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 project_device
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
creator = #{record.creator,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
config = #{record.config,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update project_device
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
creator = #{record.creator,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ProjectDevice">
|
||||
update project_device
|
||||
<set>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator = #{creator,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</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.ProjectDevice">
|
||||
update project_device
|
||||
set project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
creator = #{creator,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.ProjectDevice">
|
||||
update project_device
|
||||
set project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
creator = #{creator,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,378 @@
|
|||
<?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.QuestDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Quest">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="map_location" jdbcType="VARCHAR" property="mapLocation" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.QuestWithBLOBs">
|
||||
<result column="bg_Scenes" jdbcType="LONGVARCHAR" property="bgScenes" />
|
||||
<result column="members_json" jdbcType="LONGVARCHAR" property="membersJson" />
|
||||
<result column="targets_json" jdbcType="LONGVARCHAR" property="targetsJson" />
|
||||
<result column="script_json" jdbcType="LONGVARCHAR" property="scriptJson" />
|
||||
</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, `name`, description, map_location, `status`, creator_id, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
bg_Scenes, members_json, targets_json, script_json
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.QuestExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from quest
|
||||
<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.QuestExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from quest
|
||||
<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 quest
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from quest
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.QuestExample">
|
||||
delete from quest
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.QuestWithBLOBs" useGeneratedKeys="true">
|
||||
insert into quest (map_id, `name`, description,
|
||||
map_location, `status`, creator_id,
|
||||
create_time, bg_Scenes, members_json,
|
||||
targets_json, script_json)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{mapLocation,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{bgScenes,jdbcType=LONGVARCHAR}, #{membersJson,jdbcType=LONGVARCHAR},
|
||||
#{targetsJson,jdbcType=LONGVARCHAR}, #{scriptJson,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.QuestWithBLOBs" useGeneratedKeys="true">
|
||||
insert into quest
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="mapLocation != null">
|
||||
map_location,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="bgScenes != null">
|
||||
bg_Scenes,
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
members_json,
|
||||
</if>
|
||||
<if test="targetsJson != null">
|
||||
targets_json,
|
||||
</if>
|
||||
<if test="scriptJson != null">
|
||||
script_json,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapLocation != null">
|
||||
#{mapLocation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bgScenes != null">
|
||||
#{bgScenes,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
#{membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="targetsJson != null">
|
||||
#{targetsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scriptJson != null">
|
||||
#{scriptJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.QuestExample" resultType="java.lang.Long">
|
||||
select count(*) from quest
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update quest
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapLocation != null">
|
||||
map_location = #{record.mapLocation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.bgScenes != null">
|
||||
bg_Scenes = #{record.bgScenes,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.membersJson != null">
|
||||
members_json = #{record.membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.targetsJson != null">
|
||||
targets_json = #{record.targetsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.scriptJson != null">
|
||||
script_json = #{record.scriptJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update quest
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
map_location = #{record.mapLocation,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
bg_Scenes = #{record.bgScenes,jdbcType=LONGVARCHAR},
|
||||
members_json = #{record.membersJson,jdbcType=LONGVARCHAR},
|
||||
targets_json = #{record.targetsJson,jdbcType=LONGVARCHAR},
|
||||
script_json = #{record.scriptJson,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update quest
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
map_location = #{record.mapLocation,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.QuestWithBLOBs">
|
||||
update quest
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapLocation != null">
|
||||
map_location = #{mapLocation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bgScenes != null">
|
||||
bg_Scenes = #{bgScenes,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
members_json = #{membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="targetsJson != null">
|
||||
targets_json = #{targetsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scriptJson != null">
|
||||
script_json = #{scriptJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.QuestWithBLOBs">
|
||||
update quest
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
map_location = #{mapLocation,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
bg_Scenes = #{bgScenes,jdbcType=LONGVARCHAR},
|
||||
members_json = #{membersJson,jdbcType=LONGVARCHAR},
|
||||
targets_json = #{targetsJson,jdbcType=LONGVARCHAR},
|
||||
script_json = #{scriptJson,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Quest">
|
||||
update quest
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
map_location = #{mapLocation,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,276 @@
|
|||
<?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.RaceDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Race">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="start_date" jdbcType="DATE" property="startDate" />
|
||||
<result column="end_date" jdbcType="DATE" property="endDate" />
|
||||
<result column="optional_roles" jdbcType="VARCHAR" property="optionalRoles" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
</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, `name`, map_id, start_date, end_date, optional_roles, creator_id, create_time,
|
||||
`status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceExample">
|
||||
delete from race
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Race" useGeneratedKeys="true">
|
||||
insert into race (`name`, map_id, start_date,
|
||||
end_date, optional_roles, creator_id,
|
||||
create_time, `status`)
|
||||
values (#{name,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, #{startDate,jdbcType=DATE},
|
||||
#{endDate,jdbcType=DATE}, #{optionalRoles,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.Race" useGeneratedKeys="true">
|
||||
insert into race
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
start_date,
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
end_date,
|
||||
</if>
|
||||
<if test="optionalRoles != null">
|
||||
optional_roles,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
#{startDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
#{endDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="optionalRoles != null">
|
||||
#{optionalRoles,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceExample" resultType="java.lang.Long">
|
||||
select count(*) from race
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.startDate != null">
|
||||
start_date = #{record.startDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.endDate != null">
|
||||
end_date = #{record.endDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.optionalRoles != null">
|
||||
optional_roles = #{record.optionalRoles,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
start_date = #{record.startDate,jdbcType=DATE},
|
||||
end_date = #{record.endDate,jdbcType=DATE},
|
||||
optional_roles = #{record.optionalRoles,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.Race">
|
||||
update race
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
start_date = #{startDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
end_date = #{endDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="optionalRoles != null">
|
||||
optional_roles = #{optionalRoles,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Race">
|
||||
update race
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
start_date = #{startDate,jdbcType=DATE},
|
||||
end_date = #{endDate,jdbcType=DATE},
|
||||
optional_roles = #{optionalRoles,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,304 @@
|
|||
<?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.RaceQuestionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceQuestion">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="topic" jdbcType="VARCHAR" property="topic" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ResultMapRef" type="com.joylink.ms.vo.client.question.QuestionVO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="topic" jdbcType="VARCHAR" property="topic" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="company_id" jdbcType="VARCHAR" property="companyId" />
|
||||
<collection property="optionList" ofType="com.joylink.ms.vo.client.question.QuestionOptionVO">
|
||||
<id column="oid" jdbcType="BIGINT" property="id" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="correct" jdbcType="BIT" property="correct" />
|
||||
<result column="order" jdbcType="TINYINT" property="order" />
|
||||
</collection>
|
||||
</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, topic, `type`, create_user_id, create_time, project_code, company_id
|
||||
</sql>
|
||||
|
||||
<select id="selectWithRef" resultMap="ResultMapRef">
|
||||
SELECT q.id,q.topic,q.type,q.project_code,q.company_id, o.id oid,o.content,o.correct,o.order FROM race_question q JOIN race_question_option o ON q.id = o.question_id
|
||||
<where>
|
||||
<if test="topic != null">
|
||||
q.topic LIKE concat('%',#{topic},'%')
|
||||
</if>
|
||||
<if test="type != null">
|
||||
AND q.type = #{type}
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
AND q.project_code = #{projectCode}
|
||||
</if>
|
||||
<if test="projectCode == null">
|
||||
AND q.project_code is null
|
||||
<if test="companyId != null">
|
||||
AND q.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="companyId == null">
|
||||
AND q.company_id is null
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="countNumByType" resultType="com.joylink.ms.vo.client.competition.TheoryQuestionCountVO">
|
||||
select count(*) as num,`type` from race_question
|
||||
<where>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode}
|
||||
</if>
|
||||
<if test="projectCode == null">
|
||||
project_code is null
|
||||
<if test="companyId != null">
|
||||
AND company_id = #{companyId}
|
||||
</if>
|
||||
<if test="companyId == null">
|
||||
AND company_id is null
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
group by `type`
|
||||
</select>
|
||||
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceQuestionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race_question
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceQuestionExample">
|
||||
delete from race_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestion" useGeneratedKeys="true">
|
||||
insert into race_question (topic, `type`, create_user_id,
|
||||
create_time, project_code, company_id
|
||||
)
|
||||
values (#{topic,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{createUserId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{projectCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestion" useGeneratedKeys="true">
|
||||
insert into race_question
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="topic != null">
|
||||
topic,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type`,
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="topic != null">
|
||||
#{topic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
#{createUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceQuestionExample" resultType="java.lang.Long">
|
||||
select count(*) from race_question
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_question
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.topic != null">
|
||||
topic = #{record.topic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createUserId != null">
|
||||
create_user_id = #{record.createUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.companyId != null">
|
||||
company_id = #{record.companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_question
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
topic = #{record.topic,jdbcType=VARCHAR},
|
||||
`type` = #{record.type,jdbcType=VARCHAR},
|
||||
create_user_id = #{record.createUserId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
company_id = #{record.companyId,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceQuestion">
|
||||
update race_question
|
||||
<set>
|
||||
<if test="topic != null">
|
||||
topic = #{topic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id = #{createUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceQuestion">
|
||||
update race_question
|
||||
set topic = #{topic,jdbcType=VARCHAR},
|
||||
`type` = #{type,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
company_id = #{companyId,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,244 @@
|
|||
<?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.RaceQuestionMocksLikesDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceQuestionMocksLikes">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RaceQuestionMocksLikes">
|
||||
<result column="likes_user" jdbcType="LONGVARCHAR" property="likesUser" />
|
||||
</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, user_id, project_code
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
likes_user
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikesExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from race_question_mocks_likes
|
||||
<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.RaceQuestionMocksLikesExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_mocks_likes
|
||||
<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.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from race_question_mocks_likes
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from race_question_mocks_likes
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikesExample">
|
||||
delete from race_question_mocks_likes
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikes" useGeneratedKeys="true">
|
||||
insert into race_question_mocks_likes (user_id, project_code, likes_user
|
||||
)
|
||||
values (#{userId,jdbcType=BIGINT}, #{projectCode,jdbcType=VARCHAR}, #{likesUser,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikes" useGeneratedKeys="true">
|
||||
insert into race_question_mocks_likes
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="likesUser != null">
|
||||
likes_user,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="likesUser != null">
|
||||
#{likesUser,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikesExample" resultType="java.lang.Long">
|
||||
select count(*) from race_question_mocks_likes
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_question_mocks_likes
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.likesUser != null">
|
||||
likes_user = #{record.likesUser,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update race_question_mocks_likes
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
likes_user = #{record.likesUser,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_question_mocks_likes
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikes">
|
||||
update race_question_mocks_likes
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="likesUser != null">
|
||||
likes_user = #{likesUser,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikes">
|
||||
update race_question_mocks_likes
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
likes_user = #{likesUser,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceQuestionMocksLikes">
|
||||
update race_question_mocks_likes
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.RaceQuestionMocksStatsDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceQuestionMocksStats">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="score" jdbcType="REAL" property="score" />
|
||||
<result column="accuracy" jdbcType="DECIMAL" property="accuracy" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="mock_time" jdbcType="TIMESTAMP" property="mockTime" />
|
||||
</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, user_id, score, accuracy, project_code, mock_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceQuestionMocksStatsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_mocks_stats
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_mocks_stats
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race_question_mocks_stats
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceQuestionMocksStatsExample">
|
||||
delete from race_question_mocks_stats
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionMocksStats" useGeneratedKeys="true">
|
||||
insert into race_question_mocks_stats (user_id, score, accuracy,
|
||||
project_code, mock_time)
|
||||
values (#{userId,jdbcType=BIGINT}, #{score,jdbcType=REAL}, #{accuracy,jdbcType=DECIMAL},
|
||||
#{projectCode,jdbcType=VARCHAR}, #{mockTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionMocksStats" useGeneratedKeys="true">
|
||||
insert into race_question_mocks_stats
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score,
|
||||
</if>
|
||||
<if test="accuracy != null">
|
||||
accuracy,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="mockTime != null">
|
||||
mock_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
#{score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="accuracy != null">
|
||||
#{accuracy,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mockTime != null">
|
||||
#{mockTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceQuestionMocksStatsExample" resultType="java.lang.Long">
|
||||
select count(*) from race_question_mocks_stats
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_question_mocks_stats
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.score != null">
|
||||
score = #{record.score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.accuracy != null">
|
||||
accuracy = #{record.accuracy,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mockTime != null">
|
||||
mock_time = #{record.mockTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_question_mocks_stats
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
score = #{record.score,jdbcType=REAL},
|
||||
accuracy = #{record.accuracy,jdbcType=DECIMAL},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
mock_time = #{record.mockTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceQuestionMocksStats">
|
||||
update race_question_mocks_stats
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score = #{score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="accuracy != null">
|
||||
accuracy = #{accuracy,jdbcType=DECIMAL},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mockTime != null">
|
||||
mock_time = #{mockTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceQuestionMocksStats">
|
||||
update race_question_mocks_stats
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
score = #{score,jdbcType=REAL},
|
||||
accuracy = #{accuracy,jdbcType=DECIMAL},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
mock_time = #{mockTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?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.RaceQuestionOptionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceQuestionOption">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="question_id" jdbcType="BIGINT" property="questionId" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="correct" jdbcType="BIT" property="correct" />
|
||||
<result column="order" jdbcType="TINYINT" property="order" />
|
||||
</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, question_id, content, correct, `order`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceQuestionOptionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_option
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_option
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race_question_option
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceQuestionOptionExample">
|
||||
delete from race_question_option
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionOption" useGeneratedKeys="true">
|
||||
insert into race_question_option (question_id, content, correct,
|
||||
`order`)
|
||||
values (#{questionId,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, #{correct,jdbcType=BIT},
|
||||
#{order,jdbcType=TINYINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionOption" useGeneratedKeys="true">
|
||||
insert into race_question_option
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
question_id,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
<if test="correct != null">
|
||||
correct,
|
||||
</if>
|
||||
<if test="order != null">
|
||||
`order`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
#{questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="correct != null">
|
||||
#{correct,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="order != null">
|
||||
#{order,jdbcType=TINYINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceQuestionOptionExample" resultType="java.lang.Long">
|
||||
select count(*) from race_question_option
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_question_option
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.questionId != null">
|
||||
question_id = #{record.questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.correct != null">
|
||||
correct = #{record.correct,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.order != null">
|
||||
`order` = #{record.order,jdbcType=TINYINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_question_option
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
question_id = #{record.questionId,jdbcType=BIGINT},
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
correct = #{record.correct,jdbcType=BIT},
|
||||
`order` = #{record.order,jdbcType=TINYINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceQuestionOption">
|
||||
update race_question_option
|
||||
<set>
|
||||
<if test="questionId != null">
|
||||
question_id = #{questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="correct != null">
|
||||
correct = #{correct,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="order != null">
|
||||
`order` = #{order,jdbcType=TINYINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceQuestionOption">
|
||||
update race_question_option
|
||||
set question_id = #{questionId,jdbcType=BIGINT},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
correct = #{correct,jdbcType=BIT},
|
||||
`order` = #{order,jdbcType=TINYINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.RaceQuestionProgressDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceQuestionProgress">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="question_index" jdbcType="BIGINT" property="questionIndex" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="incorrect" jdbcType="VARCHAR" property="incorrect" />
|
||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||
</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, user_id, question_index, project_code, incorrect, company_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceQuestionProgressExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_progress
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_question_progress
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race_question_progress
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceQuestionProgressExample">
|
||||
delete from race_question_progress
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionProgress" useGeneratedKeys="true">
|
||||
insert into race_question_progress (user_id, question_index, project_code,
|
||||
incorrect, company_id)
|
||||
values (#{userId,jdbcType=BIGINT}, #{questionIndex,jdbcType=BIGINT}, #{projectCode,jdbcType=VARCHAR},
|
||||
#{incorrect,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionProgress" useGeneratedKeys="true">
|
||||
insert into race_question_progress
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="questionIndex != null">
|
||||
question_index,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="incorrect != null">
|
||||
incorrect,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="questionIndex != null">
|
||||
#{questionIndex,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="incorrect != null">
|
||||
#{incorrect,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceQuestionProgressExample" resultType="java.lang.Long">
|
||||
select count(*) from race_question_progress
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_question_progress
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.questionIndex != null">
|
||||
question_index = #{record.questionIndex,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.incorrect != null">
|
||||
incorrect = #{record.incorrect,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.companyId != null">
|
||||
company_id = #{record.companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_question_progress
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
question_index = #{record.questionIndex,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
incorrect = #{record.incorrect,jdbcType=VARCHAR},
|
||||
company_id = #{record.companyId,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceQuestionProgress">
|
||||
update race_question_progress
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="questionIndex != null">
|
||||
question_index = #{questionIndex,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="incorrect != null">
|
||||
incorrect = #{incorrect,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceQuestionProgress">
|
||||
update race_question_progress
|
||||
set user_id = #{userId,jdbcType=BIGINT},
|
||||
question_index = #{questionIndex,jdbcType=BIGINT},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
incorrect = #{incorrect,jdbcType=VARCHAR},
|
||||
company_id = #{companyId,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,198 @@
|
|||
<?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.RaceQuestionsRulesDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceQuestionsRules">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||
<result column="rules" jdbcType="VARCHAR" property="rules" />
|
||||
</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, project_code, company_id, rules
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceQuestionsRulesExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_questions_rules
|
||||
<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.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_questions_rules
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from race_questions_rules
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceQuestionsRulesExample">
|
||||
delete from race_questions_rules
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionsRules" useGeneratedKeys="true">
|
||||
insert into race_questions_rules (project_code, company_id, rules
|
||||
)
|
||||
values (#{projectCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}, #{rules,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceQuestionsRules" useGeneratedKeys="true">
|
||||
insert into race_questions_rules
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
<if test="rules != null">
|
||||
rules,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="rules != null">
|
||||
#{rules,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceQuestionsRulesExample" resultType="java.lang.Long">
|
||||
select count(*) from race_questions_rules
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_questions_rules
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.companyId != null">
|
||||
company_id = #{record.companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.rules != null">
|
||||
rules = #{record.rules,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_questions_rules
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
company_id = #{record.companyId,jdbcType=INTEGER},
|
||||
rules = #{record.rules,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceQuestionsRules">
|
||||
update race_questions_rules
|
||||
<set>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="rules != null">
|
||||
rules = #{rules,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceQuestionsRules">
|
||||
update race_questions_rules
|
||||
set project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
rules = #{rules,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,340 @@
|
|||
<?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.RaceResultDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceResult">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="user_race_id" jdbcType="BIGINT" property="userRaceId" />
|
||||
<result column="question_id" jdbcType="BIGINT" property="questionId" />
|
||||
<result column="question_option_id" jdbcType="VARCHAR" property="questionOptionId" />
|
||||
<result column="question_topic" jdbcType="VARCHAR" property="questionTopic" />
|
||||
<result column="answer_content" jdbcType="VARCHAR" property="answerContent" />
|
||||
<result column="correct" jdbcType="BIT" property="correct" />
|
||||
<result column="score" jdbcType="REAL" property="score" />
|
||||
<result column="total_score" jdbcType="REAL" property="totalScore" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
|
||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||
</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, user_race_id, question_id, question_option_id, question_topic, answer_content,
|
||||
correct, score, total_score, remarks, user_id, project_code, company_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceResultExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_result
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_result
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race_result
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceResultExample">
|
||||
delete from race_result
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceResult" useGeneratedKeys="true">
|
||||
insert into race_result (user_race_id, question_id, question_option_id,
|
||||
question_topic, answer_content, correct,
|
||||
score, total_score, remarks,
|
||||
user_id, project_code, company_id
|
||||
)
|
||||
values (#{userRaceId,jdbcType=BIGINT}, #{questionId,jdbcType=BIGINT}, #{questionOptionId,jdbcType=VARCHAR},
|
||||
#{questionTopic,jdbcType=VARCHAR}, #{answerContent,jdbcType=VARCHAR}, #{correct,jdbcType=BIT},
|
||||
#{score,jdbcType=REAL}, #{totalScore,jdbcType=REAL}, #{remarks,jdbcType=VARCHAR},
|
||||
#{userId,jdbcType=BIGINT}, #{projectCode,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceResult" useGeneratedKeys="true">
|
||||
insert into race_result
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userRaceId != null">
|
||||
user_race_id,
|
||||
</if>
|
||||
<if test="questionId != null">
|
||||
question_id,
|
||||
</if>
|
||||
<if test="questionOptionId != null">
|
||||
question_option_id,
|
||||
</if>
|
||||
<if test="questionTopic != null">
|
||||
question_topic,
|
||||
</if>
|
||||
<if test="answerContent != null">
|
||||
answer_content,
|
||||
</if>
|
||||
<if test="correct != null">
|
||||
correct,
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score,
|
||||
</if>
|
||||
<if test="totalScore != null">
|
||||
total_score,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userRaceId != null">
|
||||
#{userRaceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="questionId != null">
|
||||
#{questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="questionOptionId != null">
|
||||
#{questionOptionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="questionTopic != null">
|
||||
#{questionTopic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="answerContent != null">
|
||||
#{answerContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="correct != null">
|
||||
#{correct,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
#{score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="totalScore != null">
|
||||
#{totalScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
#{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceResultExample" resultType="java.lang.Long">
|
||||
select count(*) from race_result
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_result
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userRaceId != null">
|
||||
user_race_id = #{record.userRaceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.questionId != null">
|
||||
question_id = #{record.questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.questionOptionId != null">
|
||||
question_option_id = #{record.questionOptionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.questionTopic != null">
|
||||
question_topic = #{record.questionTopic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.answerContent != null">
|
||||
answer_content = #{record.answerContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.correct != null">
|
||||
correct = #{record.correct,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.score != null">
|
||||
score = #{record.score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.totalScore != null">
|
||||
total_score = #{record.totalScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.projectCode != null">
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.companyId != null">
|
||||
company_id = #{record.companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_result
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
user_race_id = #{record.userRaceId,jdbcType=BIGINT},
|
||||
question_id = #{record.questionId,jdbcType=BIGINT},
|
||||
question_option_id = #{record.questionOptionId,jdbcType=VARCHAR},
|
||||
question_topic = #{record.questionTopic,jdbcType=VARCHAR},
|
||||
answer_content = #{record.answerContent,jdbcType=VARCHAR},
|
||||
correct = #{record.correct,jdbcType=BIT},
|
||||
score = #{record.score,jdbcType=REAL},
|
||||
total_score = #{record.totalScore,jdbcType=REAL},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
project_code = #{record.projectCode,jdbcType=VARCHAR},
|
||||
company_id = #{record.companyId,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceResult">
|
||||
update race_result
|
||||
<set>
|
||||
<if test="userRaceId != null">
|
||||
user_race_id = #{userRaceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="questionId != null">
|
||||
question_id = #{questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="questionOptionId != null">
|
||||
question_option_id = #{questionOptionId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="questionTopic != null">
|
||||
question_topic = #{questionTopic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="answerContent != null">
|
||||
answer_content = #{answerContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="correct != null">
|
||||
correct = #{correct,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score = #{score,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="totalScore != null">
|
||||
total_score = #{totalScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="projectCode != null">
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceResult">
|
||||
update race_result
|
||||
set user_race_id = #{userRaceId,jdbcType=BIGINT},
|
||||
question_id = #{questionId,jdbcType=BIGINT},
|
||||
question_option_id = #{questionOptionId,jdbcType=VARCHAR},
|
||||
question_topic = #{questionTopic,jdbcType=VARCHAR},
|
||||
answer_content = #{answerContent,jdbcType=VARCHAR},
|
||||
correct = #{correct,jdbcType=BIT},
|
||||
score = #{score,jdbcType=REAL},
|
||||
total_score = #{totalScore,jdbcType=REAL},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
project_code = #{projectCode,jdbcType=VARCHAR},
|
||||
company_id = #{companyId,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,225 @@
|
|||
<?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.RaceTestPaperDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceTestPaper">
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="race_id" jdbcType="BIGINT" property="raceId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RaceTestPaper">
|
||||
<result column="test_paper" jdbcType="LONGVARCHAR" property="testPaper" />
|
||||
</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, race_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
test_paper
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RaceTestPaperExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from race_test_paper
|
||||
<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.RaceTestPaperExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_test_paper
|
||||
<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.Integer" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from race_test_paper
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from race_test_paper
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceTestPaperExample">
|
||||
delete from race_test_paper
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceTestPaper" useGeneratedKeys="true">
|
||||
insert into race_test_paper (race_id, test_paper)
|
||||
values (#{raceId,jdbcType=BIGINT}, #{testPaper,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceTestPaper" useGeneratedKeys="true">
|
||||
insert into race_test_paper
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="raceId != null">
|
||||
race_id,
|
||||
</if>
|
||||
<if test="testPaper != null">
|
||||
test_paper,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="raceId != null">
|
||||
#{raceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="testPaper != null">
|
||||
#{testPaper,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceTestPaperExample" resultType="java.lang.Long">
|
||||
select count(*) from race_test_paper
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_test_paper
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.raceId != null">
|
||||
race_id = #{record.raceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.testPaper != null">
|
||||
test_paper = #{record.testPaper,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update race_test_paper
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
race_id = #{record.raceId,jdbcType=BIGINT},
|
||||
test_paper = #{record.testPaper,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_test_paper
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
race_id = #{record.raceId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceTestPaper">
|
||||
update race_test_paper
|
||||
<set>
|
||||
<if test="raceId != null">
|
||||
race_id = #{raceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="testPaper != null">
|
||||
test_paper = #{testPaper,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RaceTestPaper">
|
||||
update race_test_paper
|
||||
set race_id = #{raceId,jdbcType=BIGINT},
|
||||
test_paper = #{testPaper,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceTestPaper">
|
||||
update race_test_paper
|
||||
set race_id = #{raceId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,355 @@
|
|||
<?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.RaceUserDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RaceUser">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="race_id" jdbcType="BIGINT" property="raceId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="id_number" jdbcType="VARCHAR" property="idNumber" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
||||
<result column="organization" jdbcType="VARCHAR" property="organization" />
|
||||
<result column="department" jdbcType="VARCHAR" property="department" />
|
||||
<result column="position" jdbcType="VARCHAR" property="position" />
|
||||
<result column="role" jdbcType="VARCHAR" property="role" />
|
||||
<result column="time" jdbcType="TIMESTAMP" property="time" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="theory_score" jdbcType="REAL" property="theoryScore" />
|
||||
<result column="practice_score" jdbcType="REAL" property="practiceScore" />
|
||||
</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, race_id, user_id, id_number, `name`, mobile, organization, department, `position`,
|
||||
`role`, `time`, `status`, theory_score, practice_score
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RaceUserExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from race_user
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from race_user
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from race_user
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RaceUserExample">
|
||||
delete from race_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceUser" useGeneratedKeys="true">
|
||||
insert into race_user (race_id, user_id, id_number,
|
||||
`name`, mobile, organization,
|
||||
department, `position`, `role`,
|
||||
`time`, `status`, theory_score,
|
||||
practice_score)
|
||||
values (#{raceId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{idNumber,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{organization,jdbcType=VARCHAR},
|
||||
#{department,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{role,jdbcType=VARCHAR},
|
||||
#{time,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{theoryScore,jdbcType=REAL},
|
||||
#{practiceScore,jdbcType=REAL})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RaceUser" useGeneratedKeys="true">
|
||||
insert into race_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="raceId != null">
|
||||
race_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="idNumber != null">
|
||||
id_number,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
mobile,
|
||||
</if>
|
||||
<if test="organization != null">
|
||||
organization,
|
||||
</if>
|
||||
<if test="department != null">
|
||||
department,
|
||||
</if>
|
||||
<if test="position != null">
|
||||
`position`,
|
||||
</if>
|
||||
<if test="role != null">
|
||||
`role`,
|
||||
</if>
|
||||
<if test="time != null">
|
||||
`time`,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="theoryScore != null">
|
||||
theory_score,
|
||||
</if>
|
||||
<if test="practiceScore != null">
|
||||
practice_score,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="raceId != null">
|
||||
#{raceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="idNumber != null">
|
||||
#{idNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
#{mobile,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organization != null">
|
||||
#{organization,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="department != null">
|
||||
#{department,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="position != null">
|
||||
#{position,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="role != null">
|
||||
#{role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="time != null">
|
||||
#{time,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="theoryScore != null">
|
||||
#{theoryScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="practiceScore != null">
|
||||
#{practiceScore,jdbcType=REAL},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RaceUserExample" resultType="java.lang.Long">
|
||||
select count(*) from race_user
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update race_user
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.raceId != null">
|
||||
race_id = #{record.raceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.idNumber != null">
|
||||
id_number = #{record.idNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mobile != null">
|
||||
mobile = #{record.mobile,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.organization != null">
|
||||
organization = #{record.organization,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.department != null">
|
||||
department = #{record.department,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.position != null">
|
||||
`position` = #{record.position,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.role != null">
|
||||
`role` = #{record.role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.time != null">
|
||||
`time` = #{record.time,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.theoryScore != null">
|
||||
theory_score = #{record.theoryScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.practiceScore != null">
|
||||
practice_score = #{record.practiceScore,jdbcType=REAL},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update race_user
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
race_id = #{record.raceId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
id_number = #{record.idNumber,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
mobile = #{record.mobile,jdbcType=VARCHAR},
|
||||
organization = #{record.organization,jdbcType=VARCHAR},
|
||||
department = #{record.department,jdbcType=VARCHAR},
|
||||
`position` = #{record.position,jdbcType=VARCHAR},
|
||||
`role` = #{record.role,jdbcType=VARCHAR},
|
||||
`time` = #{record.time,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=INTEGER},
|
||||
theory_score = #{record.theoryScore,jdbcType=REAL},
|
||||
practice_score = #{record.practiceScore,jdbcType=REAL}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RaceUser">
|
||||
update race_user
|
||||
<set>
|
||||
<if test="raceId != null">
|
||||
race_id = #{raceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="idNumber != null">
|
||||
id_number = #{idNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
mobile = #{mobile,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organization != null">
|
||||
organization = #{organization,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="department != null">
|
||||
department = #{department,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="position != null">
|
||||
`position` = #{position,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="role != null">
|
||||
`role` = #{role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="time != null">
|
||||
`time` = #{time,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="theoryScore != null">
|
||||
theory_score = #{theoryScore,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="practiceScore != null">
|
||||
practice_score = #{practiceScore,jdbcType=REAL},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RaceUser">
|
||||
update race_user
|
||||
set race_id = #{raceId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
id_number = #{idNumber,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
mobile = #{mobile,jdbcType=VARCHAR},
|
||||
organization = #{organization,jdbcType=VARCHAR},
|
||||
department = #{department,jdbcType=VARCHAR},
|
||||
`position` = #{position,jdbcType=VARCHAR},
|
||||
`role` = #{role,jdbcType=VARCHAR},
|
||||
`time` = #{time,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=INTEGER},
|
||||
theory_score = #{theoryScore,jdbcType=REAL},
|
||||
practice_score = #{practiceScore,jdbcType=REAL}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,350 @@
|
|||
<?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.RealLineDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RealLine">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="origin" jdbcType="VARCHAR" property="origin" />
|
||||
<result column="scaling" jdbcType="VARCHAR" property="scaling" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updater_id" jdbcType="BIGINT" property="updaterId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RealLine">
|
||||
<result column="config_data" jdbcType="LONGVARCHAR" property="configData" />
|
||||
</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, code, `name`, origin, scaling, creator_id, create_time, updater_id, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RealLineExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from real_line
|
||||
<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.RealLineExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from real_line
|
||||
<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 real_line
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from real_line
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RealLineExample">
|
||||
delete from real_line
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RealLine" useGeneratedKeys="true">
|
||||
insert into real_line (code, `name`, origin,
|
||||
scaling, creator_id, create_time,
|
||||
updater_id, update_time, config_data
|
||||
)
|
||||
values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{origin,jdbcType=VARCHAR},
|
||||
#{scaling,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{updaterId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{configData,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RealLine" useGeneratedKeys="true">
|
||||
insert into real_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="origin != null">
|
||||
origin,
|
||||
</if>
|
||||
<if test="scaling != null">
|
||||
scaling,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updaterId != null">
|
||||
updater_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="configData != null">
|
||||
config_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="origin != null">
|
||||
#{origin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="scaling != null">
|
||||
#{scaling,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updaterId != null">
|
||||
#{updaterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="configData != null">
|
||||
#{configData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RealLineExample" resultType="java.lang.Long">
|
||||
select count(*) from real_line
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update real_line
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.origin != null">
|
||||
origin = #{record.origin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.scaling != null">
|
||||
scaling = #{record.scaling,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updaterId != null">
|
||||
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.configData != null">
|
||||
config_data = #{record.configData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update real_line
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
origin = #{record.origin,jdbcType=VARCHAR},
|
||||
scaling = #{record.scaling,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
config_data = #{record.configData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update real_line
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
origin = #{record.origin,jdbcType=VARCHAR},
|
||||
scaling = #{record.scaling,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{record.updaterId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RealLine">
|
||||
update real_line
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="origin != null">
|
||||
origin = #{origin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="scaling != null">
|
||||
scaling = #{scaling,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updaterId != null">
|
||||
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="configData != null">
|
||||
config_data = #{configData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RealLine">
|
||||
update real_line
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
origin = #{origin,jdbcType=VARCHAR},
|
||||
scaling = #{scaling,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
config_data = #{configData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RealLine">
|
||||
update real_line
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
origin = #{origin,jdbcType=VARCHAR},
|
||||
scaling = #{scaling,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
updater_id = #{updaterId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,331 @@
|
|||
<?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.RunPlanDailyDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanDaily">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="template_id" jdbcType="BIGINT" property="templateId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="modified" jdbcType="BIT" property="modified" />
|
||||
<result column="run_date" jdbcType="DATE" property="runDate" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RunPlanDaily">
|
||||
<result column="trips" jdbcType="LONGVARCHAR" property="trips" />
|
||||
</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, `name`, creator_id, template_id, create_time, modified, run_date
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
trips
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanDailyExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from run_plan_daily
|
||||
<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.RunPlanDailyExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_daily
|
||||
<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 run_plan_daily
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_daily
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanDailyExample">
|
||||
delete from run_plan_daily
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanDaily" useGeneratedKeys="true">
|
||||
insert into run_plan_daily (map_id, `name`, creator_id,
|
||||
template_id, create_time, modified,
|
||||
run_date, trips)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{templateId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{modified,jdbcType=BIT},
|
||||
#{runDate,jdbcType=DATE}, #{trips,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanDaily" useGeneratedKeys="true">
|
||||
insert into run_plan_daily
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="templateId != null">
|
||||
template_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="modified != null">
|
||||
modified,
|
||||
</if>
|
||||
<if test="runDate != null">
|
||||
run_date,
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="templateId != null">
|
||||
#{templateId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="modified != null">
|
||||
#{modified,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="runDate != null">
|
||||
#{runDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
#{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanDailyExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_daily
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_daily
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.templateId != null">
|
||||
template_id = #{record.templateId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.modified != null">
|
||||
modified = #{record.modified,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.runDate != null">
|
||||
run_date = #{record.runDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.trips != null">
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update run_plan_daily
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
template_id = #{record.templateId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
modified = #{record.modified,jdbcType=BIT},
|
||||
run_date = #{record.runDate,jdbcType=DATE},
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_daily
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
template_id = #{record.templateId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
modified = #{record.modified,jdbcType=BIT},
|
||||
run_date = #{record.runDate,jdbcType=DATE}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanDaily">
|
||||
update run_plan_daily
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="templateId != null">
|
||||
template_id = #{templateId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="modified != null">
|
||||
modified = #{modified,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="runDate != null">
|
||||
run_date = #{runDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips = #{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanDaily">
|
||||
update run_plan_daily
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
template_id = #{templateId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
modified = #{modified,jdbcType=BIT},
|
||||
run_date = #{runDate,jdbcType=DATE},
|
||||
trips = #{trips,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanDaily">
|
||||
update run_plan_daily
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
template_id = #{templateId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
modified = #{modified,jdbcType=BIT},
|
||||
run_date = #{runDate,jdbcType=DATE}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,314 @@
|
|||
<?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.RunPlanDraftDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanDraft">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="explanation" jdbcType="VARCHAR" property="explanation" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RunPlanDraft">
|
||||
<result column="trips" jdbcType="LONGVARCHAR" property="trips" />
|
||||
</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, `name`, creator_id, create_time, `status`, explanation
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
trips
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanDraftExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from run_plan_draft
|
||||
<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.RunPlanDraftExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_draft
|
||||
<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 run_plan_draft
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_draft
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanDraftExample">
|
||||
delete from run_plan_draft
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanDraft" useGeneratedKeys="true">
|
||||
insert into run_plan_draft (map_id, `name`, creator_id,
|
||||
create_time, `status`, explanation,
|
||||
trips)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, #{explanation,jdbcType=VARCHAR},
|
||||
#{trips,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanDraft" useGeneratedKeys="true">
|
||||
insert into run_plan_draft
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
explanation,
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
#{explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
#{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanDraftExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_draft
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_draft
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.explanation != null">
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trips != null">
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update run_plan_draft
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR},
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_draft
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanDraft">
|
||||
update run_plan_draft
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
explanation = #{explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips = #{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanDraft">
|
||||
update run_plan_draft
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
explanation = #{explanation,jdbcType=VARCHAR},
|
||||
trips = #{trips,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanDraft">
|
||||
update run_plan_draft
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
explanation = #{explanation,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,260 @@
|
|||
<?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.RunPlanLevelDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanLevel">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="station_running_id" jdbcType="BIGINT" property="stationRunningId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="level1" jdbcType="INTEGER" property="level1" />
|
||||
<result column="level2" jdbcType="INTEGER" property="level2" />
|
||||
<result column="level3" jdbcType="INTEGER" property="level3" />
|
||||
<result column="level4" jdbcType="INTEGER" property="level4" />
|
||||
<result column="level5" jdbcType="INTEGER" property="level5" />
|
||||
</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, station_running_id, user_id, level1, level2, level3, level4, level5
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanLevelExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_level
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_level
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_level
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanLevelExample">
|
||||
delete from run_plan_level
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanLevel" useGeneratedKeys="true">
|
||||
insert into run_plan_level (station_running_id, user_id, level1,
|
||||
level2, level3, level4,
|
||||
level5)
|
||||
values (#{stationRunningId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{level1,jdbcType=INTEGER},
|
||||
#{level2,jdbcType=INTEGER}, #{level3,jdbcType=INTEGER}, #{level4,jdbcType=INTEGER},
|
||||
#{level5,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanLevel" useGeneratedKeys="true">
|
||||
insert into run_plan_level
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stationRunningId != null">
|
||||
station_running_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="level1 != null">
|
||||
level1,
|
||||
</if>
|
||||
<if test="level2 != null">
|
||||
level2,
|
||||
</if>
|
||||
<if test="level3 != null">
|
||||
level3,
|
||||
</if>
|
||||
<if test="level4 != null">
|
||||
level4,
|
||||
</if>
|
||||
<if test="level5 != null">
|
||||
level5,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stationRunningId != null">
|
||||
#{stationRunningId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="level1 != null">
|
||||
#{level1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level2 != null">
|
||||
#{level2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level3 != null">
|
||||
#{level3,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level4 != null">
|
||||
#{level4,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level5 != null">
|
||||
#{level5,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanLevelExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_level
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_level
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.stationRunningId != null">
|
||||
station_running_id = #{record.stationRunningId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.level1 != null">
|
||||
level1 = #{record.level1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.level2 != null">
|
||||
level2 = #{record.level2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.level3 != null">
|
||||
level3 = #{record.level3,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.level4 != null">
|
||||
level4 = #{record.level4,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.level5 != null">
|
||||
level5 = #{record.level5,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_level
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
station_running_id = #{record.stationRunningId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
level1 = #{record.level1,jdbcType=INTEGER},
|
||||
level2 = #{record.level2,jdbcType=INTEGER},
|
||||
level3 = #{record.level3,jdbcType=INTEGER},
|
||||
level4 = #{record.level4,jdbcType=INTEGER},
|
||||
level5 = #{record.level5,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanLevel">
|
||||
update run_plan_level
|
||||
<set>
|
||||
<if test="stationRunningId != null">
|
||||
station_running_id = #{stationRunningId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="level1 != null">
|
||||
level1 = #{level1,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level2 != null">
|
||||
level2 = #{level2,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level3 != null">
|
||||
level3 = #{level3,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level4 != null">
|
||||
level4 = #{level4,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="level5 != null">
|
||||
level5 = #{level5,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanLevel">
|
||||
update run_plan_level
|
||||
set station_running_id = #{stationRunningId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
level1 = #{level1,jdbcType=INTEGER},
|
||||
level2 = #{level2,jdbcType=INTEGER},
|
||||
level3 = #{level3,jdbcType=INTEGER},
|
||||
level4 = #{level4,jdbcType=INTEGER},
|
||||
level5 = #{level5,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,228 @@
|
|||
<?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.RunPlanLoadDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanLoad">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="template_plan_id" jdbcType="BIGINT" property="templatePlanId" />
|
||||
<result column="load_time" jdbcType="DATE" property="loadTime" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
</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, template_plan_id, load_time, user_id, creator_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanLoadExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_load
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_load
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_load
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanLoadExample">
|
||||
delete from run_plan_load
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanLoad" useGeneratedKeys="true">
|
||||
insert into run_plan_load (map_id, template_plan_id, load_time,
|
||||
user_id, creator_id)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{templatePlanId,jdbcType=BIGINT}, #{loadTime,jdbcType=DATE},
|
||||
#{userId,jdbcType=BIGINT}, #{creatorId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanLoad" useGeneratedKeys="true">
|
||||
insert into run_plan_load
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="templatePlanId != null">
|
||||
template_plan_id,
|
||||
</if>
|
||||
<if test="loadTime != null">
|
||||
load_time,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="templatePlanId != null">
|
||||
#{templatePlanId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loadTime != null">
|
||||
#{loadTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanLoadExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_load
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_load
|
||||
<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.templatePlanId != null">
|
||||
template_plan_id = #{record.templatePlanId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.loadTime != null">
|
||||
load_time = #{record.loadTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_load
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
template_plan_id = #{record.templatePlanId,jdbcType=BIGINT},
|
||||
load_time = #{record.loadTime,jdbcType=DATE},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanLoad">
|
||||
update run_plan_load
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="templatePlanId != null">
|
||||
template_plan_id = #{templatePlanId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="loadTime != null">
|
||||
load_time = #{loadTime,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanLoad">
|
||||
update run_plan_load
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
template_plan_id = #{templatePlanId,jdbcType=BIGINT},
|
||||
load_time = #{loadTime,jdbcType=DATE},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,297 @@
|
|||
<?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.RunPlanTemplateDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanTemplate">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RunPlanTemplate">
|
||||
<result column="trips" jdbcType="LONGVARCHAR" property="trips" />
|
||||
</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, `name`, creator_id, create_time, `status`
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
trips
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanTemplateExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from run_plan_template
|
||||
<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.RunPlanTemplateExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_template
|
||||
<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 run_plan_template
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_template
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanTemplateExample">
|
||||
delete from run_plan_template
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTemplate" useGeneratedKeys="true">
|
||||
insert into run_plan_template (map_id, `name`, creator_id,
|
||||
create_time, `status`, trips
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR}, #{trips,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTemplate" useGeneratedKeys="true">
|
||||
insert into run_plan_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
#{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanTemplateExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_template
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_template
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.trips != null">
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update run_plan_template
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
trips = #{record.trips,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_template
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanTemplate">
|
||||
update run_plan_template
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="trips != null">
|
||||
trips = #{trips,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanTemplate">
|
||||
update run_plan_template
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
trips = #{trips,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanTemplate">
|
||||
update run_plan_template
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?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.RunPlanTemplateVersionDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanTemplateVersion">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="plan_id" jdbcType="BIGINT" property="planId" />
|
||||
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</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, plan_id, version, creator_id, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanTemplateVersionExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_template_version
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_template_version
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_template_version
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanTemplateVersionExample">
|
||||
delete from run_plan_template_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTemplateVersion" useGeneratedKeys="true">
|
||||
insert into run_plan_template_version (plan_id, version, creator_id,
|
||||
update_time)
|
||||
values (#{planId,jdbcType=BIGINT}, #{version,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=TIMESTAMP})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTemplateVersion" useGeneratedKeys="true">
|
||||
insert into run_plan_template_version
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">
|
||||
plan_id,
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">
|
||||
#{planId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
#{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanTemplateVersionExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_template_version
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_template_version
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.planId != null">
|
||||
plan_id = #{record.planId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.version != null">
|
||||
version = #{record.version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_template_version
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
plan_id = #{record.planId,jdbcType=BIGINT},
|
||||
version = #{record.version,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanTemplateVersion">
|
||||
update run_plan_template_version
|
||||
<set>
|
||||
<if test="planId != null">
|
||||
plan_id = #{planId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanTemplateVersion">
|
||||
update run_plan_template_version
|
||||
set plan_id = #{planId,jdbcType=BIGINT},
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.RunPlanToolsConfigDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanToolsConfig">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="plan_id" jdbcType="BIGINT" property="planId" />
|
||||
<result column="average_speed" jdbcType="REAL" property="averageSpeed" />
|
||||
<result column="max_speed" jdbcType="REAL" property="maxSpeed" />
|
||||
<result column="min_stop_time" jdbcType="INTEGER" property="minStopTime" />
|
||||
<result column="stop_time" jdbcType="INTEGER" property="stopTime" />
|
||||
<result column="min_interval_time" jdbcType="INTEGER" property="minIntervalTime" />
|
||||
<result column="turn_back_time" jdbcType="INTEGER" property="turnBackTime" />
|
||||
</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, plan_id, average_speed, max_speed, min_stop_time, stop_time, min_interval_time,
|
||||
turn_back_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanToolsConfigExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_config
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_config
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_tools_config
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanToolsConfigExample">
|
||||
delete from run_plan_tools_config
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsConfig" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_config (plan_id, average_speed, max_speed,
|
||||
min_stop_time, stop_time, min_interval_time,
|
||||
turn_back_time)
|
||||
values (#{planId,jdbcType=BIGINT}, #{averageSpeed,jdbcType=REAL}, #{maxSpeed,jdbcType=REAL},
|
||||
#{minStopTime,jdbcType=INTEGER}, #{stopTime,jdbcType=INTEGER}, #{minIntervalTime,jdbcType=INTEGER},
|
||||
#{turnBackTime,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsConfig" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">
|
||||
plan_id,
|
||||
</if>
|
||||
<if test="averageSpeed != null">
|
||||
average_speed,
|
||||
</if>
|
||||
<if test="maxSpeed != null">
|
||||
max_speed,
|
||||
</if>
|
||||
<if test="minStopTime != null">
|
||||
min_stop_time,
|
||||
</if>
|
||||
<if test="stopTime != null">
|
||||
stop_time,
|
||||
</if>
|
||||
<if test="minIntervalTime != null">
|
||||
min_interval_time,
|
||||
</if>
|
||||
<if test="turnBackTime != null">
|
||||
turn_back_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">
|
||||
#{planId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="averageSpeed != null">
|
||||
#{averageSpeed,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="maxSpeed != null">
|
||||
#{maxSpeed,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="minStopTime != null">
|
||||
#{minStopTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stopTime != null">
|
||||
#{stopTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="minIntervalTime != null">
|
||||
#{minIntervalTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="turnBackTime != null">
|
||||
#{turnBackTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanToolsConfigExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_tools_config
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_tools_config
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.planId != null">
|
||||
plan_id = #{record.planId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.averageSpeed != null">
|
||||
average_speed = #{record.averageSpeed,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.maxSpeed != null">
|
||||
max_speed = #{record.maxSpeed,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="record.minStopTime != null">
|
||||
min_stop_time = #{record.minStopTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.stopTime != null">
|
||||
stop_time = #{record.stopTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.minIntervalTime != null">
|
||||
min_interval_time = #{record.minIntervalTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.turnBackTime != null">
|
||||
turn_back_time = #{record.turnBackTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_tools_config
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
plan_id = #{record.planId,jdbcType=BIGINT},
|
||||
average_speed = #{record.averageSpeed,jdbcType=REAL},
|
||||
max_speed = #{record.maxSpeed,jdbcType=REAL},
|
||||
min_stop_time = #{record.minStopTime,jdbcType=INTEGER},
|
||||
stop_time = #{record.stopTime,jdbcType=INTEGER},
|
||||
min_interval_time = #{record.minIntervalTime,jdbcType=INTEGER},
|
||||
turn_back_time = #{record.turnBackTime,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanToolsConfig">
|
||||
update run_plan_tools_config
|
||||
<set>
|
||||
<if test="planId != null">
|
||||
plan_id = #{planId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="averageSpeed != null">
|
||||
average_speed = #{averageSpeed,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="maxSpeed != null">
|
||||
max_speed = #{maxSpeed,jdbcType=REAL},
|
||||
</if>
|
||||
<if test="minStopTime != null">
|
||||
min_stop_time = #{minStopTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="stopTime != null">
|
||||
stop_time = #{stopTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="minIntervalTime != null">
|
||||
min_interval_time = #{minIntervalTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="turnBackTime != null">
|
||||
turn_back_time = #{turnBackTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanToolsConfig">
|
||||
update run_plan_tools_config
|
||||
set plan_id = #{planId,jdbcType=BIGINT},
|
||||
average_speed = #{averageSpeed,jdbcType=REAL},
|
||||
max_speed = #{maxSpeed,jdbcType=REAL},
|
||||
min_stop_time = #{minStopTime,jdbcType=INTEGER},
|
||||
stop_time = #{stopTime,jdbcType=INTEGER},
|
||||
min_interval_time = #{minIntervalTime,jdbcType=INTEGER},
|
||||
turn_back_time = #{turnBackTime,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,259 @@
|
|||
<?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.RunPlanToolsDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanTools">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="group_id" jdbcType="BIGINT" property="groupId" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.RunPlanTools">
|
||||
<result column="trip" jdbcType="LONGVARCHAR" property="trip" />
|
||||
<result column="area" jdbcType="LONGVARCHAR" property="area" />
|
||||
</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, group_id, map_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
trip, area
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanToolsExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from run_plan_tools
|
||||
<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.RunPlanToolsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools
|
||||
<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 run_plan_tools
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_tools
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanToolsExample">
|
||||
delete from run_plan_tools
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTools" useGeneratedKeys="true">
|
||||
insert into run_plan_tools (group_id, map_id, trip,
|
||||
area)
|
||||
values (#{groupId,jdbcType=BIGINT}, #{mapId,jdbcType=BIGINT}, #{trip,jdbcType=LONGVARCHAR},
|
||||
#{area,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanTools" useGeneratedKeys="true">
|
||||
insert into run_plan_tools
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="groupId != null">
|
||||
group_id,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="trip != null">
|
||||
trip,
|
||||
</if>
|
||||
<if test="area != null">
|
||||
area,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="groupId != null">
|
||||
#{groupId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trip != null">
|
||||
#{trip,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="area != null">
|
||||
#{area,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanToolsExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_tools
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_tools
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.groupId != null">
|
||||
group_id = #{record.groupId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.trip != null">
|
||||
trip = #{record.trip,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.area != null">
|
||||
area = #{record.area,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update run_plan_tools
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
group_id = #{record.groupId,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
trip = #{record.trip,jdbcType=LONGVARCHAR},
|
||||
area = #{record.area,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_tools
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
group_id = #{record.groupId,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanTools">
|
||||
update run_plan_tools
|
||||
<set>
|
||||
<if test="groupId != null">
|
||||
group_id = #{groupId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="trip != null">
|
||||
trip = #{trip,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="area != null">
|
||||
area = #{area,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.RunPlanTools">
|
||||
update run_plan_tools
|
||||
set group_id = #{groupId,jdbcType=BIGINT},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
trip = #{trip,jdbcType=LONGVARCHAR},
|
||||
area = #{area,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanTools">
|
||||
update run_plan_tools
|
||||
set group_id = #{groupId,jdbcType=BIGINT},
|
||||
map_id = #{mapId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,181 @@
|
|||
<?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.RunPlanToolsGroupDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanToolsGroup">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="maps" jdbcType="VARCHAR" property="maps" />
|
||||
</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, `name`, maps
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanToolsGroupExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_group
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_group
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_tools_group
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanToolsGroupExample">
|
||||
delete from run_plan_tools_group
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsGroup" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_group (`name`, maps)
|
||||
values (#{name,jdbcType=VARCHAR}, #{maps,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsGroup" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="maps != null">
|
||||
maps,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="maps != null">
|
||||
#{maps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanToolsGroupExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_tools_group
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_tools_group
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.maps != null">
|
||||
maps = #{record.maps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_tools_group
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
maps = #{record.maps,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanToolsGroup">
|
||||
update run_plan_tools_group
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="maps != null">
|
||||
maps = #{maps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanToolsGroup">
|
||||
update run_plan_tools_group
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
maps = #{maps,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,166 @@
|
|||
<?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.RunPlanToolsMapDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanToolsMap">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
</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, `name`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanToolsMapExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_map
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_map
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_tools_map
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanToolsMapExample">
|
||||
delete from run_plan_tools_map
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsMap" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_map (`name`)
|
||||
values (#{name,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsMap" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_map
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanToolsMapExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_tools_map
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_tools_map
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_tools_map
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanToolsMap">
|
||||
update run_plan_tools_map
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanToolsMap">
|
||||
update run_plan_tools_map
|
||||
set `name` = #{name,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,245 @@
|
|||
<?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.RunPlanToolsStationDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.RunPlanToolsStation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="km_range" jdbcType="INTEGER" property="kmRange" />
|
||||
<result column="transferable" jdbcType="BIT" property="transferable" />
|
||||
<result column="up_reception" jdbcType="INTEGER" property="upReception" />
|
||||
<result column="down_reception" jdbcType="INTEGER" property="downReception" />
|
||||
</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, `name`, km_range, transferable, up_reception, down_reception
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.RunPlanToolsStationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_station
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from run_plan_tools_station
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from run_plan_tools_station
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.RunPlanToolsStationExample">
|
||||
delete from run_plan_tools_station
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsStation" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_station (map_id, `name`, km_range,
|
||||
transferable, up_reception, down_reception
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{kmRange,jdbcType=INTEGER},
|
||||
#{transferable,jdbcType=BIT}, #{upReception,jdbcType=INTEGER}, #{downReception,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.RunPlanToolsStation" useGeneratedKeys="true">
|
||||
insert into run_plan_tools_station
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="kmRange != null">
|
||||
km_range,
|
||||
</if>
|
||||
<if test="transferable != null">
|
||||
transferable,
|
||||
</if>
|
||||
<if test="upReception != null">
|
||||
up_reception,
|
||||
</if>
|
||||
<if test="downReception != null">
|
||||
down_reception,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="kmRange != null">
|
||||
#{kmRange,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="transferable != null">
|
||||
#{transferable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="upReception != null">
|
||||
#{upReception,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="downReception != null">
|
||||
#{downReception,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.RunPlanToolsStationExample" resultType="java.lang.Long">
|
||||
select count(*) from run_plan_tools_station
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update run_plan_tools_station
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.kmRange != null">
|
||||
km_range = #{record.kmRange,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.transferable != null">
|
||||
transferable = #{record.transferable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.upReception != null">
|
||||
up_reception = #{record.upReception,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.downReception != null">
|
||||
down_reception = #{record.downReception,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update run_plan_tools_station
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
km_range = #{record.kmRange,jdbcType=INTEGER},
|
||||
transferable = #{record.transferable,jdbcType=BIT},
|
||||
up_reception = #{record.upReception,jdbcType=INTEGER},
|
||||
down_reception = #{record.downReception,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.RunPlanToolsStation">
|
||||
update run_plan_tools_station
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="kmRange != null">
|
||||
km_range = #{kmRange,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="transferable != null">
|
||||
transferable = #{transferable,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="upReception != null">
|
||||
up_reception = #{upReception,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="downReception != null">
|
||||
down_reception = #{downReception,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.RunPlanToolsStation">
|
||||
update run_plan_tools_station
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
km_range = #{kmRange,jdbcType=INTEGER},
|
||||
transferable = #{transferable,jdbcType=BIT},
|
||||
up_reception = #{upReception,jdbcType=INTEGER},
|
||||
down_reception = #{downReception,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,340 @@
|
|||
<?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.SaleGoodsDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SaleGoods">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="permission_id" jdbcType="BIGINT" property="permissionId" />
|
||||
<result column="price" jdbcType="BIGINT" property="price" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="try_use" jdbcType="BIT" property="tryUse" />
|
||||
<result column="try_use_time" jdbcType="INTEGER" property="tryUseTime" />
|
||||
<result column="try_use_time_unit" jdbcType="VARCHAR" property="tryUseTimeUnit" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</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, `name`, permission_id, price, `status`, remarks, try_use, try_use_time, try_use_time_unit,
|
||||
creator_id, create_time, update_user_id, update_time
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SaleGoodsExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_goods
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_goods
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sale_goods
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SaleGoodsExample">
|
||||
delete from sale_goods
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleGoods" useGeneratedKeys="true">
|
||||
insert into sale_goods (`name`, permission_id, price,
|
||||
`status`, remarks, try_use,
|
||||
try_use_time, try_use_time_unit, creator_id,
|
||||
create_time, update_user_id, update_time
|
||||
)
|
||||
values (#{name,jdbcType=VARCHAR}, #{permissionId,jdbcType=BIGINT}, #{price,jdbcType=BIGINT},
|
||||
#{status,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{tryUse,jdbcType=BIT},
|
||||
#{tryUseTime,jdbcType=INTEGER}, #{tryUseTimeUnit,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleGoods" useGeneratedKeys="true">
|
||||
insert into sale_goods
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id,
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks,
|
||||
</if>
|
||||
<if test="tryUse != null">
|
||||
try_use,
|
||||
</if>
|
||||
<if test="tryUseTime != null">
|
||||
try_use_time,
|
||||
</if>
|
||||
<if test="tryUseTimeUnit != null">
|
||||
try_use_time_unit,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
#{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
#{price,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tryUse != null">
|
||||
#{tryUse,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="tryUseTime != null">
|
||||
#{tryUseTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tryUseTimeUnit != null">
|
||||
#{tryUseTimeUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SaleGoodsExample" resultType="java.lang.Long">
|
||||
select count(*) from sale_goods
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sale_goods
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.permissionId != null">
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.price != null">
|
||||
price = #{record.price,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.remarks != null">
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tryUse != null">
|
||||
try_use = #{record.tryUse,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.tryUseTime != null">
|
||||
try_use_time = #{record.tryUseTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tryUseTimeUnit != null">
|
||||
try_use_time_unit = #{record.tryUseTimeUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sale_goods
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
permission_id = #{record.permissionId,jdbcType=BIGINT},
|
||||
price = #{record.price,jdbcType=BIGINT},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
remarks = #{record.remarks,jdbcType=VARCHAR},
|
||||
try_use = #{record.tryUse,jdbcType=BIT},
|
||||
try_use_time = #{record.tryUseTime,jdbcType=INTEGER},
|
||||
try_use_time_unit = #{record.tryUseTimeUnit,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SaleGoods">
|
||||
update sale_goods
|
||||
<set>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="permissionId != null">
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remarks != null">
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tryUse != null">
|
||||
try_use = #{tryUse,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="tryUseTime != null">
|
||||
try_use_time = #{tryUseTime,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tryUseTimeUnit != null">
|
||||
try_use_time_unit = #{tryUseTimeUnit,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SaleGoods">
|
||||
update sale_goods
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
permission_id = #{permissionId,jdbcType=BIGINT},
|
||||
price = #{price,jdbcType=BIGINT},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
try_use = #{tryUse,jdbcType=BIT},
|
||||
try_use_time = #{tryUseTime,jdbcType=INTEGER},
|
||||
try_use_time_unit = #{tryUseTimeUnit,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,370 @@
|
|||
<?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.SaleOrderDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SaleOrder">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="organization_id" jdbcType="BIGINT" property="organizationId" />
|
||||
<result column="price" jdbcType="BIGINT" property="price" />
|
||||
<result column="pay_ways" jdbcType="VARCHAR" property="payWays" />
|
||||
<result column="pay_status" jdbcType="VARCHAR" property="payStatus" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="contract_no" jdbcType="VARCHAR" property="contractNo" />
|
||||
<result column="order_type" jdbcType="VARCHAR" property="orderType" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_user_id" jdbcType="BIGINT" property="updateUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="qr_code_generated" jdbcType="BIT" property="qrCodeGenerated" />
|
||||
<result column="seller_id" jdbcType="BIGINT" property="sellerId" />
|
||||
</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, code, organization_id, price, pay_ways, pay_status, `status`, contract_no, order_type,
|
||||
creator_id, create_time, update_user_id, update_time, qr_code_generated, seller_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SaleOrderExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_order
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_order
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sale_order
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SaleOrderExample">
|
||||
delete from sale_order
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleOrder" useGeneratedKeys="true">
|
||||
insert into sale_order (code, organization_id, price,
|
||||
pay_ways, pay_status, `status`,
|
||||
contract_no, order_type, creator_id,
|
||||
create_time, update_user_id, update_time,
|
||||
qr_code_generated, seller_id)
|
||||
values (#{code,jdbcType=VARCHAR}, #{organizationId,jdbcType=BIGINT}, #{price,jdbcType=BIGINT},
|
||||
#{payWays,jdbcType=VARCHAR}, #{payStatus,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{contractNo,jdbcType=VARCHAR}, #{orderType,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateUserId,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{qrCodeGenerated,jdbcType=BIT}, #{sellerId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleOrder" useGeneratedKeys="true">
|
||||
insert into sale_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
organization_id,
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price,
|
||||
</if>
|
||||
<if test="payWays != null">
|
||||
pay_ways,
|
||||
</if>
|
||||
<if test="payStatus != null">
|
||||
pay_status,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="contractNo != null">
|
||||
contract_no,
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
order_type,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="qrCodeGenerated != null">
|
||||
qr_code_generated,
|
||||
</if>
|
||||
<if test="sellerId != null">
|
||||
seller_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
#{organizationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
#{price,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="payWays != null">
|
||||
#{payWays,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payStatus != null">
|
||||
#{payStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contractNo != null">
|
||||
#{contractNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
#{orderType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="qrCodeGenerated != null">
|
||||
#{qrCodeGenerated,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="sellerId != null">
|
||||
#{sellerId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SaleOrderExample" resultType="java.lang.Long">
|
||||
select count(*) from sale_order
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sale_order
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.organizationId != null">
|
||||
organization_id = #{record.organizationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.price != null">
|
||||
price = #{record.price,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.payWays != null">
|
||||
pay_ways = #{record.payWays,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.payStatus != null">
|
||||
pay_status = #{record.payStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.contractNo != null">
|
||||
contract_no = #{record.contractNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.orderType != null">
|
||||
order_type = #{record.orderType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.qrCodeGenerated != null">
|
||||
qr_code_generated = #{record.qrCodeGenerated,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.sellerId != null">
|
||||
seller_id = #{record.sellerId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sale_order
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
organization_id = #{record.organizationId,jdbcType=BIGINT},
|
||||
price = #{record.price,jdbcType=BIGINT},
|
||||
pay_ways = #{record.payWays,jdbcType=VARCHAR},
|
||||
pay_status = #{record.payStatus,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
contract_no = #{record.contractNo,jdbcType=VARCHAR},
|
||||
order_type = #{record.orderType,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{record.updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
qr_code_generated = #{record.qrCodeGenerated,jdbcType=BIT},
|
||||
seller_id = #{record.sellerId,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SaleOrder">
|
||||
update sale_order
|
||||
<set>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
organization_id = #{organizationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="payWays != null">
|
||||
pay_ways = #{payWays,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payStatus != null">
|
||||
pay_status = #{payStatus,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contractNo != null">
|
||||
contract_no = #{contractNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
order_type = #{orderType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="qrCodeGenerated != null">
|
||||
qr_code_generated = #{qrCodeGenerated,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="sellerId != null">
|
||||
seller_id = #{sellerId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SaleOrder">
|
||||
update sale_order
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
organization_id = #{organizationId,jdbcType=BIGINT},
|
||||
price = #{price,jdbcType=BIGINT},
|
||||
pay_ways = #{payWays,jdbcType=VARCHAR},
|
||||
pay_status = #{payStatus,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
contract_no = #{contractNo,jdbcType=VARCHAR},
|
||||
order_type = #{orderType,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_user_id = #{updateUserId,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
qr_code_generated = #{qrCodeGenerated,jdbcType=BIT},
|
||||
seller_id = #{sellerId,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,260 @@
|
|||
<?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.SaleOrderDetailDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SaleOrderDetail">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="order_id" jdbcType="BIGINT" property="orderId" />
|
||||
<result column="goods_id" jdbcType="BIGINT" property="goodsId" />
|
||||
<result column="goods_amount" jdbcType="INTEGER" property="goodsAmount" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="forever" jdbcType="BIT" property="forever" />
|
||||
<result column="month_amount" jdbcType="INTEGER" property="monthAmount" />
|
||||
<result column="price" jdbcType="BIGINT" property="price" />
|
||||
</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, order_id, goods_id, goods_amount, start_time, forever, month_amount, price
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SaleOrderDetailExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_order_detail
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_order_detail
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sale_order_detail
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SaleOrderDetailExample">
|
||||
delete from sale_order_detail
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleOrderDetail" useGeneratedKeys="true">
|
||||
insert into sale_order_detail (order_id, goods_id, goods_amount,
|
||||
start_time, forever, month_amount,
|
||||
price)
|
||||
values (#{orderId,jdbcType=BIGINT}, #{goodsId,jdbcType=BIGINT}, #{goodsAmount,jdbcType=INTEGER},
|
||||
#{startTime,jdbcType=TIMESTAMP}, #{forever,jdbcType=BIT}, #{monthAmount,jdbcType=INTEGER},
|
||||
#{price,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleOrderDetail" useGeneratedKeys="true">
|
||||
insert into sale_order_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">
|
||||
order_id,
|
||||
</if>
|
||||
<if test="goodsId != null">
|
||||
goods_id,
|
||||
</if>
|
||||
<if test="goodsAmount != null">
|
||||
goods_amount,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
forever,
|
||||
</if>
|
||||
<if test="monthAmount != null">
|
||||
month_amount,
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">
|
||||
#{orderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="goodsId != null">
|
||||
#{goodsId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="goodsAmount != null">
|
||||
#{goodsAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
#{forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="monthAmount != null">
|
||||
#{monthAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
#{price,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SaleOrderDetailExample" resultType="java.lang.Long">
|
||||
select count(*) from sale_order_detail
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sale_order_detail
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.orderId != null">
|
||||
order_id = #{record.orderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.goodsId != null">
|
||||
goods_id = #{record.goodsId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.goodsAmount != null">
|
||||
goods_amount = #{record.goodsAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.forever != null">
|
||||
forever = #{record.forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.monthAmount != null">
|
||||
month_amount = #{record.monthAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.price != null">
|
||||
price = #{record.price,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sale_order_detail
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
order_id = #{record.orderId,jdbcType=BIGINT},
|
||||
goods_id = #{record.goodsId,jdbcType=BIGINT},
|
||||
goods_amount = #{record.goodsAmount,jdbcType=INTEGER},
|
||||
start_time = #{record.startTime,jdbcType=TIMESTAMP},
|
||||
forever = #{record.forever,jdbcType=BIT},
|
||||
month_amount = #{record.monthAmount,jdbcType=INTEGER},
|
||||
price = #{record.price,jdbcType=BIGINT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SaleOrderDetail">
|
||||
update sale_order_detail
|
||||
<set>
|
||||
<if test="orderId != null">
|
||||
order_id = #{orderId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="goodsId != null">
|
||||
goods_id = #{goodsId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="goodsAmount != null">
|
||||
goods_amount = #{goodsAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="forever != null">
|
||||
forever = #{forever,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="monthAmount != null">
|
||||
month_amount = #{monthAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="price != null">
|
||||
price = #{price,jdbcType=BIGINT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SaleOrderDetail">
|
||||
update sale_order_detail
|
||||
set order_id = #{orderId,jdbcType=BIGINT},
|
||||
goods_id = #{goodsId,jdbcType=BIGINT},
|
||||
goods_amount = #{goodsAmount,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=TIMESTAMP},
|
||||
forever = #{forever,jdbcType=BIT},
|
||||
month_amount = #{monthAmount,jdbcType=INTEGER},
|
||||
price = #{price,jdbcType=BIGINT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,60 @@
|
|||
<?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.SaleOrderDetailMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SaleOrderDetail">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<id column="order_id" jdbcType="BIGINT" property="orderId" />
|
||||
<id column="good_id" jdbcType="BIGINT" property="goodId" />
|
||||
<id column="item_number" jdbcType="INTEGER" property="itemNumber" />
|
||||
|
||||
</resultMap>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sale_order_detail
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.SaleOrderDetail">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into sale_order_detail (order_id, good_id,item_number
|
||||
)
|
||||
values (#{orderId,jdbcType=BIGINT}, #{goodId,jdbcType=BIGINT}, #{itemNumber,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<insert id="batchInsertOrderDetail" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
|
||||
|
||||
insert into sale_order_detail (order_id, good_id,item_number)
|
||||
values
|
||||
<foreach collection="list" item="model" separator=",">
|
||||
(#{model.orderId,jdbcType=BIGINT}, #{model.goodId,jdbcType=BIGINT},
|
||||
#{model.itemNumber,jdbcType=INTEGER})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SaleOrderDetail">
|
||||
update sale_order_detail
|
||||
set order_id = #{orderId,jdbcType=BIGINT},
|
||||
good_id = #{goodId,jdbcType=BIGINT},
|
||||
item_number = #{itemNumber,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select id, order_id, good_id, item_number
|
||||
from sale_order_detail
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<select id="selectAll" resultMap="BaseResultMap">
|
||||
select id, order_id, good_id, item_number
|
||||
from sale_order_detail
|
||||
</select>
|
||||
|
||||
<select id="selectByOrderId" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
||||
select id, order_id, good_id,item_number
|
||||
from sale_order_detail
|
||||
where order_id = #{orderId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,181 @@
|
|||
<?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.SaleOrderSerialNumDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SaleOrderSerialNum">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="date" jdbcType="DATE" property="date" />
|
||||
<result column="no" jdbcType="INTEGER" property="no" />
|
||||
</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, `date`, `no`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SaleOrderSerialNumExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_order_serial_num
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sale_order_serial_num
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sale_order_serial_num
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SaleOrderSerialNumExample">
|
||||
delete from sale_order_serial_num
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleOrderSerialNum" useGeneratedKeys="true">
|
||||
insert into sale_order_serial_num (`date`, `no`)
|
||||
values (#{date,jdbcType=DATE}, #{no,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SaleOrderSerialNum" useGeneratedKeys="true">
|
||||
insert into sale_order_serial_num
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="date != null">
|
||||
`date`,
|
||||
</if>
|
||||
<if test="no != null">
|
||||
`no`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="date != null">
|
||||
#{date,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="no != null">
|
||||
#{no,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SaleOrderSerialNumExample" resultType="java.lang.Long">
|
||||
select count(*) from sale_order_serial_num
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update sale_order_serial_num
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.date != null">
|
||||
`date` = #{record.date,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.no != null">
|
||||
`no` = #{record.no,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update sale_order_serial_num
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
`date` = #{record.date,jdbcType=DATE},
|
||||
`no` = #{record.no,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SaleOrderSerialNum">
|
||||
update sale_order_serial_num
|
||||
<set>
|
||||
<if test="date != null">
|
||||
`date` = #{date,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="no != null">
|
||||
`no` = #{no,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SaleOrderSerialNum">
|
||||
update sale_order_serial_num
|
||||
set `date` = #{date,jdbcType=DATE},
|
||||
`no` = #{no,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,297 @@
|
|||
<?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.SchedulingPlanDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SchedulingPlan">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="plan_date" jdbcType="DATE" property="planDate" />
|
||||
<result column="run_plan_id" jdbcType="BIGINT" property="runPlanId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.SchedulingPlan">
|
||||
<result column="plans_json" jdbcType="LONGVARCHAR" property="plansJson" />
|
||||
</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, plan_date, run_plan_id, user_id, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
plans_json
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.SchedulingPlanExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from scheduling_plan
|
||||
<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.SchedulingPlanExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from scheduling_plan
|
||||
<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 scheduling_plan
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from scheduling_plan
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SchedulingPlanExample">
|
||||
delete from scheduling_plan
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SchedulingPlan" useGeneratedKeys="true">
|
||||
insert into scheduling_plan (map_id, plan_date, run_plan_id,
|
||||
user_id, create_time, plans_json
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{planDate,jdbcType=DATE}, #{runPlanId,jdbcType=BIGINT},
|
||||
#{userId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{plansJson,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SchedulingPlan" useGeneratedKeys="true">
|
||||
insert into scheduling_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="planDate != null">
|
||||
plan_date,
|
||||
</if>
|
||||
<if test="runPlanId != null">
|
||||
run_plan_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="plansJson != null">
|
||||
plans_json,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="planDate != null">
|
||||
#{planDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="runPlanId != null">
|
||||
#{runPlanId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="plansJson != null">
|
||||
#{plansJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SchedulingPlanExample" resultType="java.lang.Long">
|
||||
select count(*) from scheduling_plan
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update scheduling_plan
|
||||
<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.planDate != null">
|
||||
plan_date = #{record.planDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="record.runPlanId != null">
|
||||
run_plan_id = #{record.runPlanId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.plansJson != null">
|
||||
plans_json = #{record.plansJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update scheduling_plan
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
plan_date = #{record.planDate,jdbcType=DATE},
|
||||
run_plan_id = #{record.runPlanId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
plans_json = #{record.plansJson,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update scheduling_plan
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
plan_date = #{record.planDate,jdbcType=DATE},
|
||||
run_plan_id = #{record.runPlanId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SchedulingPlan">
|
||||
update scheduling_plan
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="planDate != null">
|
||||
plan_date = #{planDate,jdbcType=DATE},
|
||||
</if>
|
||||
<if test="runPlanId != null">
|
||||
run_plan_id = #{runPlanId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="plansJson != null">
|
||||
plans_json = #{plansJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.SchedulingPlan">
|
||||
update scheduling_plan
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
plan_date = #{planDate,jdbcType=DATE},
|
||||
run_plan_id = #{runPlanId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
plans_json = #{plansJson,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SchedulingPlan">
|
||||
update scheduling_plan
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
plan_date = #{planDate,jdbcType=DATE},
|
||||
run_plan_id = #{runPlanId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,466 @@
|
|||
<?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.ScriptDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.Script">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="lang" jdbcType="VARCHAR" property="lang" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="map_location_json" jdbcType="VARCHAR" property="mapLocationJson" />
|
||||
<result column="full_marks_duration" jdbcType="INTEGER" property="fullMarksDuration" />
|
||||
<result column="passing_grade_duration" jdbcType="INTEGER" property="passingGradeDuration" />
|
||||
<result column="zero_duration" jdbcType="INTEGER" property="zeroDuration" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.ScriptWithBLOBs">
|
||||
<result column="bg_scenes_json" jdbcType="LONGVARCHAR" property="bgScenesJson" />
|
||||
<result column="final_scenes_json" jdbcType="LONGVARCHAR" property="finalScenesJson" />
|
||||
<result column="members_json" jdbcType="LONGVARCHAR" property="membersJson" />
|
||||
<result column="players_json" jdbcType="LONGVARCHAR" property="playersJson" />
|
||||
<result column="actions_json" jdbcType="LONGVARCHAR" property="actionsJson" />
|
||||
</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, `name`, lang, description, map_location_json, full_marks_duration, passing_grade_duration,
|
||||
zero_duration, `status`, creator_id, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
bg_scenes_json, final_scenes_json, members_json, players_json, actions_json
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.ScriptExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from script
|
||||
<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.ScriptExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from script
|
||||
<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 script
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from script
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ScriptExample">
|
||||
delete from script
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ScriptWithBLOBs" useGeneratedKeys="true">
|
||||
insert into script (map_id, `name`, lang,
|
||||
description, map_location_json, full_marks_duration,
|
||||
passing_grade_duration, zero_duration, `status`,
|
||||
creator_id, create_time, bg_scenes_json,
|
||||
final_scenes_json, members_json, players_json,
|
||||
actions_json)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{lang,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{mapLocationJson,jdbcType=VARCHAR}, #{fullMarksDuration,jdbcType=INTEGER},
|
||||
#{passingGradeDuration,jdbcType=INTEGER}, #{zeroDuration,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
#{finalScenesJson,jdbcType=LONGVARCHAR}, #{membersJson,jdbcType=LONGVARCHAR}, #{playersJson,jdbcType=LONGVARCHAR},
|
||||
#{actionsJson,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ScriptWithBLOBs" useGeneratedKeys="true">
|
||||
insert into script
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="lang != null">
|
||||
lang,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="mapLocationJson != null">
|
||||
map_location_json,
|
||||
</if>
|
||||
<if test="fullMarksDuration != null">
|
||||
full_marks_duration,
|
||||
</if>
|
||||
<if test="passingGradeDuration != null">
|
||||
passing_grade_duration,
|
||||
</if>
|
||||
<if test="zeroDuration != null">
|
||||
zero_duration,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="bgScenesJson != null">
|
||||
bg_scenes_json,
|
||||
</if>
|
||||
<if test="finalScenesJson != null">
|
||||
final_scenes_json,
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
members_json,
|
||||
</if>
|
||||
<if test="playersJson != null">
|
||||
players_json,
|
||||
</if>
|
||||
<if test="actionsJson != null">
|
||||
actions_json,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lang != null">
|
||||
#{lang,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapLocationJson != null">
|
||||
#{mapLocationJson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fullMarksDuration != null">
|
||||
#{fullMarksDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingGradeDuration != null">
|
||||
#{passingGradeDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="zeroDuration != null">
|
||||
#{zeroDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bgScenesJson != null">
|
||||
#{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="finalScenesJson != null">
|
||||
#{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
#{membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="playersJson != null">
|
||||
#{playersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="actionsJson != null">
|
||||
#{actionsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ScriptExample" resultType="java.lang.Long">
|
||||
select count(*) from script
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update script
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lang != null">
|
||||
lang = #{record.lang,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapLocationJson != null">
|
||||
map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fullMarksDuration != null">
|
||||
full_marks_duration = #{record.fullMarksDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.passingGradeDuration != null">
|
||||
passing_grade_duration = #{record.passingGradeDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.zeroDuration != null">
|
||||
zero_duration = #{record.zeroDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.bgScenesJson != null">
|
||||
bg_scenes_json = #{record.bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.finalScenesJson != null">
|
||||
final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.membersJson != null">
|
||||
members_json = #{record.membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.playersJson != null">
|
||||
players_json = #{record.playersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.actionsJson != null">
|
||||
actions_json = #{record.actionsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update script
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
lang = #{record.lang,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{record.fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{record.passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{record.zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
bg_scenes_json = #{record.bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
members_json = #{record.membersJson,jdbcType=LONGVARCHAR},
|
||||
players_json = #{record.playersJson,jdbcType=LONGVARCHAR},
|
||||
actions_json = #{record.actionsJson,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update script
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
lang = #{record.lang,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{record.fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{record.passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{record.zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ScriptWithBLOBs">
|
||||
update script
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lang != null">
|
||||
lang = #{lang,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapLocationJson != null">
|
||||
map_location_json = #{mapLocationJson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fullMarksDuration != null">
|
||||
full_marks_duration = #{fullMarksDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingGradeDuration != null">
|
||||
passing_grade_duration = #{passingGradeDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="zeroDuration != null">
|
||||
zero_duration = #{zeroDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bgScenesJson != null">
|
||||
bg_scenes_json = #{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="finalScenesJson != null">
|
||||
final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
members_json = #{membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="playersJson != null">
|
||||
players_json = #{playersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="actionsJson != null">
|
||||
actions_json = #{actionsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.ScriptWithBLOBs">
|
||||
update script
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
lang = #{lang,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
map_location_json = #{mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
bg_scenes_json = #{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
members_json = #{membersJson,jdbcType=LONGVARCHAR},
|
||||
players_json = #{playersJson,jdbcType=LONGVARCHAR},
|
||||
actions_json = #{actionsJson,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.Script">
|
||||
update script
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
lang = #{lang,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
map_location_json = #{mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,485 @@
|
|||
<?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.ScriptDraftDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.ScriptDraft">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="lang" jdbcType="VARCHAR" property="lang" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="map_location_json" jdbcType="VARCHAR" property="mapLocationJson" />
|
||||
<result column="full_marks_duration" jdbcType="INTEGER" property="fullMarksDuration" />
|
||||
<result column="passing_grade_duration" jdbcType="INTEGER" property="passingGradeDuration" />
|
||||
<result column="zero_duration" jdbcType="INTEGER" property="zeroDuration" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="explanation" jdbcType="VARCHAR" property="explanation" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.ScriptDraftWithBLOBs">
|
||||
<result column="bg_scenes_json" jdbcType="LONGVARCHAR" property="bgScenesJson" />
|
||||
<result column="final_scenes_json" jdbcType="LONGVARCHAR" property="finalScenesJson" />
|
||||
<result column="members_json" jdbcType="LONGVARCHAR" property="membersJson" />
|
||||
<result column="players_json" jdbcType="LONGVARCHAR" property="playersJson" />
|
||||
<result column="actions_json" jdbcType="LONGVARCHAR" property="actionsJson" />
|
||||
</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, `name`, lang, description, map_location_json, full_marks_duration, passing_grade_duration,
|
||||
zero_duration, `status`, explanation, creator_id, create_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
bg_scenes_json, final_scenes_json, members_json, players_json, actions_json
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.ScriptDraftExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from script_draft
|
||||
<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.ScriptDraftExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from script_draft
|
||||
<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 script_draft
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from script_draft
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.ScriptDraftExample">
|
||||
delete from script_draft
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ScriptDraftWithBLOBs" useGeneratedKeys="true">
|
||||
insert into script_draft (map_id, `name`, lang,
|
||||
description, map_location_json, full_marks_duration,
|
||||
passing_grade_duration, zero_duration, `status`,
|
||||
explanation, creator_id, create_time,
|
||||
bg_scenes_json, final_scenes_json,
|
||||
members_json, players_json, actions_json
|
||||
)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{lang,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{mapLocationJson,jdbcType=VARCHAR}, #{fullMarksDuration,jdbcType=INTEGER},
|
||||
#{passingGradeDuration,jdbcType=INTEGER}, #{zeroDuration,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
|
||||
#{explanation,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
|
||||
#{bgScenesJson,jdbcType=LONGVARCHAR}, #{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
#{membersJson,jdbcType=LONGVARCHAR}, #{playersJson,jdbcType=LONGVARCHAR}, #{actionsJson,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.ScriptDraftWithBLOBs" useGeneratedKeys="true">
|
||||
insert into script_draft
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="lang != null">
|
||||
lang,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="mapLocationJson != null">
|
||||
map_location_json,
|
||||
</if>
|
||||
<if test="fullMarksDuration != null">
|
||||
full_marks_duration,
|
||||
</if>
|
||||
<if test="passingGradeDuration != null">
|
||||
passing_grade_duration,
|
||||
</if>
|
||||
<if test="zeroDuration != null">
|
||||
zero_duration,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
explanation,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="bgScenesJson != null">
|
||||
bg_scenes_json,
|
||||
</if>
|
||||
<if test="finalScenesJson != null">
|
||||
final_scenes_json,
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
members_json,
|
||||
</if>
|
||||
<if test="playersJson != null">
|
||||
players_json,
|
||||
</if>
|
||||
<if test="actionsJson != null">
|
||||
actions_json,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lang != null">
|
||||
#{lang,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapLocationJson != null">
|
||||
#{mapLocationJson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fullMarksDuration != null">
|
||||
#{fullMarksDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingGradeDuration != null">
|
||||
#{passingGradeDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="zeroDuration != null">
|
||||
#{zeroDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
#{explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bgScenesJson != null">
|
||||
#{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="finalScenesJson != null">
|
||||
#{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
#{membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="playersJson != null">
|
||||
#{playersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="actionsJson != null">
|
||||
#{actionsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.ScriptDraftExample" resultType="java.lang.Long">
|
||||
select count(*) from script_draft
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update script_draft
|
||||
<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.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.lang != null">
|
||||
lang = #{record.lang,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.description != null">
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapLocationJson != null">
|
||||
map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fullMarksDuration != null">
|
||||
full_marks_duration = #{record.fullMarksDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.passingGradeDuration != null">
|
||||
passing_grade_duration = #{record.passingGradeDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.zeroDuration != null">
|
||||
zero_duration = #{record.zeroDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.explanation != null">
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.bgScenesJson != null">
|
||||
bg_scenes_json = #{record.bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.finalScenesJson != null">
|
||||
final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.membersJson != null">
|
||||
members_json = #{record.membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.playersJson != null">
|
||||
players_json = #{record.playersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.actionsJson != null">
|
||||
actions_json = #{record.actionsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update script_draft
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
lang = #{record.lang,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{record.fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{record.passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{record.zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
bg_scenes_json = #{record.bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
final_scenes_json = #{record.finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
members_json = #{record.membersJson,jdbcType=LONGVARCHAR},
|
||||
players_json = #{record.playersJson,jdbcType=LONGVARCHAR},
|
||||
actions_json = #{record.actionsJson,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update script_draft
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
lang = #{record.lang,jdbcType=VARCHAR},
|
||||
description = #{record.description,jdbcType=VARCHAR},
|
||||
map_location_json = #{record.mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{record.fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{record.passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{record.zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
explanation = #{record.explanation,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.ScriptDraftWithBLOBs">
|
||||
update script_draft
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lang != null">
|
||||
lang = #{lang,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapLocationJson != null">
|
||||
map_location_json = #{mapLocationJson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fullMarksDuration != null">
|
||||
full_marks_duration = #{fullMarksDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="passingGradeDuration != null">
|
||||
passing_grade_duration = #{passingGradeDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="zeroDuration != null">
|
||||
zero_duration = #{zeroDuration,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="explanation != null">
|
||||
explanation = #{explanation,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="bgScenesJson != null">
|
||||
bg_scenes_json = #{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="finalScenesJson != null">
|
||||
final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="membersJson != null">
|
||||
members_json = #{membersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="playersJson != null">
|
||||
players_json = #{playersJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="actionsJson != null">
|
||||
actions_json = #{actionsJson,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.ScriptDraftWithBLOBs">
|
||||
update script_draft
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
lang = #{lang,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
map_location_json = #{mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
explanation = #{explanation,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
bg_scenes_json = #{bgScenesJson,jdbcType=LONGVARCHAR},
|
||||
final_scenes_json = #{finalScenesJson,jdbcType=LONGVARCHAR},
|
||||
members_json = #{membersJson,jdbcType=LONGVARCHAR},
|
||||
players_json = #{playersJson,jdbcType=LONGVARCHAR},
|
||||
actions_json = #{actionsJson,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.ScriptDraft">
|
||||
update script_draft
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
lang = #{lang,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
map_location_json = #{mapLocationJson,jdbcType=VARCHAR},
|
||||
full_marks_duration = #{fullMarksDuration,jdbcType=INTEGER},
|
||||
passing_grade_duration = #{passingGradeDuration,jdbcType=INTEGER},
|
||||
zero_duration = #{zeroDuration,jdbcType=INTEGER},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
explanation = #{explanation,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,219 @@
|
|||
<?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.SimulationConversationMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationConversation">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="record_id" jdbcType="BIGINT" property="recordId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="is_group" jdbcType="BIT" property="isGroup" />
|
||||
</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, record_id, name, creator_id, is_group
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationConversationExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_conversation
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_conversation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_conversation
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationConversationExample">
|
||||
delete from simulation_conversation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.SimulationConversation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_conversation (record_id, name, creator_id,
|
||||
is_group)
|
||||
values (#{recordId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT},
|
||||
#{isGroup,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.SimulationConversation">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_conversation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">
|
||||
record_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="isGroup != null">
|
||||
is_group,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">
|
||||
#{recordId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="isGroup != null">
|
||||
#{isGroup,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationConversationExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_conversation
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_conversation
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.recordId != null">
|
||||
record_id = #{record.recordId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.isGroup != null">
|
||||
is_group = #{record.isGroup,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_conversation
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
record_id = #{record.recordId,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
is_group = #{record.isGroup,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationConversation">
|
||||
update simulation_conversation
|
||||
<set>
|
||||
<if test="recordId != null">
|
||||
record_id = #{recordId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="isGroup != null">
|
||||
is_group = #{isGroup,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationConversation">
|
||||
update simulation_conversation
|
||||
set record_id = #{recordId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
is_group = #{isGroup,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,281 @@
|
|||
<?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.SimulationConversationMemberMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationConversationMember">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="conversation_id" jdbcType="BIGINT" property="conversationId" />
|
||||
<result column="role" jdbcType="VARCHAR" property="role" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="device_code" jdbcType="VARCHAR" property="deviceCode" />
|
||||
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" />
|
||||
</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, conversation_id, role, user_id, name, nick_name, device_type, device_code, avatar_url
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationConversationMemberExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_conversation_member
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_conversation_member
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_conversation_member
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationConversationMemberExample">
|
||||
delete from simulation_conversation_member
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.SimulationConversationMember">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_conversation_member (conversation_id, role, user_id,
|
||||
name, nick_name, device_type,
|
||||
device_code, avatar_url)
|
||||
values (#{conversationId,jdbcType=BIGINT}, #{role,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
|
||||
#{name,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{deviceType,jdbcType=VARCHAR},
|
||||
#{deviceCode,jdbcType=VARCHAR}, #{avatarUrl,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.SimulationConversationMember">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_conversation_member
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="conversationId != null">
|
||||
conversation_id,
|
||||
</if>
|
||||
<if test="role != null">
|
||||
role,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
nick_name,
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type,
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code,
|
||||
</if>
|
||||
<if test="avatarUrl != null">
|
||||
avatar_url,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="conversationId != null">
|
||||
#{conversationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="role != null">
|
||||
#{role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
#{nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
#{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
#{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="avatarUrl != null">
|
||||
#{avatarUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationConversationMemberExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_conversation_member
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_conversation_member
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.conversationId != null">
|
||||
conversation_id = #{record.conversationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.role != null">
|
||||
role = #{record.role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.nickName != null">
|
||||
nick_name = #{record.nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceCode != null">
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.avatarUrl != null">
|
||||
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_conversation_member
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
conversation_id = #{record.conversationId,jdbcType=BIGINT},
|
||||
role = #{record.role,jdbcType=VARCHAR},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
nick_name = #{record.nickName,jdbcType=VARCHAR},
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationConversationMember">
|
||||
update simulation_conversation_member
|
||||
<set>
|
||||
<if test="conversationId != null">
|
||||
conversation_id = #{conversationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="role != null">
|
||||
role = #{role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
nick_name = #{nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="avatarUrl != null">
|
||||
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationConversationMember">
|
||||
update simulation_conversation_member
|
||||
set conversation_id = #{conversationId,jdbcType=BIGINT},
|
||||
role = #{role,jdbcType=VARCHAR},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
nick_name = #{nickName,jdbcType=VARCHAR},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
avatar_url = #{avatarUrl,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,266 @@
|
|||
<?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.SimulationConversationMessageMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationConversationMessage">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="conversation_id" jdbcType="BIGINT" property="conversationId" />
|
||||
<result column="member_id" jdbcType="BIGINT" property="memberId" />
|
||||
<result column="target_member_id" jdbcType="BIGINT" property="targetMemberId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="file_url" jdbcType="VARCHAR" property="fileUrl" />
|
||||
</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, conversation_id, member_id, target_member_id, create_time, type, content, file_url
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationConversationMessageExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_conversation_message
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_conversation_message
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_conversation_message
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationConversationMessageExample">
|
||||
delete from simulation_conversation_message
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.SimulationConversationMessage">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_conversation_message (conversation_id, member_id, target_member_id,
|
||||
create_time, type, content,
|
||||
file_url)
|
||||
values (#{conversationId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT}, #{targetMemberId,jdbcType=BIGINT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
|
||||
#{fileUrl,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.SimulationConversationMessage">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_conversation_message
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="conversationId != null">
|
||||
conversation_id,
|
||||
</if>
|
||||
<if test="memberId != null">
|
||||
member_id,
|
||||
</if>
|
||||
<if test="targetMemberId != null">
|
||||
target_member_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
<if test="fileUrl != null">
|
||||
file_url,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="conversationId != null">
|
||||
#{conversationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="memberId != null">
|
||||
#{memberId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="targetMemberId != null">
|
||||
#{targetMemberId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileUrl != null">
|
||||
#{fileUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationConversationMessageExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_conversation_message
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_conversation_message
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.conversationId != null">
|
||||
conversation_id = #{record.conversationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.memberId != null">
|
||||
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.targetMemberId != null">
|
||||
target_member_id = #{record.targetMemberId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.type != null">
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.fileUrl != null">
|
||||
file_url = #{record.fileUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_conversation_message
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
conversation_id = #{record.conversationId,jdbcType=BIGINT},
|
||||
member_id = #{record.memberId,jdbcType=BIGINT},
|
||||
target_member_id = #{record.targetMemberId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
file_url = #{record.fileUrl,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationConversationMessage">
|
||||
update simulation_conversation_message
|
||||
<set>
|
||||
<if test="conversationId != null">
|
||||
conversation_id = #{conversationId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="memberId != null">
|
||||
member_id = #{memberId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="targetMemberId != null">
|
||||
target_member_id = #{targetMemberId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="fileUrl != null">
|
||||
file_url = #{fileUrl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationConversationMessage">
|
||||
update simulation_conversation_message
|
||||
set conversation_id = #{conversationId,jdbcType=BIGINT},
|
||||
member_id = #{memberId,jdbcType=BIGINT},
|
||||
target_member_id = #{targetMemberId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
file_url = #{fileUrl,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,242 @@
|
|||
<?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.SimulationFrameMapper">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationFrame">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="record_id" jdbcType="BIGINT" property="recordId" />
|
||||
<result column="time" jdbcType="TIMESTAMP" property="time" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.SimulationFrame">
|
||||
<result column="data" jdbcType="LONGVARCHAR" property="data" />
|
||||
</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, record_id, time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.SimulationFrameExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from simulation_frame
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationFrameExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_frame
|
||||
<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 simulation_frame
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_frame
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationFrameExample">
|
||||
delete from simulation_frame
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.joylink.ms.entity.SimulationFrame">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_frame (record_id, time, data
|
||||
)
|
||||
values (#{recordId,jdbcType=BIGINT}, #{time,jdbcType=TIMESTAMP}, #{data,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.joylink.ms.entity.SimulationFrame">
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into simulation_frame
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">
|
||||
record_id,
|
||||
</if>
|
||||
<if test="time != null">
|
||||
time,
|
||||
</if>
|
||||
<if test="data != null">
|
||||
data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">
|
||||
#{recordId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="time != null">
|
||||
#{time,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
#{data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationFrameExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_frame
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_frame
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.recordId != null">
|
||||
record_id = #{record.recordId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.time != null">
|
||||
time = #{record.time,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.data != null">
|
||||
data = #{record.data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update simulation_frame
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
record_id = #{record.recordId,jdbcType=BIGINT},
|
||||
time = #{record.time,jdbcType=TIMESTAMP},
|
||||
data = #{record.data,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_frame
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
record_id = #{record.recordId,jdbcType=BIGINT},
|
||||
time = #{record.time,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationFrame">
|
||||
update simulation_frame
|
||||
<set>
|
||||
<if test="recordId != null">
|
||||
record_id = #{recordId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="time != null">
|
||||
time = #{time,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="data != null">
|
||||
data = #{data,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.SimulationFrame">
|
||||
update simulation_frame
|
||||
set record_id = #{recordId,jdbcType=BIGINT},
|
||||
time = #{time,jdbcType=TIMESTAMP},
|
||||
data = #{data,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationFrame">
|
||||
update simulation_frame
|
||||
set record_id = #{recordId,jdbcType=BIGINT},
|
||||
time = #{time,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,261 @@
|
|||
<?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.SimulationProcessRecordDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationProcessRecord">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="simulation_group" jdbcType="VARCHAR" property="simulationGroup" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="date_time" jdbcType="TIMESTAMP" property="dateTime" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.joylink.ms.entity.SimulationProcessRecord">
|
||||
<result column="socket_message" jdbcType="LONGVARCHAR" property="socketMessage" />
|
||||
</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, simulation_group, map_id, date_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
socket_message
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.joylink.ms.entity.SimulationProcessRecordExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from simulation_process_record
|
||||
<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.SimulationProcessRecordExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_process_record
|
||||
<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 simulation_process_record
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_process_record
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationProcessRecordExample">
|
||||
delete from simulation_process_record
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationProcessRecord" useGeneratedKeys="true">
|
||||
insert into simulation_process_record (simulation_group, map_id, date_time,
|
||||
socket_message)
|
||||
values (#{simulationGroup,jdbcType=VARCHAR}, #{mapId,jdbcType=BIGINT}, #{dateTime,jdbcType=TIMESTAMP},
|
||||
#{socketMessage,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationProcessRecord" useGeneratedKeys="true">
|
||||
insert into simulation_process_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="simulationGroup != null">
|
||||
simulation_group,
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="dateTime != null">
|
||||
date_time,
|
||||
</if>
|
||||
<if test="socketMessage != null">
|
||||
socket_message,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="simulationGroup != null">
|
||||
#{simulationGroup,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="dateTime != null">
|
||||
#{dateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="socketMessage != null">
|
||||
#{socketMessage,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationProcessRecordExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_process_record
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_process_record
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.simulationGroup != null">
|
||||
simulation_group = #{record.simulationGroup,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.mapId != null">
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.dateTime != null">
|
||||
date_time = #{record.dateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.socketMessage != null">
|
||||
socket_message = #{record.socketMessage,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update simulation_process_record
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
simulation_group = #{record.simulationGroup,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
date_time = #{record.dateTime,jdbcType=TIMESTAMP},
|
||||
socket_message = #{record.socketMessage,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_process_record
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
simulation_group = #{record.simulationGroup,jdbcType=VARCHAR},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
date_time = #{record.dateTime,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationProcessRecord">
|
||||
update simulation_process_record
|
||||
<set>
|
||||
<if test="simulationGroup != null">
|
||||
simulation_group = #{simulationGroup,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="dateTime != null">
|
||||
date_time = #{dateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="socketMessage != null">
|
||||
socket_message = #{socketMessage,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.joylink.ms.entity.SimulationProcessRecord">
|
||||
update simulation_process_record
|
||||
set simulation_group = #{simulationGroup,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
date_time = #{dateTime,jdbcType=TIMESTAMP},
|
||||
socket_message = #{socketMessage,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationProcessRecord">
|
||||
update simulation_process_record
|
||||
set simulation_group = #{simulationGroup,jdbcType=VARCHAR},
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
date_time = #{dateTime,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,260 @@
|
|||
<?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.SimulationRecordDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationRecord">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="map_name" jdbcType="VARCHAR" property="mapName" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="destroy_time" jdbcType="TIMESTAMP" property="destroyTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, map_name, prd_type, creator_id, create_time, destroy_time, `status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationRecordExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_record
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_record
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_record
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationRecordExample">
|
||||
delete from simulation_record
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRecord" useGeneratedKeys="true">
|
||||
insert into simulation_record (map_id, map_name, prd_type,
|
||||
creator_id, create_time, destroy_time,
|
||||
`status`)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{mapName,jdbcType=VARCHAR}, #{prdType,jdbcType=VARCHAR},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{destroyTime,jdbcType=TIMESTAMP},
|
||||
#{status,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRecord" useGeneratedKeys="true">
|
||||
insert into simulation_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="mapName != null">
|
||||
map_name,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="destroyTime != null">
|
||||
destroy_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="mapName != null">
|
||||
#{mapName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="destroyTime != null">
|
||||
#{destroyTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationRecordExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_record
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_record
|
||||
<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.mapName != null">
|
||||
map_name = #{record.mapName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.destroyTime != null">
|
||||
destroy_time = #{record.destroyTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_record
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
map_name = #{record.mapName,jdbcType=VARCHAR},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
destroy_time = #{record.destroyTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationRecord">
|
||||
update simulation_record
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="mapName != null">
|
||||
map_name = #{mapName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="destroyTime != null">
|
||||
destroy_time = #{destroyTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationRecord">
|
||||
update simulation_record
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
map_name = #{mapName,jdbcType=VARCHAR},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
destroy_time = #{destroyTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,308 @@
|
|||
<?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.SimulationRoomDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationRoom">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="map_id" jdbcType="BIGINT" property="mapId" />
|
||||
<result column="prd_type" jdbcType="VARCHAR" property="prdType" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="role_permit_amount" jdbcType="INTEGER" property="rolePermitAmount" />
|
||||
<result column="audience_permit_amount" jdbcType="INTEGER" property="audiencePermitAmount" />
|
||||
<result column="creator_id" jdbcType="BIGINT" property="creatorId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="destroy_time" jdbcType="TIMESTAMP" property="destroyTime" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, prd_type, code, `name`, role_permit_amount, audience_permit_amount, creator_id,
|
||||
create_time, destroy_time, `status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationRoomExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_room
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_room
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_room
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationRoomExample">
|
||||
delete from simulation_room
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRoom" useGeneratedKeys="true">
|
||||
insert into simulation_room (map_id, prd_type, code,
|
||||
`name`, role_permit_amount, audience_permit_amount,
|
||||
creator_id, create_time, destroy_time,
|
||||
`status`)
|
||||
values (#{mapId,jdbcType=BIGINT}, #{prdType,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{rolePermitAmount,jdbcType=INTEGER}, #{audiencePermitAmount,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{destroyTime,jdbcType=TIMESTAMP},
|
||||
#{status,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRoom" useGeneratedKeys="true">
|
||||
insert into simulation_room
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
map_id,
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type,
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name`,
|
||||
</if>
|
||||
<if test="rolePermitAmount != null">
|
||||
role_permit_amount,
|
||||
</if>
|
||||
<if test="audiencePermitAmount != null">
|
||||
audience_permit_amount,
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="destroyTime != null">
|
||||
destroy_time,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mapId != null">
|
||||
#{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
#{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rolePermitAmount != null">
|
||||
#{rolePermitAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="audiencePermitAmount != null">
|
||||
#{audiencePermitAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
#{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="destroyTime != null">
|
||||
#{destroyTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationRoomExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_room
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_room
|
||||
<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.prdType != null">
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.code != null">
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.rolePermitAmount != null">
|
||||
role_permit_amount = #{record.rolePermitAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.audiencePermitAmount != null">
|
||||
audience_permit_amount = #{record.audiencePermitAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.creatorId != null">
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.destroyTime != null">
|
||||
destroy_time = #{record.destroyTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_room
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
map_id = #{record.mapId,jdbcType=BIGINT},
|
||||
prd_type = #{record.prdType,jdbcType=VARCHAR},
|
||||
code = #{record.code,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
role_permit_amount = #{record.rolePermitAmount,jdbcType=INTEGER},
|
||||
audience_permit_amount = #{record.audiencePermitAmount,jdbcType=INTEGER},
|
||||
creator_id = #{record.creatorId,jdbcType=BIGINT},
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
destroy_time = #{record.destroyTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationRoom">
|
||||
update simulation_room
|
||||
<set>
|
||||
<if test="mapId != null">
|
||||
map_id = #{mapId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="prdType != null">
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="code != null">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="rolePermitAmount != null">
|
||||
role_permit_amount = #{rolePermitAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="audiencePermitAmount != null">
|
||||
audience_permit_amount = #{audiencePermitAmount,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null">
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="destroyTime != null">
|
||||
destroy_time = #{destroyTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationRoom">
|
||||
update simulation_room
|
||||
set map_id = #{mapId,jdbcType=BIGINT},
|
||||
prd_type = #{prdType,jdbcType=VARCHAR},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
`name` = #{name,jdbcType=VARCHAR},
|
||||
role_permit_amount = #{rolePermitAmount,jdbcType=INTEGER},
|
||||
audience_permit_amount = #{audiencePermitAmount,jdbcType=INTEGER},
|
||||
creator_id = #{creatorId,jdbcType=BIGINT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
destroy_time = #{destroyTime,jdbcType=TIMESTAMP},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,213 @@
|
|||
<?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.SimulationRoomDeviceDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationRoomDevice">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="room_id" jdbcType="BIGINT" property="roomId" />
|
||||
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
|
||||
<result column="device_code" jdbcType="VARCHAR" property="deviceCode" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
</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, room_id, device_type, device_code, `status`
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationRoomDeviceExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_room_device
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_room_device
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_room_device
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationRoomDeviceExample">
|
||||
delete from simulation_room_device
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRoomDevice" useGeneratedKeys="true">
|
||||
insert into simulation_room_device (room_id, device_type, device_code,
|
||||
`status`)
|
||||
values (#{roomId,jdbcType=BIGINT}, #{deviceType,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRoomDevice" useGeneratedKeys="true">
|
||||
insert into simulation_room_device
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roomId != null">
|
||||
room_id,
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type,
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roomId != null">
|
||||
#{roomId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
#{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
#{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationRoomDeviceExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_room_device
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_room_device
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.roomId != null">
|
||||
room_id = #{record.roomId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.deviceType != null">
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceCode != null">
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_room_device
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
room_id = #{record.roomId,jdbcType=BIGINT},
|
||||
device_type = #{record.deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationRoomDevice">
|
||||
update simulation_room_device
|
||||
<set>
|
||||
<if test="roomId != null">
|
||||
room_id = #{roomId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deviceType != null">
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationRoomDevice">
|
||||
update simulation_room_device
|
||||
set room_id = #{roomId,jdbcType=BIGINT},
|
||||
device_type = #{deviceType,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
|
@ -0,0 +1,293 @@
|
|||
<?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.SimulationRoomMemberDAO">
|
||||
<resultMap id="BaseResultMap" type="com.joylink.ms.entity.SimulationRoomMember">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="room_id" jdbcType="BIGINT" property="roomId" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
|
||||
<result column="role" jdbcType="VARCHAR" property="role" />
|
||||
<result column="device_code" jdbcType="VARCHAR" property="deviceCode" />
|
||||
<result column="ibp_part" jdbcType="VARCHAR" property="ibpPart" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="in_room" jdbcType="BIT" property="inRoom" />
|
||||
<result column="in_simulation" jdbcType="BIT" property="inSimulation" />
|
||||
</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, room_id, user_id, nick_name, `role`, device_code, ibp_part, `status`, in_room,
|
||||
in_simulation
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.joylink.ms.entity.SimulationRoomMemberExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_room_member
|
||||
<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="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from simulation_room_member
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from simulation_room_member
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.joylink.ms.entity.SimulationRoomMemberExample">
|
||||
delete from simulation_room_member
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRoomMember" useGeneratedKeys="true">
|
||||
insert into simulation_room_member (room_id, user_id, nick_name,
|
||||
`role`, device_code, ibp_part,
|
||||
`status`, in_room, in_simulation
|
||||
)
|
||||
values (#{roomId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{nickName,jdbcType=VARCHAR},
|
||||
#{role,jdbcType=VARCHAR}, #{deviceCode,jdbcType=VARCHAR}, #{ibpPart,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{inRoom,jdbcType=BIT}, #{inSimulation,jdbcType=BIT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.joylink.ms.entity.SimulationRoomMember" useGeneratedKeys="true">
|
||||
insert into simulation_room_member
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="roomId != null">
|
||||
room_id,
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
nick_name,
|
||||
</if>
|
||||
<if test="role != null">
|
||||
`role`,
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code,
|
||||
</if>
|
||||
<if test="ibpPart != null">
|
||||
ibp_part,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="inRoom != null">
|
||||
in_room,
|
||||
</if>
|
||||
<if test="inSimulation != null">
|
||||
in_simulation,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="roomId != null">
|
||||
#{roomId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
#{nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="role != null">
|
||||
#{role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
#{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ibpPart != null">
|
||||
#{ibpPart,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="inRoom != null">
|
||||
#{inRoom,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="inSimulation != null">
|
||||
#{inSimulation,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.joylink.ms.entity.SimulationRoomMemberExample" resultType="java.lang.Long">
|
||||
select count(*) from simulation_room_member
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update simulation_room_member
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.roomId != null">
|
||||
room_id = #{record.roomId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.nickName != null">
|
||||
nick_name = #{record.nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.role != null">
|
||||
`role` = #{record.role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.deviceCode != null">
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.ibpPart != null">
|
||||
ibp_part = #{record.ibpPart,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.inRoom != null">
|
||||
in_room = #{record.inRoom,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.inSimulation != null">
|
||||
in_simulation = #{record.inSimulation,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update simulation_room_member
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
room_id = #{record.roomId,jdbcType=BIGINT},
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
nick_name = #{record.nickName,jdbcType=VARCHAR},
|
||||
`role` = #{record.role,jdbcType=VARCHAR},
|
||||
device_code = #{record.deviceCode,jdbcType=VARCHAR},
|
||||
ibp_part = #{record.ibpPart,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
in_room = #{record.inRoom,jdbcType=BIT},
|
||||
in_simulation = #{record.inSimulation,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.joylink.ms.entity.SimulationRoomMember">
|
||||
update simulation_room_member
|
||||
<set>
|
||||
<if test="roomId != null">
|
||||
room_id = #{roomId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="nickName != null">
|
||||
nick_name = #{nickName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="role != null">
|
||||
`role` = #{role,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="deviceCode != null">
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ibpPart != null">
|
||||
ibp_part = #{ibpPart,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="inRoom != null">
|
||||
in_room = #{inRoom,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="inSimulation != null">
|
||||
in_simulation = #{inSimulation,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.joylink.ms.entity.SimulationRoomMember">
|
||||
update simulation_room_member
|
||||
set room_id = #{roomId,jdbcType=BIGINT},
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
nick_name = #{nickName,jdbcType=VARCHAR},
|
||||
`role` = #{role,jdbcType=VARCHAR},
|
||||
device_code = #{deviceCode,jdbcType=VARCHAR},
|
||||
ibp_part = #{ibpPart,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
in_room = #{inRoom,jdbcType=BIT},
|
||||
in_simulation = #{inSimulation,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue