<?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.ruoyi.system.mapper.task.TkRoundMatterMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.task.TkRoundMatter">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="sub_task_id" jdbcType="VARCHAR" property="subTaskId" />
    <result column="com_task_id" jdbcType="VARCHAR" property="comTaskId" />
    <result column="matter_id" jdbcType="VARCHAR" property="matterId" />
    <result column="order_by" jdbcType="INTEGER" property="orderBy" />
    <result column="type" jdbcType="VARCHAR" property="type" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="unusual" jdbcType="BIT" property="unusual" />
    <result column="action" jdbcType="VARCHAR" property="action" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="standby1" jdbcType="VARCHAR" property="standby1" />
    <result column="standby2" jdbcType="VARCHAR" property="standby2" />
    <result column="standby3" jdbcType="VARCHAR" property="standby3" />
    <result column="standby4" jdbcType="VARCHAR" property="standby4" />
    <result column="standby5" jdbcType="VARCHAR" property="standby5" />
    <result column="standby6" jdbcType="VARCHAR" property="standby6" />
    <result column="standby7" jdbcType="VARCHAR" property="standby7" />
    <result column="standby8" jdbcType="VARCHAR" property="standby8" />
    <result column="standby9" jdbcType="VARCHAR" property="standby9" />
    <result column="standby10" jdbcType="VARCHAR" property="standby10" />
  </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, sub_task_id, com_task_id, matter_id, order_by, type, name, unusual, action, remark, 
    create_time, update_time, create_by, update_by, standby1, standby2, standby3, standby4, 
    standby5, standby6, standby7, standby8, standby9, standby10
  </sql>
  <select id="selectByExample" parameterType="com.ruoyi.system.domain.task.TkRoundMatterExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tk_round_matter
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from tk_round_matter
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from tk_round_matter
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ruoyi.system.domain.task.TkRoundMatterExample">
    delete from tk_round_matter
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ruoyi.system.domain.task.TkRoundMatter">
    insert into tk_round_matter (id, sub_task_id, com_task_id, 
      matter_id, order_by, type, 
      name, unusual, action, 
      remark, create_time, update_time, 
      create_by, update_by, standby1, 
      standby2, standby3, standby4, 
      standby5, standby6, standby7, 
      standby8, standby9, standby10
      )
    values (#{id,jdbcType=VARCHAR}, #{subTaskId,jdbcType=VARCHAR}, #{comTaskId,jdbcType=VARCHAR}, 
      #{matterId,jdbcType=VARCHAR}, #{orderBy,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, 
      #{name,jdbcType=VARCHAR}, #{unusual,jdbcType=BIT}, #{action,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
      #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, #{standby1,jdbcType=VARCHAR}, 
      #{standby2,jdbcType=VARCHAR}, #{standby3,jdbcType=VARCHAR}, #{standby4,jdbcType=VARCHAR}, 
      #{standby5,jdbcType=VARCHAR}, #{standby6,jdbcType=VARCHAR}, #{standby7,jdbcType=VARCHAR}, 
      #{standby8,jdbcType=VARCHAR}, #{standby9,jdbcType=VARCHAR}, #{standby10,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.ruoyi.system.domain.task.TkRoundMatter">
    insert into tk_round_matter
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="subTaskId != null">
        sub_task_id,
      </if>
      <if test="comTaskId != null">
        com_task_id,
      </if>
      <if test="matterId != null">
        matter_id,
      </if>
      <if test="orderBy != null">
        order_by,
      </if>
      <if test="type != null">
        type,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="unusual != null">
        unusual,
      </if>
      <if test="action != null">
        action,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
      <if test="standby1 != null">
        standby1,
      </if>
      <if test="standby2 != null">
        standby2,
      </if>
      <if test="standby3 != null">
        standby3,
      </if>
      <if test="standby4 != null">
        standby4,
      </if>
      <if test="standby5 != null">
        standby5,
      </if>
      <if test="standby6 != null">
        standby6,
      </if>
      <if test="standby7 != null">
        standby7,
      </if>
      <if test="standby8 != null">
        standby8,
      </if>
      <if test="standby9 != null">
        standby9,
      </if>
      <if test="standby10 != null">
        standby10,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="subTaskId != null">
        #{subTaskId,jdbcType=VARCHAR},
      </if>
      <if test="comTaskId != null">
        #{comTaskId,jdbcType=VARCHAR},
      </if>
      <if test="matterId != null">
        #{matterId,jdbcType=VARCHAR},
      </if>
      <if test="orderBy != null">
        #{orderBy,jdbcType=INTEGER},
      </if>
      <if test="type != null">
        #{type,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="unusual != null">
        #{unusual,jdbcType=BIT},
      </if>
      <if test="action != null">
        #{action,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="standby1 != null">
        #{standby1,jdbcType=VARCHAR},
      </if>
      <if test="standby2 != null">
        #{standby2,jdbcType=VARCHAR},
      </if>
      <if test="standby3 != null">
        #{standby3,jdbcType=VARCHAR},
      </if>
      <if test="standby4 != null">
        #{standby4,jdbcType=VARCHAR},
      </if>
      <if test="standby5 != null">
        #{standby5,jdbcType=VARCHAR},
      </if>
      <if test="standby6 != null">
        #{standby6,jdbcType=VARCHAR},
      </if>
      <if test="standby7 != null">
        #{standby7,jdbcType=VARCHAR},
      </if>
      <if test="standby8 != null">
        #{standby8,jdbcType=VARCHAR},
      </if>
      <if test="standby9 != null">
        #{standby9,jdbcType=VARCHAR},
      </if>
      <if test="standby10 != null">
        #{standby10,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ruoyi.system.domain.task.TkRoundMatterExample" resultType="java.lang.Long">
    select count(*) from tk_round_matter
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tk_round_matter
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.subTaskId != null">
        sub_task_id = #{record.subTaskId,jdbcType=VARCHAR},
      </if>
      <if test="record.comTaskId != null">
        com_task_id = #{record.comTaskId,jdbcType=VARCHAR},
      </if>
      <if test="record.matterId != null">
        matter_id = #{record.matterId,jdbcType=VARCHAR},
      </if>
      <if test="record.orderBy != null">
        order_by = #{record.orderBy,jdbcType=INTEGER},
      </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.unusual != null">
        unusual = #{record.unusual,jdbcType=BIT},
      </if>
      <if test="record.action != null">
        action = #{record.action,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </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.createBy != null">
        create_by = #{record.createBy,jdbcType=VARCHAR},
      </if>
      <if test="record.updateBy != null">
        update_by = #{record.updateBy,jdbcType=VARCHAR},
      </if>
      <if test="record.standby1 != null">
        standby1 = #{record.standby1,jdbcType=VARCHAR},
      </if>
      <if test="record.standby2 != null">
        standby2 = #{record.standby2,jdbcType=VARCHAR},
      </if>
      <if test="record.standby3 != null">
        standby3 = #{record.standby3,jdbcType=VARCHAR},
      </if>
      <if test="record.standby4 != null">
        standby4 = #{record.standby4,jdbcType=VARCHAR},
      </if>
      <if test="record.standby5 != null">
        standby5 = #{record.standby5,jdbcType=VARCHAR},
      </if>
      <if test="record.standby6 != null">
        standby6 = #{record.standby6,jdbcType=VARCHAR},
      </if>
      <if test="record.standby7 != null">
        standby7 = #{record.standby7,jdbcType=VARCHAR},
      </if>
      <if test="record.standby8 != null">
        standby8 = #{record.standby8,jdbcType=VARCHAR},
      </if>
      <if test="record.standby9 != null">
        standby9 = #{record.standby9,jdbcType=VARCHAR},
      </if>
      <if test="record.standby10 != null">
        standby10 = #{record.standby10,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tk_round_matter
    set id = #{record.id,jdbcType=VARCHAR},
      sub_task_id = #{record.subTaskId,jdbcType=VARCHAR},
      com_task_id = #{record.comTaskId,jdbcType=VARCHAR},
      matter_id = #{record.matterId,jdbcType=VARCHAR},
      order_by = #{record.orderBy,jdbcType=INTEGER},
      type = #{record.type,jdbcType=VARCHAR},
      name = #{record.name,jdbcType=VARCHAR},
      unusual = #{record.unusual,jdbcType=BIT},
      action = #{record.action,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      create_by = #{record.createBy,jdbcType=VARCHAR},
      update_by = #{record.updateBy,jdbcType=VARCHAR},
      standby1 = #{record.standby1,jdbcType=VARCHAR},
      standby2 = #{record.standby2,jdbcType=VARCHAR},
      standby3 = #{record.standby3,jdbcType=VARCHAR},
      standby4 = #{record.standby4,jdbcType=VARCHAR},
      standby5 = #{record.standby5,jdbcType=VARCHAR},
      standby6 = #{record.standby6,jdbcType=VARCHAR},
      standby7 = #{record.standby7,jdbcType=VARCHAR},
      standby8 = #{record.standby8,jdbcType=VARCHAR},
      standby9 = #{record.standby9,jdbcType=VARCHAR},
      standby10 = #{record.standby10,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.task.TkRoundMatter">
    update tk_round_matter
    <set>
      <if test="subTaskId != null">
        sub_task_id = #{subTaskId,jdbcType=VARCHAR},
      </if>
      <if test="comTaskId != null">
        com_task_id = #{comTaskId,jdbcType=VARCHAR},
      </if>
      <if test="matterId != null">
        matter_id = #{matterId,jdbcType=VARCHAR},
      </if>
      <if test="orderBy != null">
        order_by = #{orderBy,jdbcType=INTEGER},
      </if>
      <if test="type != null">
        type = #{type,jdbcType=VARCHAR},
      </if>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="unusual != null">
        unusual = #{unusual,jdbcType=BIT},
      </if>
      <if test="action != null">
        action = #{action,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="createBy != null">
        create_by = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="standby1 != null">
        standby1 = #{standby1,jdbcType=VARCHAR},
      </if>
      <if test="standby2 != null">
        standby2 = #{standby2,jdbcType=VARCHAR},
      </if>
      <if test="standby3 != null">
        standby3 = #{standby3,jdbcType=VARCHAR},
      </if>
      <if test="standby4 != null">
        standby4 = #{standby4,jdbcType=VARCHAR},
      </if>
      <if test="standby5 != null">
        standby5 = #{standby5,jdbcType=VARCHAR},
      </if>
      <if test="standby6 != null">
        standby6 = #{standby6,jdbcType=VARCHAR},
      </if>
      <if test="standby7 != null">
        standby7 = #{standby7,jdbcType=VARCHAR},
      </if>
      <if test="standby8 != null">
        standby8 = #{standby8,jdbcType=VARCHAR},
      </if>
      <if test="standby9 != null">
        standby9 = #{standby9,jdbcType=VARCHAR},
      </if>
      <if test="standby10 != null">
        standby10 = #{standby10,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.task.TkRoundMatter">
    update tk_round_matter
    set sub_task_id = #{subTaskId,jdbcType=VARCHAR},
      com_task_id = #{comTaskId,jdbcType=VARCHAR},
      matter_id = #{matterId,jdbcType=VARCHAR},
      order_by = #{orderBy,jdbcType=INTEGER},
      type = #{type,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      unusual = #{unusual,jdbcType=BIT},
      action = #{action,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      create_by = #{createBy,jdbcType=VARCHAR},
      update_by = #{updateBy,jdbcType=VARCHAR},
      standby1 = #{standby1,jdbcType=VARCHAR},
      standby2 = #{standby2,jdbcType=VARCHAR},
      standby3 = #{standby3,jdbcType=VARCHAR},
      standby4 = #{standby4,jdbcType=VARCHAR},
      standby5 = #{standby5,jdbcType=VARCHAR},
      standby6 = #{standby6,jdbcType=VARCHAR},
      standby7 = #{standby7,jdbcType=VARCHAR},
      standby8 = #{standby8,jdbcType=VARCHAR},
      standby9 = #{standby9,jdbcType=VARCHAR},
      standby10 = #{standby10,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>