TdCThirdAuthorizationPushMapper.xml 14.6 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.zteits.pay.mapper.TdCThirdAuthorizationPushMapper">
  <resultMap id="BaseResultMap" type="com.zteits.pay.domain.TdCThirdAuthorizationPush">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="push_id" jdbcType="VARCHAR" property="pushId" />
    <result column="app_id" jdbcType="VARCHAR" property="appId" />
    <result column="pub_key" jdbcType="VARCHAR" property="pubKey" />
    <result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
    <result column="source_type" jdbcType="INTEGER" property="sourceType" />
    <result column="push_rule_type" jdbcType="INTEGER" property="pushRuleType" />
    <result column="push_rule" jdbcType="VARCHAR" property="pushRule" />
    <result column="push_ip_url" jdbcType="VARCHAR" property="pushIpUrl" />
    <result column="description" jdbcType="VARCHAR" property="description" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
  </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, push_id, app_id, pub_key, secret_key, source_type, push_rule_type, push_rule, 
    push_ip_url, description, data_state, create_empid, create_date, modfiy_empid, modify_date, 
    org_id
  </sql>
  <select id="selectByExample" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPushExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    'true' as QUERYID,
    <include refid="Base_Column_List" />
    from td_c_third_authorization_push
    <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.Long" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from td_c_third_authorization_push
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_c_third_authorization_push
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPushExample">
    delete from td_c_third_authorization_push
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPush">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_third_authorization_push (push_id, app_id, pub_key, 
      secret_key, source_type, push_rule_type, 
      push_rule, push_ip_url, description, 
      data_state, create_empid, create_date, 
      modfiy_empid, modify_date, org_id
      )
    values (#{pushId,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{pubKey,jdbcType=VARCHAR}, 
      #{secretKey,jdbcType=VARCHAR}, #{sourceType,jdbcType=INTEGER}, #{pushRuleType,jdbcType=INTEGER}, 
      #{pushRule,jdbcType=VARCHAR}, #{pushIpUrl,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{createEmpid,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{modfiyEmpid,jdbcType=VARCHAR}, #{modifyDate,jdbcType=TIMESTAMP}, #{orgId,jdbcType=BIGINT}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPush">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_c_third_authorization_push
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="pushId != null">
        push_id,
      </if>
      <if test="appId != null">
        app_id,
      </if>
      <if test="pubKey != null">
        pub_key,
      </if>
      <if test="secretKey != null">
        secret_key,
      </if>
      <if test="sourceType != null">
        source_type,
      </if>
      <if test="pushRuleType != null">
        push_rule_type,
      </if>
      <if test="pushRule != null">
        push_rule,
      </if>
      <if test="pushIpUrl != null">
        push_ip_url,
      </if>
      <if test="description != null">
        description,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpid != null">
        create_empid,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modfiyEmpid != null">
        modfiy_empid,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="pushId != null">
        #{pushId,jdbcType=VARCHAR},
      </if>
      <if test="appId != null">
        #{appId,jdbcType=VARCHAR},
      </if>
      <if test="pubKey != null">
        #{pubKey,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="sourceType != null">
        #{sourceType,jdbcType=INTEGER},
      </if>
      <if test="pushRuleType != null">
        #{pushRuleType,jdbcType=INTEGER},
      </if>
      <if test="pushRule != null">
        #{pushRule,jdbcType=VARCHAR},
      </if>
      <if test="pushIpUrl != null">
        #{pushIpUrl,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        #{description,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null">
        #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPushExample" resultType="java.lang.Long">
    select count(*) from td_c_third_authorization_push
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_c_third_authorization_push
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.pushId != null">
        push_id = #{record.pushId,jdbcType=VARCHAR},
      </if>
      <if test="record.appId != null">
        app_id = #{record.appId,jdbcType=VARCHAR},
      </if>
      <if test="record.pubKey != null">
        pub_key = #{record.pubKey,jdbcType=VARCHAR},
      </if>
      <if test="record.secretKey != null">
        secret_key = #{record.secretKey,jdbcType=VARCHAR},
      </if>
      <if test="record.sourceType != null">
        source_type = #{record.sourceType,jdbcType=INTEGER},
      </if>
      <if test="record.pushRuleType != null">
        push_rule_type = #{record.pushRuleType,jdbcType=INTEGER},
      </if>
      <if test="record.pushRule != null">
        push_rule = #{record.pushRule,jdbcType=VARCHAR},
      </if>
      <if test="record.pushIpUrl != null">
        push_ip_url = #{record.pushIpUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.description != null">
        description = #{record.description,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createEmpid != null">
        create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modfiyEmpid != null">
        modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyDate != null">
        modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update td_c_third_authorization_push
    set id = #{record.id,jdbcType=BIGINT},
      push_id = #{record.pushId,jdbcType=VARCHAR},
      app_id = #{record.appId,jdbcType=VARCHAR},
      pub_key = #{record.pubKey,jdbcType=VARCHAR},
      secret_key = #{record.secretKey,jdbcType=VARCHAR},
      source_type = #{record.sourceType,jdbcType=INTEGER},
      push_rule_type = #{record.pushRuleType,jdbcType=INTEGER},
      push_rule = #{record.pushRule,jdbcType=VARCHAR},
      push_ip_url = #{record.pushIpUrl,jdbcType=VARCHAR},
      description = #{record.description,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_empid = #{record.createEmpid,jdbcType=VARCHAR},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{record.modfiyEmpid,jdbcType=VARCHAR},
      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      org_id = #{record.orgId,jdbcType=BIGINT}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPush">
    update td_c_third_authorization_push
    <set>
      <if test="pushId != null">
        push_id = #{pushId,jdbcType=VARCHAR},
      </if>
      <if test="appId != null">
        app_id = #{appId,jdbcType=VARCHAR},
      </if>
      <if test="pubKey != null">
        pub_key = #{pubKey,jdbcType=VARCHAR},
      </if>
      <if test="secretKey != null">
        secret_key = #{secretKey,jdbcType=VARCHAR},
      </if>
      <if test="sourceType != null">
        source_type = #{sourceType,jdbcType=INTEGER},
      </if>
      <if test="pushRuleType != null">
        push_rule_type = #{pushRuleType,jdbcType=INTEGER},
      </if>
      <if test="pushRule != null">
        push_rule = #{pushRule,jdbcType=VARCHAR},
      </if>
      <if test="pushIpUrl != null">
        push_ip_url = #{pushIpUrl,jdbcType=VARCHAR},
      </if>
      <if test="description != null">
        description = #{description,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpid != null">
        create_empid = #{createEmpid,jdbcType=VARCHAR},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpid != null">
        modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.pay.domain.TdCThirdAuthorizationPush">
    update td_c_third_authorization_push
    set push_id = #{pushId,jdbcType=VARCHAR},
      app_id = #{appId,jdbcType=VARCHAR},
      pub_key = #{pubKey,jdbcType=VARCHAR},
      secret_key = #{secretKey,jdbcType=VARCHAR},
      source_type = #{sourceType,jdbcType=INTEGER},
      push_rule_type = #{pushRuleType,jdbcType=INTEGER},
      push_rule = #{pushRule,jdbcType=VARCHAR},
      push_ip_url = #{pushIpUrl,jdbcType=VARCHAR},
      description = #{description,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_empid = #{createEmpid,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modfiy_empid = #{modfiyEmpid,jdbcType=VARCHAR},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      org_id = #{orgId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>