TdBAlipayConfigMapper.xml 14.7 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.order.mapper.TdBAlipayConfigMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBAlipayConfig">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="app_id" jdbcType="VARCHAR" property="appId" />
    <result column="server_url" jdbcType="VARCHAR" property="serverUrl" />
    <result column="private_key" jdbcType="VARCHAR" property="privateKey" />
    <result column="pulic_key" jdbcType="VARCHAR" property="pulicKey" />
    <result column="format" jdbcType="VARCHAR" property="format" />
    <result column="charset" jdbcType="VARCHAR" property="charset" />
    <result column="sign_type" jdbcType="VARCHAR" property="signType" />
    <result column="partenr" jdbcType="VARCHAR" property="partenr" />
    <result column="prodice_code" jdbcType="VARCHAR" property="prodiceCode" />
    <result column="org_id" jdbcType="INTEGER" property="orgId" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_op" jdbcType="INTEGER" property="createOp" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="modify_op" jdbcType="INTEGER" property="modifyOp" />
    <result column="modify_date" jdbcType="TIMESTAMP" property="modifyDate" />
  </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, app_id, server_url, private_key, pulic_key, format, charset, sign_type, partenr, 
    prodice_code, org_id, remark, data_state, create_op, create_date, modify_op, modify_date
  </sql>
  <select id="selectByExample" parameterType="com.zteits.order.domain.TdBAlipayConfigExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from td_b_alipay_config
    <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_b_alipay_config
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_b_alipay_config
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.order.domain.TdBAlipayConfigExample">
    delete from td_b_alipay_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.order.domain.TdBAlipayConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_alipay_config (app_id, server_url, private_key, 
      pulic_key, format, charset, 
      sign_type, partenr, prodice_code, 
      org_id, remark, data_state, 
      create_op, create_date, modify_op, 
      modify_date)
    values (#{appId,jdbcType=VARCHAR}, #{serverUrl,jdbcType=VARCHAR}, #{privateKey,jdbcType=VARCHAR}, 
      #{pulicKey,jdbcType=VARCHAR}, #{format,jdbcType=VARCHAR}, #{charset,jdbcType=VARCHAR}, 
      #{signType,jdbcType=VARCHAR}, #{partenr,jdbcType=VARCHAR}, #{prodiceCode,jdbcType=VARCHAR}, 
      #{orgId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createOp,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=INTEGER}, 
      #{modifyDate,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.order.domain.TdBAlipayConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_alipay_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="appId != null">
        app_id,
      </if>
      <if test="serverUrl != null">
        server_url,
      </if>
      <if test="privateKey != null">
        private_key,
      </if>
      <if test="pulicKey != null">
        pulic_key,
      </if>
      <if test="format != null">
        format,
      </if>
      <if test="charset != null">
        charset,
      </if>
      <if test="signType != null">
        sign_type,
      </if>
      <if test="partenr != null">
        partenr,
      </if>
      <if test="prodiceCode != null">
        prodice_code,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createOp != null">
        create_op,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="modifyOp != null">
        modify_op,
      </if>
      <if test="modifyDate != null">
        modify_date,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="appId != null">
        #{appId,jdbcType=VARCHAR},
      </if>
      <if test="serverUrl != null">
        #{serverUrl,jdbcType=VARCHAR},
      </if>
      <if test="privateKey != null">
        #{privateKey,jdbcType=VARCHAR},
      </if>
      <if test="pulicKey != null">
        #{pulicKey,jdbcType=VARCHAR},
      </if>
      <if test="format != null">
        #{format,jdbcType=VARCHAR},
      </if>
      <if test="charset != null">
        #{charset,jdbcType=VARCHAR},
      </if>
      <if test="signType != null">
        #{signType,jdbcType=VARCHAR},
      </if>
      <if test="partenr != null">
        #{partenr,jdbcType=VARCHAR},
      </if>
      <if test="prodiceCode != null">
        #{prodiceCode,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null">
        #{createOp,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        #{modifyOp,jdbcType=INTEGER},
      </if>
      <if test="modifyDate != null">
        #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.order.domain.TdBAlipayConfigExample" resultType="java.lang.Long">
    select count(*) from td_b_alipay_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_b_alipay_config
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.appId != null">
        app_id = #{record.appId,jdbcType=VARCHAR},
      </if>
      <if test="record.serverUrl != null">
        server_url = #{record.serverUrl,jdbcType=VARCHAR},
      </if>
      <if test="record.privateKey != null">
        private_key = #{record.privateKey,jdbcType=VARCHAR},
      </if>
      <if test="record.pulicKey != null">
        pulic_key = #{record.pulicKey,jdbcType=VARCHAR},
      </if>
      <if test="record.format != null">
        format = #{record.format,jdbcType=VARCHAR},
      </if>
      <if test="record.charset != null">
        charset = #{record.charset,jdbcType=VARCHAR},
      </if>
      <if test="record.signType != null">
        sign_type = #{record.signType,jdbcType=VARCHAR},
      </if>
      <if test="record.partenr != null">
        partenr = #{record.partenr,jdbcType=VARCHAR},
      </if>
      <if test="record.prodiceCode != null">
        prodice_code = #{record.prodiceCode,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=INTEGER},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createOp != null">
        create_op = #{record.createOp,jdbcType=INTEGER},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyOp != null">
        modify_op = #{record.modifyOp,jdbcType=INTEGER},
      </if>
      <if test="record.modifyDate != null">
        modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update td_b_alipay_config
    set id = #{record.id,jdbcType=BIGINT},
      app_id = #{record.appId,jdbcType=VARCHAR},
      server_url = #{record.serverUrl,jdbcType=VARCHAR},
      private_key = #{record.privateKey,jdbcType=VARCHAR},
      pulic_key = #{record.pulicKey,jdbcType=VARCHAR},
      format = #{record.format,jdbcType=VARCHAR},
      charset = #{record.charset,jdbcType=VARCHAR},
      sign_type = #{record.signType,jdbcType=VARCHAR},
      partenr = #{record.partenr,jdbcType=VARCHAR},
      prodice_code = #{record.prodiceCode,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=INTEGER},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_op = #{record.createOp,jdbcType=INTEGER},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      modify_op = #{record.modifyOp,jdbcType=INTEGER},
      modify_date = #{record.modifyDate,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.order.domain.TdBAlipayConfig">
    update td_b_alipay_config
    <set>
      <if test="appId != null">
        app_id = #{appId,jdbcType=VARCHAR},
      </if>
      <if test="serverUrl != null">
        server_url = #{serverUrl,jdbcType=VARCHAR},
      </if>
      <if test="privateKey != null">
        private_key = #{privateKey,jdbcType=VARCHAR},
      </if>
      <if test="pulicKey != null">
        pulic_key = #{pulicKey,jdbcType=VARCHAR},
      </if>
      <if test="format != null">
        format = #{format,jdbcType=VARCHAR},
      </if>
      <if test="charset != null">
        charset = #{charset,jdbcType=VARCHAR},
      </if>
      <if test="signType != null">
        sign_type = #{signType,jdbcType=VARCHAR},
      </if>
      <if test="partenr != null">
        partenr = #{partenr,jdbcType=VARCHAR},
      </if>
      <if test="prodiceCode != null">
        prodice_code = #{prodiceCode,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createOp != null">
        create_op = #{createOp,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyOp != null">
        modify_op = #{modifyOp,jdbcType=INTEGER},
      </if>
      <if test="modifyDate != null">
        modify_date = #{modifyDate,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.order.domain.TdBAlipayConfig">
    update td_b_alipay_config
    set app_id = #{appId,jdbcType=VARCHAR},
      server_url = #{serverUrl,jdbcType=VARCHAR},
      private_key = #{privateKey,jdbcType=VARCHAR},
      pulic_key = #{pulicKey,jdbcType=VARCHAR},
      format = #{format,jdbcType=VARCHAR},
      charset = #{charset,jdbcType=VARCHAR},
      sign_type = #{signType,jdbcType=VARCHAR},
      partenr = #{partenr,jdbcType=VARCHAR},
      prodice_code = #{prodiceCode,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_op = #{createOp,jdbcType=INTEGER},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      modify_op = #{modifyOp,jdbcType=INTEGER},
      modify_date = #{modifyDate,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>