SchedulingDeleteMapper.xml 3.8 KB
<?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.sunyo.wlpt.message.bus.service.mapper.SchedulingDeleteMapper">
  <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
    <!--@mbg.generated-->
    <!--@Table scheduling_delete-->
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="delete_time" jdbcType="INTEGER" property="deleteTime" />
    <result column="delete_type" jdbcType="VARCHAR" property="deleteType" />
    <result column="description" jdbcType="VARCHAR" property="description" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, delete_time, delete_type, description
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select 
    <include refid="Base_Column_List" />
    from scheduling_delete
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    <!--@mbg.generated-->
    delete from scheduling_delete
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
    <!--@mbg.generated-->
    insert into scheduling_delete (id, delete_time, delete_type, 
      description)
    values (#{id,jdbcType=VARCHAR}, #{deleteTime,jdbcType=INTEGER}, #{deleteType,jdbcType=VARCHAR}, 
      #{description,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
    <!--@mbg.generated-->
    insert into scheduling_delete
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="deleteTime != null">
        delete_time,
      </if>
      <if test="deleteType != null">
        delete_type,
      </if>
      <if test="description != null">
        description,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="deleteTime != null">
        #{deleteTime,jdbcType=INTEGER},
      </if>
      <if test="deleteType != null">
        #{deleteType,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        #{description,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
    <!--@mbg.generated-->
    update scheduling_delete
    <set>
      <if test="deleteTime != null">
        delete_time = #{deleteTime,jdbcType=INTEGER},
      </if>
      <if test="deleteType != null">
        delete_type = #{deleteType,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        description = #{description,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
    <!--@mbg.generated-->
    update scheduling_delete
    set delete_time = #{deleteTime,jdbcType=INTEGER},
      delete_type = #{deleteType,jdbcType=VARCHAR},
      description = #{description,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>

  <select id="selectByType" parameterType="java.lang.String" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from scheduling_delete
    <where>
            <!-- 删除类型 -->
            <if test="deleteType != null and deleteType !=''">
                delete_type = #{deleteType,jdbcType=VARCHAR}
            </if>
    </where>
    limit 1
  </select>
</mapper>