<?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.TkCommonTextMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.task.TkCommonText">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="pz_key" jdbcType="VARCHAR" property="pzKey" />
    <result column="pa_name" jdbcType="VARCHAR" property="paName" />
    <result column="pz_text" jdbcType="VARCHAR" property="pzText" />
    <result column="wgCode" jdbcType="VARCHAR" property="wgcode" />
    <result column="yl1" jdbcType="VARCHAR" property="yl1" />
    <result column="yl2" jdbcType="VARCHAR" property="yl2" />
    <result column="yl3" jdbcType="VARCHAR" property="yl3" />
    <result column="yl4" jdbcType="VARCHAR" property="yl4" />
    <result column="yl5" jdbcType="VARCHAR" property="yl5" />
    <result column="yl6" jdbcType="VARCHAR" property="yl6" />
    <result column="yl7" jdbcType="VARCHAR" property="yl7" />
  </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, pz_key, pa_name, pz_text, wgCode, yl1, yl2, yl3, yl4, yl5, yl6, yl7
  </sql>
  <select id="selectByExample" parameterType="com.ruoyi.system.domain.task.TkCommonTextExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tk_common_text
    <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_common_text
    where id = #{id,jdbcType=VARCHAR}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
    delete from tk_common_text
    where id = #{id,jdbcType=VARCHAR}
  </delete>
  <delete id="deleteByExample" parameterType="com.ruoyi.system.domain.task.TkCommonTextExample">
    delete from tk_common_text
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.ruoyi.system.domain.task.TkCommonText">
    insert into tk_common_text (id, pz_key, pa_name, 
      pz_text, wgCode, yl1, 
      yl2, yl3, yl4, yl5, 
       yl6, yl7)
    values (#{id,jdbcType=VARCHAR}, #{pzKey,jdbcType=VARCHAR}, #{paName,jdbcType=VARCHAR}, 
      #{pzText,jdbcType=VARCHAR}, #{wgcode,jdbcType=VARCHAR}, #{yl1,jdbcType=VARCHAR}, 
      #{yl2,jdbcType=VARCHAR}, #{yl3,jdbcType=VARCHAR}, #{yl4,jdbcType=VARCHAR}, #{yl5,jdbcType=VARCHAR}, 
    #{yl6,jdbcType=VARCHAR}, #{yl7,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.ruoyi.system.domain.task.TkCommonText">
    insert into tk_common_text
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="pzKey != null">
        pz_key,
      </if>
      <if test="paName != null">
        pa_name,
      </if>
      <if test="pzText != null">
        pz_text,
      </if>
      <if test="wgcode != null">
        wgCode,
      </if>
      <if test="yl1 != null">
        yl1,
      </if>
      <if test="yl2 != null">
        yl2,
      </if>
      <if test="yl3 != null">
        yl3,
      </if>
      <if test="yl4 != null">
        yl4,
      </if>
      <if test="yl5 != null">
        yl5,
      </if>
      <if test="yl6 != null">
        yl6,
      </if>
      <if test="yl7 != null">
        yl7,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=VARCHAR},
      </if>
      <if test="pzKey != null">
        #{pzKey,jdbcType=VARCHAR},
      </if>
      <if test="paName != null">
        #{paName,jdbcType=VARCHAR},
      </if>
      <if test="pzText != null">
        #{pzText,jdbcType=VARCHAR},
      </if>
      <if test="wgcode != null">
        #{wgcode,jdbcType=VARCHAR},
      </if>
      <if test="yl1 != null">
        #{yl1,jdbcType=VARCHAR},
      </if>
      <if test="yl2 != null">
        #{yl2,jdbcType=VARCHAR},
      </if>
      <if test="yl3 != null">
        #{yl3,jdbcType=VARCHAR},
      </if>
      <if test="yl4 != null">
        #{yl4,jdbcType=VARCHAR},
      </if>
      <if test="yl5 != null">
        #{yl5,jdbcType=VARCHAR},
      </if>
      <if test="yl6 != null">
        #{yl6,jdbcType=VARCHAR},
      </if>
      <if test="yl7 != null">
        #{yl7,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.ruoyi.system.domain.task.TkCommonTextExample" resultType="java.lang.Long">
    select count(*) from tk_common_text
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tk_common_text
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=VARCHAR},
      </if>
      <if test="record.pzKey != null">
        pz_key = #{record.pzKey,jdbcType=VARCHAR},
      </if>
      <if test="record.paName != null">
        pa_name = #{record.paName,jdbcType=VARCHAR},
      </if>
      <if test="record.pzText != null">
        pz_text = #{record.pzText,jdbcType=VARCHAR},
      </if>
      <if test="record.wgcode != null">
        wgCode = #{record.wgcode,jdbcType=VARCHAR},
      </if>
      <if test="record.yl1 != null">
        yl1 = #{record.yl1,jdbcType=VARCHAR},
      </if>
      <if test="record.yl2 != null">
        yl2 = #{record.yl2,jdbcType=VARCHAR},
      </if>
      <if test="record.yl3 != null">
        yl3 = #{record.yl3,jdbcType=VARCHAR},
      </if>
      <if test="record.yl4 != null">
        yl4 = #{record.yl4,jdbcType=VARCHAR},
      </if>
      <if test="record.yl5 != null">
        yl5 = #{record.yl5,jdbcType=VARCHAR},
      </if>
      <if test="record.yl6 != null">
        yl6 = #{record.yl6,jdbcType=VARCHAR},
      </if>
      <if test="record.yl7 != null">
        yl7 = #{record.yl7,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tk_common_text
    set id = #{record.id,jdbcType=VARCHAR},
      pz_key = #{record.pzKey,jdbcType=VARCHAR},
      pa_name = #{record.paName,jdbcType=VARCHAR},
      pz_text = #{record.pzText,jdbcType=VARCHAR},
      wgCode = #{record.wgcode,jdbcType=VARCHAR},
      yl1 = #{record.yl1,jdbcType=VARCHAR},
      yl2 = #{record.yl2,jdbcType=VARCHAR},
      yl3 = #{record.yl3,jdbcType=VARCHAR},
      yl4 = #{record.yl4,jdbcType=VARCHAR},
      yl5 = #{record.yl5,jdbcType=VARCHAR},
      yl6 = #{record.yl6,jdbcType=VARCHAR},
      yl7 = #{record.yl7,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.system.domain.task.TkCommonText">
    update tk_common_text
    <set>
      <if test="pzKey != null">
        pz_key = #{pzKey,jdbcType=VARCHAR},
      </if>
      <if test="paName != null">
        pa_name = #{paName,jdbcType=VARCHAR},
      </if>
      <if test="pzText != null">
        pz_text = #{pzText,jdbcType=VARCHAR},
      </if>
      <if test="wgcode != null">
        wgCode = #{wgcode,jdbcType=VARCHAR},
      </if>
      <if test="yl1 != null">
        yl1 = #{yl1,jdbcType=VARCHAR},
      </if>
      <if test="yl2 != null">
        yl2 = #{yl2,jdbcType=VARCHAR},
      </if>
      <if test="yl3 != null">
        yl3 = #{yl3,jdbcType=VARCHAR},
      </if>
      <if test="yl4 != null">
        yl4 = #{yl4,jdbcType=VARCHAR},
      </if>
      <if test="yl5 != null">
        yl5 = #{yl5,jdbcType=VARCHAR},
      </if>
      <if test="yl6 != null">
        yl6 = #{yl6,jdbcType=VARCHAR},
      </if>
      <if test="yl7 != null">
        yl7 = #{yl7,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.ruoyi.system.domain.task.TkCommonText">
    update tk_common_text
    set pz_key = #{pzKey,jdbcType=VARCHAR},
      pa_name = #{paName,jdbcType=VARCHAR},
      pz_text = #{pzText,jdbcType=VARCHAR},
      wgCode = #{wgcode,jdbcType=VARCHAR},
      yl1 = #{yl1,jdbcType=VARCHAR},
      yl2 = #{yl2,jdbcType=VARCHAR},
      yl3 = #{yl3,jdbcType=VARCHAR},
      yl4 = #{yl4,jdbcType=VARCHAR},
      yl5 = #{yl5,jdbcType=VARCHAR},
      yl6 = #{yl6,jdbcType=VARCHAR},
      yl7 = #{yl7,jdbcType=VARCHAR}
    where id = #{id,jdbcType=VARCHAR}
  </update>
</mapper>