<?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.TkRoundSubtaskMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.task.TkRoundSubtask">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="task_id" jdbcType="VARCHAR" property="taskId" />
    <result column="obj_id" jdbcType="VARCHAR" property="objId" />
    <result column="dxlx" jdbcType="VARCHAR" property="dxlx" />
    <result column="qylx" jdbcType="VARCHAR" property="qylx" />
    <result column="grid_id" jdbcType="VARCHAR" property="gridId" />
    <result column="obj_name" jdbcType="VARCHAR" property="objName" />
    <result column="code" jdbcType="VARCHAR" property="code" />
    <result column="time" jdbcType="DATE" property="time" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="result" jdbcType="VARCHAR" property="result" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
    <result column="update_name" jdbcType="VARCHAR" property="updateName" />
    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  </resultMap>
  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.ruoyi.system.domain.task.TkRoundSubtask">
    <result column="content" jdbcType="LONGVARCHAR" property="content" />
    <result column="file_path" jdbcType="LONGVARCHAR" property="filePath" />
  </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, task_id, obj_id, dxlx, qylx, grid_id, obj_name, code, time, status, result, remark, 
    create_by, create_time, update_by, update_name, update_time
  </sql>
  <sql id="Blob_Column_List">
    content, file_path
  </sql>
  <select id="selectByExampleWithBLOBs" parameterType="com.ruoyi.system.domain.task.TkRoundSubtaskExample" resultMap="ResultMapWithBLOBs">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tk_round_subtask
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null">
      order by ${orderByClause}
    </if>
  </select>
  <select id="selectByExample" parameterType="com.ruoyi.system.domain.task.TkRoundSubtaskExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tk_round_subtask
    <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="ResultMapWithBLOBs">
    select 
    <include refid="Base_Column_List" />
    ,
    <include refid="Blob_Column_List" />
    from tk_round_subtask
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from tk_round_subtask
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ruoyi.system.domain.task.TkRoundSubtaskExample">
    delete from tk_round_subtask
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ruoyi.system.domain.task.TkRoundSubtask">
    insert into tk_round_subtask (id, task_id, obj_id, 
      dxlx, qylx, grid_id, 
      obj_name, code, time, status, 
      result, remark, create_by, 
      create_time, update_by, update_name, 
      update_time, content, file_path
      )
    values (#{id,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{objId,jdbcType=VARCHAR}, 
      #{dxlx,jdbcType=VARCHAR}, #{qylx,jdbcType=VARCHAR}, #{gridId,jdbcType=VARCHAR}, 
      #{objName,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{time,jdbcType=DATE}, #{status,jdbcType=VARCHAR}, 
      #{result,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, 
      #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateName,jdbcType=VARCHAR}, 
      #{updateTime,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR}, #{filePath,jdbcType=LONGVARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.ruoyi.system.domain.task.TkRoundSubtask">
    insert into tk_round_subtask
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="taskId != null">
        task_id,
      </if>
      <if test="objId != null">
        obj_id,
      </if>
      <if test="dxlx != null">
        dxlx,
      </if>
      <if test="qylx != null">
        qylx,
      </if>
      <if test="gridId != null">
        grid_id,
      </if>
      <if test="objName != null">
        obj_name,
      </if>
      <if test="code != null">
        code,
      </if>
      <if test="time != null">
        time,
      </if>
      <if test="status != null">
        status,
      </if>
      <if test="result != null">
        result,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="createBy != null">
        create_by,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="updateBy != null">
        update_by,
      </if>
      <if test="updateName != null">
        update_name,
      </if>
      <if test="updateTime != null">
        update_time,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="filePath != null">
        file_path,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="taskId != null">
        #{taskId,jdbcType=VARCHAR},
      </if>
      <if test="objId != null">
        #{objId,jdbcType=VARCHAR},
      </if>
      <if test="dxlx != null">
        #{dxlx,jdbcType=VARCHAR},
      </if>
      <if test="qylx != null">
        #{qylx,jdbcType=VARCHAR},
      </if>
      <if test="gridId != null">
        #{gridId,jdbcType=VARCHAR},
      </if>
      <if test="objName != null">
        #{objName,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="time != null">
        #{time,jdbcType=DATE},
      </if>
      <if test="status != null">
        #{status,jdbcType=VARCHAR},
      </if>
      <if test="result != null">
        #{result,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateName != null">
        #{updateName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        #{content,jdbcType=LONGVARCHAR},
      </if>
      <if test="filePath != null">
        #{filePath,jdbcType=LONGVARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ruoyi.system.domain.task.TkRoundSubtaskExample" resultType="java.lang.Long">
    select count(*) from tk_round_subtask
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tk_round_subtask
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.taskId != null">
        task_id = #{record.taskId,jdbcType=VARCHAR},
      </if>
      <if test="record.objId != null">
        obj_id = #{record.objId,jdbcType=VARCHAR},
      </if>
      <if test="record.dxlx != null">
        dxlx = #{record.dxlx,jdbcType=VARCHAR},
      </if>
      <if test="record.qylx != null">
        qylx = #{record.qylx,jdbcType=VARCHAR},
      </if>
      <if test="record.gridId != null">
        grid_id = #{record.gridId,jdbcType=VARCHAR},
      </if>
      <if test="record.objName != null">
        obj_name = #{record.objName,jdbcType=VARCHAR},
      </if>
      <if test="record.code != null">
        code = #{record.code,jdbcType=VARCHAR},
      </if>
      <if test="record.time != null">
        time = #{record.time,jdbcType=DATE},
      </if>
      <if test="record.status != null">
        status = #{record.status,jdbcType=VARCHAR},
      </if>
      <if test="record.result != null">
        result = #{record.result,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.createBy != null">
        create_by = #{record.createBy,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.updateBy != null">
        update_by = #{record.updateBy,jdbcType=VARCHAR},
      </if>
      <if test="record.updateName != null">
        update_name = #{record.updateName,jdbcType=VARCHAR},
      </if>
      <if test="record.updateTime != null">
        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.content != null">
        content = #{record.content,jdbcType=LONGVARCHAR},
      </if>
      <if test="record.filePath != null">
        file_path = #{record.filePath,jdbcType=LONGVARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExampleWithBLOBs" parameterType="map">
    update tk_round_subtask
    set id = #{record.id,jdbcType=VARCHAR},
      task_id = #{record.taskId,jdbcType=VARCHAR},
      obj_id = #{record.objId,jdbcType=VARCHAR},
      dxlx = #{record.dxlx,jdbcType=VARCHAR},
      qylx = #{record.qylx,jdbcType=VARCHAR},
      grid_id = #{record.gridId,jdbcType=VARCHAR},
      obj_name = #{record.objName,jdbcType=VARCHAR},
      code = #{record.code,jdbcType=VARCHAR},
      time = #{record.time,jdbcType=DATE},
      status = #{record.status,jdbcType=VARCHAR},
      result = #{record.result,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      create_by = #{record.createBy,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_by = #{record.updateBy,jdbcType=VARCHAR},
      update_name = #{record.updateName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
      content = #{record.content,jdbcType=LONGVARCHAR},
      file_path = #{record.filePath,jdbcType=LONGVARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tk_round_subtask
    set id = #{record.id,jdbcType=VARCHAR},
      task_id = #{record.taskId,jdbcType=VARCHAR},
      obj_id = #{record.objId,jdbcType=VARCHAR},
      dxlx = #{record.dxlx,jdbcType=VARCHAR},
      qylx = #{record.qylx,jdbcType=VARCHAR},
      grid_id = #{record.gridId,jdbcType=VARCHAR},
      obj_name = #{record.objName,jdbcType=VARCHAR},
      code = #{record.code,jdbcType=VARCHAR},
      time = #{record.time,jdbcType=DATE},
      status = #{record.status,jdbcType=VARCHAR},
      result = #{record.result,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      create_by = #{record.createBy,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      update_by = #{record.updateBy,jdbcType=VARCHAR},
      update_name = #{record.updateName,jdbcType=VARCHAR},
      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.task.TkRoundSubtask">
    update tk_round_subtask
    <set>
      <if test="taskId != null">
        task_id = #{taskId,jdbcType=VARCHAR},
      </if>
      <if test="objId != null">
        obj_id = #{objId,jdbcType=VARCHAR},
      </if>
      <if test="dxlx != null">
        dxlx = #{dxlx,jdbcType=VARCHAR},
      </if>
      <if test="qylx != null">
        qylx = #{qylx,jdbcType=VARCHAR},
      </if>
      <if test="gridId != null">
        grid_id = #{gridId,jdbcType=VARCHAR},
      </if>
      <if test="objName != null">
        obj_name = #{objName,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="time != null">
        time = #{time,jdbcType=DATE},
      </if>
      <if test="status != null">
        status = #{status,jdbcType=VARCHAR},
      </if>
      <if test="result != null">
        result = #{result,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null">
        create_by = #{createBy,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null">
        update_by = #{updateBy,jdbcType=VARCHAR},
      </if>
      <if test="updateName != null">
        update_name = #{updateName,jdbcType=VARCHAR},
      </if>
      <if test="updateTime != null">
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=LONGVARCHAR},
      </if>
      <if test="filePath != null">
        file_path = #{filePath,jdbcType=LONGVARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.ruoyi.system.domain.task.TkRoundSubtask">
    update tk_round_subtask
    set task_id = #{taskId,jdbcType=VARCHAR},
      obj_id = #{objId,jdbcType=VARCHAR},
      dxlx = #{dxlx,jdbcType=VARCHAR},
      qylx = #{qylx,jdbcType=VARCHAR},
      grid_id = #{gridId,jdbcType=VARCHAR},
      obj_name = #{objName,jdbcType=VARCHAR},
      code = #{code,jdbcType=VARCHAR},
      time = #{time,jdbcType=DATE},
      status = #{status,jdbcType=VARCHAR},
      result = #{result,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      create_by = #{createBy,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      update_name = #{updateName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP},
      content = #{content,jdbcType=LONGVARCHAR},
      file_path = #{filePath,jdbcType=LONGVARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.task.TkRoundSubtask">
    update tk_round_subtask
    set task_id = #{taskId,jdbcType=VARCHAR},
      obj_id = #{objId,jdbcType=VARCHAR},
      dxlx = #{dxlx,jdbcType=VARCHAR},
      qylx = #{qylx,jdbcType=VARCHAR},
      grid_id = #{gridId,jdbcType=VARCHAR},
      obj_name = #{objName,jdbcType=VARCHAR},
      code = #{code,jdbcType=VARCHAR},
      time = #{time,jdbcType=DATE},
      status = #{status,jdbcType=VARCHAR},
      result = #{result,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      create_by = #{createBy,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=VARCHAR},
      update_name = #{updateName,jdbcType=VARCHAR},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>