You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
4.6 KiB
XML
128 lines
4.6 KiB
XML
2 years ago
|
<?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.shxy.xymanager_dao.dao.TerminalScheduleDao">
|
||
|
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalSchedule">
|
||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||
|
<result column="term_id" jdbcType="INTEGER" property="termId" />
|
||
|
<result column="channel_id" jdbcType="TINYINT" property="channelId" />
|
||
|
<result column="hour" jdbcType="TINYINT" property="hour" />
|
||
|
<result column="minute" jdbcType="TINYINT" property="minute" />
|
||
|
<result column="preset_id" jdbcType="INTEGER" property="presetId" />
|
||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||
|
</resultMap>
|
||
|
<sql id="Base_Column_List">
|
||
|
id, term_id, channel_id, hour, minute, preset_id, create_time, update_time
|
||
|
</sql>
|
||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||
|
select
|
||
|
<include refid="Base_Column_List" />
|
||
|
from terminal_schedule
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</select>
|
||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||
|
delete from terminal_schedule
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</delete>
|
||
|
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalSchedule">
|
||
|
insert into terminal_schedule (id, term_id, channel_id,
|
||
|
hour, minute, preset_id,
|
||
|
create_time, update_time)
|
||
|
values (#{id,jdbcType=INTEGER}, #{termId,jdbcType=INTEGER}, #{channelId,jdbcType=TINYINT},
|
||
|
#{hour,jdbcType=TINYINT}, #{minute,jdbcType=TINYINT}, #{presetId,jdbcType=INTEGER},
|
||
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
|
||
|
</insert>
|
||
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalSchedule">
|
||
|
insert into terminal_schedule
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">
|
||
|
id,
|
||
|
</if>
|
||
|
<if test="termId != null">
|
||
|
term_id,
|
||
|
</if>
|
||
|
<if test="channelId != null">
|
||
|
channel_id,
|
||
|
</if>
|
||
|
<if test="hour != null">
|
||
|
hour,
|
||
|
</if>
|
||
|
<if test="minute != null">
|
||
|
minute,
|
||
|
</if>
|
||
|
<if test="presetId != null">
|
||
|
preset_id,
|
||
|
</if>
|
||
|
<if test="createTime != null">
|
||
|
create_time,
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
update_time,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">
|
||
|
#{id,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="termId != null">
|
||
|
#{termId,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="channelId != null">
|
||
|
#{channelId,jdbcType=TINYINT},
|
||
|
</if>
|
||
|
<if test="hour != null">
|
||
|
#{hour,jdbcType=TINYINT},
|
||
|
</if>
|
||
|
<if test="minute != null">
|
||
|
#{minute,jdbcType=TINYINT},
|
||
|
</if>
|
||
|
<if test="presetId != null">
|
||
|
#{presetId,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="createTime != null">
|
||
|
#{createTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalSchedule">
|
||
|
update terminal_schedule
|
||
|
<set>
|
||
|
<if test="termId != null">
|
||
|
term_id = #{termId,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="channelId != null">
|
||
|
channel_id = #{channelId,jdbcType=TINYINT},
|
||
|
</if>
|
||
|
<if test="hour != null">
|
||
|
hour = #{hour,jdbcType=TINYINT},
|
||
|
</if>
|
||
|
<if test="minute != null">
|
||
|
minute = #{minute,jdbcType=TINYINT},
|
||
|
</if>
|
||
|
<if test="presetId != null">
|
||
|
preset_id = #{presetId,jdbcType=INTEGER},
|
||
|
</if>
|
||
|
<if test="createTime != null">
|
||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
<if test="updateTime != null">
|
||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||
|
</if>
|
||
|
</set>
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalSchedule">
|
||
|
update terminal_schedule
|
||
|
set term_id = #{termId,jdbcType=INTEGER},
|
||
|
channel_id = #{channelId,jdbcType=TINYINT},
|
||
|
hour = #{hour,jdbcType=TINYINT},
|
||
|
minute = #{minute,jdbcType=TINYINT},
|
||
|
preset_id = #{presetId,jdbcType=INTEGER},
|
||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</update>
|
||
|
</mapper>
|