<?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.unis.base.server.dao.TySltpxxDao" >
  <resultMap id="BaseResultMap" type="com.unis.base.server.entity.TySltpxxDO" >
    <id column="TPID" property="tpid" jdbcType="VARCHAR" />
    <result column="CJPSSJ" property="cjpssj" jdbcType="TIMESTAMP" />
    <result column="CJSCSJ" property="cjscsj" jdbcType="TIMESTAMP" />
    <result column="SSKDDM" property="sskddm" jdbcType="VARCHAR" />
    <result column="SSKDMC" property="sskdmc" jdbcType="VARCHAR" />
    <result column="SSQYDM" property="ssqydm" jdbcType="VARCHAR" />
    <result column="SSYQMC" property="ssyqmc" jdbcType="VARCHAR" />
    <result column="TPWJMC" property="tpwjmc" jdbcType="VARCHAR" />
    <result column="TPMS" property="tpms" jdbcType="VARCHAR" />
    <result column="TPLX" property="tplx" jdbcType="VARCHAR" />
    <result column="TPSJL" property="tpsjl" jdbcType="VARCHAR" />
    <result column="STATUS" property="status" jdbcType="DECIMAL" />
    <result column="CREATOR" property="creator" jdbcType="VARCHAR" />
    <result column="CREATOR_CODE" property="creatorCode" jdbcType="VARCHAR" />
    <result column="CREATE_DATE" property="createDate" jdbcType="TIMESTAMP" />
    <result column="REFRESHER" property="refresher" jdbcType="VARCHAR" />
    <result column="REFRESHER_CODE" property="refresherCode" jdbcType="VARCHAR" />
    <result column="REFRESH_TIME" property="refreshTime" jdbcType="TIMESTAMP" />
    <result column="REMARK" property="remark" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
            <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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    TPID, CJPSSJ, CJSCSJ, SSKDDM, SSKDMC, SSQYDM, SSYQMC, TPWJMC, TPMS, TPLX, TPSJL, 
    STATUS, CREATOR, CREATOR_CODE, CREATE_DATE, REFRESHER, REFRESHER_CODE, REFRESH_TIME, 
    REMARK
  </sql>
  <!-- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.unis.base.server.example.TySltpxxExample" >
    select
    <if test="distinct" >
      distinct
    </if>
    <include refid="Base_Column_List" />
    from TY_SLTPXX
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
    <if test="orderByClause != null" >
      order by ${orderByClause}
    </if>
  </select> -->
  <!-- <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from TY_SLTPXX
    where TPID = #{tpid,jdbcType=VARCHAR}
  </select> -->
  <select id="selectByKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
    select 
    <include refid="Base_Column_List" />
    from TY_SLTPXX
    where TPID = #{tpid,jdbcType=VARCHAR}
  </select>
  <!-- <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
    delete from TY_SLTPXX
    where TPID = #{tpid,jdbcType=VARCHAR}
  </delete> -->
  <!-- <delete id="deleteByExample" parameterType="com.unis.base.server.example.TySltpxxExample" >
    delete from TY_SLTPXX
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </delete> -->
  <insert id="insert" parameterType="com.unis.base.server.entity.TySltpxxDO" >
    insert into TY_SLTPXX (TPID, CJPSSJ, CJSCSJ, 
      SSKDDM, SSKDMC, SSQYDM, 
      SSYQMC, TPWJMC, TPMS, 
      TPLX, TPSJL, STATUS, 
      CREATOR, CREATOR_CODE, CREATE_DATE, 
      REFRESHER, REFRESHER_CODE, REFRESH_TIME, 
      REMARK)
    values (#{tpid,jdbcType=VARCHAR}, #{cjpssj,jdbcType=TIMESTAMP}, #{cjscsj,jdbcType=TIMESTAMP}, 
      #{sskddm,jdbcType=VARCHAR}, #{sskdmc,jdbcType=VARCHAR}, #{ssqydm,jdbcType=VARCHAR}, 
      #{ssyqmc,jdbcType=VARCHAR}, #{tpwjmc,jdbcType=VARCHAR}, #{tpms,jdbcType=VARCHAR}, 
      #{tplx,jdbcType=VARCHAR}, #{tpsjl,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL}, 
      #{creator,jdbcType=VARCHAR}, #{creatorCode,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{refresher,jdbcType=VARCHAR}, #{refresherCode,jdbcType=VARCHAR}, #{refreshTime,jdbcType=TIMESTAMP}, 
      #{remark,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.unis.base.server.entity.TySltpxxDO" >
    insert into TY_SLTPXX
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="tpid != null" >
        TPID,
      </if>
      <if test="cjpssj != null" >
        CJPSSJ,
      </if>
      <if test="cjscsj != null" >
        CJSCSJ,
      </if>
      <if test="sskddm != null" >
        SSKDDM,
      </if>
      <if test="sskdmc != null" >
        SSKDMC,
      </if>
      <if test="ssqydm != null" >
        SSQYDM,
      </if>
      <if test="ssyqmc != null" >
        SSYQMC,
      </if>
      <if test="tpwjmc != null" >
        TPWJMC,
      </if>
      <if test="tpms != null" >
        TPMS,
      </if>
      <if test="tplx != null" >
        TPLX,
      </if>
      <if test="tpsjl != null" >
        TPSJL,
      </if>
      <if test="status != null" >
        STATUS,
      </if>
      <if test="creator != null" >
        CREATOR,
      </if>
      <if test="creatorCode != null" >
        CREATOR_CODE,
      </if>
      <if test="createDate != null" >
        CREATE_DATE,
      </if>
      <if test="refresher != null" >
        REFRESHER,
      </if>
      <if test="refresherCode != null" >
        REFRESHER_CODE,
      </if>
      <if test="refreshTime != null" >
        REFRESH_TIME,
      </if>
      <if test="remark != null" >
        REMARK,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="tpid != null" >
        #{tpid,jdbcType=VARCHAR},
      </if>
      <if test="cjpssj != null" >
        #{cjpssj,jdbcType=TIMESTAMP},
      </if>
      <if test="cjscsj != null" >
        #{cjscsj,jdbcType=TIMESTAMP},
      </if>
      <if test="sskddm != null" >
        #{sskddm,jdbcType=VARCHAR},
      </if>
      <if test="sskdmc != null" >
        #{sskdmc,jdbcType=VARCHAR},
      </if>
      <if test="ssqydm != null" >
        #{ssqydm,jdbcType=VARCHAR},
      </if>
      <if test="ssyqmc != null" >
        #{ssyqmc,jdbcType=VARCHAR},
      </if>
      <if test="tpwjmc != null" >
        #{tpwjmc,jdbcType=VARCHAR},
      </if>
      <if test="tpms != null" >
        #{tpms,jdbcType=VARCHAR},
      </if>
      <if test="tplx != null" >
        #{tplx,jdbcType=VARCHAR},
      </if>
      <if test="tpsjl != null" >
        #{tpsjl,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=DECIMAL},
      </if>
      <if test="creator != null" >
        #{creator,jdbcType=VARCHAR},
      </if>
      <if test="creatorCode != null" >
        #{creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="refresher != null" >
        #{refresher,jdbcType=VARCHAR},
      </if>
      <if test="refresherCode != null" >
        #{refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="refreshTime != null" >
        #{refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.unis.base.server.example.TySltpxxExample" resultType="java.lang.Integer" >
    select count(*) from TY_SLTPXX
    <if test="_parameter != null" >
      <include refid="Example_Where_Clause" />
    </if>
  </select>

  <select id="selectAlls" resultMap="BaseResultMap">
    select * from TY_SLTPXX order by refresh_time desc
  </select>

  <!-- <update id="updateByExampleSelective" parameterType="map" >
    update TY_SLTPXX
    <set >
      <if test="record.tpid != null" >
        TPID = #{record.tpid,jdbcType=VARCHAR},
      </if>
      <if test="record.cjpssj != null" >
        CJPSSJ = #{record.cjpssj,jdbcType=TIMESTAMP},
      </if>
      <if test="record.cjscsj != null" >
        CJSCSJ = #{record.cjscsj,jdbcType=TIMESTAMP},
      </if>
      <if test="record.sskddm != null" >
        SSKDDM = #{record.sskddm,jdbcType=VARCHAR},
      </if>
      <if test="record.sskdmc != null" >
        SSKDMC = #{record.sskdmc,jdbcType=VARCHAR},
      </if>
      <if test="record.ssqydm != null" >
        SSQYDM = #{record.ssqydm,jdbcType=VARCHAR},
      </if>
      <if test="record.ssyqmc != null" >
        SSYQMC = #{record.ssyqmc,jdbcType=VARCHAR},
      </if>
      <if test="record.tpwjmc != null" >
        TPWJMC = #{record.tpwjmc,jdbcType=VARCHAR},
      </if>
      <if test="record.tpms != null" >
        TPMS = #{record.tpms,jdbcType=VARCHAR},
      </if>
      <if test="record.tplx != null" >
        TPLX = #{record.tplx,jdbcType=VARCHAR},
      </if>
      <if test="record.tpsjl != null" >
        TPSJL = #{record.tpsjl,jdbcType=VARCHAR},
      </if>
      <if test="record.status != null" >
        STATUS = #{record.status,jdbcType=DECIMAL},
      </if>
      <if test="record.creator != null" >
        CREATOR = #{record.creator,jdbcType=VARCHAR},
      </if>
      <if test="record.creatorCode != null" >
        CREATOR_CODE = #{record.creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null" >
        CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.refresher != null" >
        REFRESHER = #{record.refresher,jdbcType=VARCHAR},
      </if>
      <if test="record.refresherCode != null" >
        REFRESHER_CODE = #{record.refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="record.refreshTime != null" >
        REFRESH_TIME = #{record.refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.remark != null" >
        REMARK = #{record.remark,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update> -->
  <!-- <update id="updateByExample" parameterType="map" >
    update TY_SLTPXX
    set TPID = #{record.tpid,jdbcType=VARCHAR},
      CJPSSJ = #{record.cjpssj,jdbcType=TIMESTAMP},
      CJSCSJ = #{record.cjscsj,jdbcType=TIMESTAMP},
      SSKDDM = #{record.sskddm,jdbcType=VARCHAR},
      SSKDMC = #{record.sskdmc,jdbcType=VARCHAR},
      SSQYDM = #{record.ssqydm,jdbcType=VARCHAR},
      SSYQMC = #{record.ssyqmc,jdbcType=VARCHAR},
      TPWJMC = #{record.tpwjmc,jdbcType=VARCHAR},
      TPMS = #{record.tpms,jdbcType=VARCHAR},
      TPLX = #{record.tplx,jdbcType=VARCHAR},
      TPSJL = #{record.tpsjl,jdbcType=VARCHAR},
      STATUS = #{record.status,jdbcType=DECIMAL},
      CREATOR = #{record.creator,jdbcType=VARCHAR},
      CREATOR_CODE = #{record.creatorCode,jdbcType=VARCHAR},
      CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
      REFRESHER = #{record.refresher,jdbcType=VARCHAR},
      REFRESHER_CODE = #{record.refresherCode,jdbcType=VARCHAR},
      REFRESH_TIME = #{record.refreshTime,jdbcType=TIMESTAMP},
      REMARK = #{record.remark,jdbcType=VARCHAR}
    <if test="_parameter != null" >
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update> -->
  <!-- <update id="updateByPrimaryKeySelective" parameterType="com.unis.base.server.entity.TySltpxxDO" >
    update TY_SLTPXX
    <set >
      <if test="cjpssj != null" >
        CJPSSJ = #{cjpssj,jdbcType=TIMESTAMP},
      </if>
      <if test="cjscsj != null" >
        CJSCSJ = #{cjscsj,jdbcType=TIMESTAMP},
      </if>
      <if test="sskddm != null" >
        SSKDDM = #{sskddm,jdbcType=VARCHAR},
      </if>
      <if test="sskdmc != null" >
        SSKDMC = #{sskdmc,jdbcType=VARCHAR},
      </if>
      <if test="ssqydm != null" >
        SSQYDM = #{ssqydm,jdbcType=VARCHAR},
      </if>
      <if test="ssyqmc != null" >
        SSYQMC = #{ssyqmc,jdbcType=VARCHAR},
      </if>
      <if test="tpwjmc != null" >
        TPWJMC = #{tpwjmc,jdbcType=VARCHAR},
      </if>
      <if test="tpms != null" >
        TPMS = #{tpms,jdbcType=VARCHAR},
      </if>
      <if test="tplx != null" >
        TPLX = #{tplx,jdbcType=VARCHAR},
      </if>
      <if test="tpsjl != null" >
        TPSJL = #{tpsjl,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        STATUS = #{status,jdbcType=DECIMAL},
      </if>
      <if test="creator != null" >
        CREATOR = #{creator,jdbcType=VARCHAR},
      </if>
      <if test="creatorCode != null" >
        CREATOR_CODE = #{creatorCode,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null" >
        CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="refresher != null" >
        REFRESHER = #{refresher,jdbcType=VARCHAR},
      </if>
      <if test="refresherCode != null" >
        REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
      </if>
      <if test="refreshTime != null" >
        REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null" >
        REMARK = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
    where TPID = #{tpid,jdbcType=VARCHAR}
  </update> -->
  <update id="updateByPrimaryKey" parameterType="com.unis.base.server.entity.TySltpxxDO" >
    update TY_SLTPXX
    set CJPSSJ = #{cjpssj,jdbcType=TIMESTAMP},
      CJSCSJ = #{cjscsj,jdbcType=TIMESTAMP},
      SSKDDM = #{sskddm,jdbcType=VARCHAR},
      SSKDMC = #{sskdmc,jdbcType=VARCHAR},
      SSQYDM = #{ssqydm,jdbcType=VARCHAR},
      SSYQMC = #{ssyqmc,jdbcType=VARCHAR},
      TPWJMC = #{tpwjmc,jdbcType=VARCHAR},
      TPMS = #{tpms,jdbcType=VARCHAR},
      TPLX = #{tplx,jdbcType=VARCHAR},
      TPSJL = #{tpsjl,jdbcType=VARCHAR},
      STATUS = #{status,jdbcType=DECIMAL},
      CREATOR = #{creator,jdbcType=VARCHAR},
      CREATOR_CODE = #{creatorCode,jdbcType=VARCHAR},
      CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
      REFRESHER = #{refresher,jdbcType=VARCHAR},
      REFRESHER_CODE = #{refresherCode,jdbcType=VARCHAR},
      REFRESH_TIME = #{refreshTime,jdbcType=TIMESTAMP},
      REMARK = #{remark,jdbcType=VARCHAR}
    where TPID = #{tpid,jdbcType=VARCHAR}
  </update>
</mapper>