TdBWxConfigMapper.xml 14.4 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.TdBWxConfigMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBWxConfig">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="appid" jdbcType="VARCHAR" property="appid" />
    <result column="app_secret" jdbcType="VARCHAR" property="appSecret" />
    <result column="is_encrypt_message" jdbcType="INTEGER" property="isEncryptMessage" />
    <result column="encoding_aes_key" jdbcType="VARCHAR" property="encodingAesKey" />
    <result column="mchid" jdbcType="INTEGER" property="mchid" />
    <result column="pay_api_secret" jdbcType="VARCHAR" property="payApiSecret" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="is_pay_noCredit" jdbcType="INTEGER" property="isPayNocredit" />
    <result column="cert_name" jdbcType="VARCHAR" property="certName" />
    <result column="org_id" jdbcType="INTEGER" property="orgId" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <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, appid, app_secret, is_encrypt_message, encoding_aes_key, mchid, pay_api_secret, 
    data_state, is_pay_noCredit, cert_name, org_id, remark, create_op, create_date, modify_op, 
    modify_date
  </sql>
  <select id="selectByExample" parameterType="com.zteits.order.domain.TdBWxConfigExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from td_b_wx_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_wx_config
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from td_b_wx_config
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.order.domain.TdBWxConfigExample">
    delete from td_b_wx_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.order.domain.TdBWxConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_wx_config (appid, app_secret, is_encrypt_message, 
      encoding_aes_key, mchid, pay_api_secret, 
      data_state, is_pay_noCredit, cert_name, 
      org_id, remark, create_op, 
      create_date, modify_op, modify_date
      )
    values (#{appid,jdbcType=VARCHAR}, #{appSecret,jdbcType=VARCHAR}, #{isEncryptMessage,jdbcType=INTEGER}, 
      #{encodingAesKey,jdbcType=VARCHAR}, #{mchid,jdbcType=INTEGER}, #{payApiSecret,jdbcType=VARCHAR}, 
      #{dataState,jdbcType=INTEGER}, #{isPayNocredit,jdbcType=INTEGER}, #{certName,jdbcType=VARCHAR}, 
      #{orgId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{createOp,jdbcType=INTEGER}, 
      #{createDate,jdbcType=TIMESTAMP}, #{modifyOp,jdbcType=INTEGER}, #{modifyDate,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.order.domain.TdBWxConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into td_b_wx_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="appid != null">
        appid,
      </if>
      <if test="appSecret != null">
        app_secret,
      </if>
      <if test="isEncryptMessage != null">
        is_encrypt_message,
      </if>
      <if test="encodingAesKey != null">
        encoding_aes_key,
      </if>
      <if test="mchid != null">
        mchid,
      </if>
      <if test="payApiSecret != null">
        pay_api_secret,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="isPayNocredit != null">
        is_pay_noCredit,
      </if>
      <if test="certName != null">
        cert_name,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="remark != null">
        remark,
      </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="appSecret != null">
        #{appSecret,jdbcType=VARCHAR},
      </if>
      <if test="isEncryptMessage != null">
        #{isEncryptMessage,jdbcType=INTEGER},
      </if>
      <if test="encodingAesKey != null">
        #{encodingAesKey,jdbcType=VARCHAR},
      </if>
      <if test="mchid != null">
        #{mchid,jdbcType=INTEGER},
      </if>
      <if test="payApiSecret != null">
        #{payApiSecret,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="isPayNocredit != null">
        #{isPayNocredit,jdbcType=INTEGER},
      </if>
      <if test="certName != null">
        #{certName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </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.TdBWxConfigExample" resultType="java.lang.Long">
    select count(*) from td_b_wx_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_b_wx_config
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.appid != null">
        appid = #{record.appid,jdbcType=VARCHAR},
      </if>
      <if test="record.appSecret != null">
        app_secret = #{record.appSecret,jdbcType=VARCHAR},
      </if>
      <if test="record.isEncryptMessage != null">
        is_encrypt_message = #{record.isEncryptMessage,jdbcType=INTEGER},
      </if>
      <if test="record.encodingAesKey != null">
        encoding_aes_key = #{record.encodingAesKey,jdbcType=VARCHAR},
      </if>
      <if test="record.mchid != null">
        mchid = #{record.mchid,jdbcType=INTEGER},
      </if>
      <if test="record.payApiSecret != null">
        pay_api_secret = #{record.payApiSecret,jdbcType=VARCHAR},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.isPayNocredit != null">
        is_pay_noCredit = #{record.isPayNocredit,jdbcType=INTEGER},
      </if>
      <if test="record.certName != null">
        cert_name = #{record.certName,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.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_wx_config
    set id = #{record.id,jdbcType=BIGINT},
      appid = #{record.appid,jdbcType=VARCHAR},
      app_secret = #{record.appSecret,jdbcType=VARCHAR},
      is_encrypt_message = #{record.isEncryptMessage,jdbcType=INTEGER},
      encoding_aes_key = #{record.encodingAesKey,jdbcType=VARCHAR},
      mchid = #{record.mchid,jdbcType=INTEGER},
      pay_api_secret = #{record.payApiSecret,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      is_pay_noCredit = #{record.isPayNocredit,jdbcType=INTEGER},
      cert_name = #{record.certName,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=INTEGER},
      remark = #{record.remark,jdbcType=VARCHAR},
      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.TdBWxConfig">
    update td_b_wx_config
    <set>
      <if test="appid != null">
        appid = #{appid,jdbcType=VARCHAR},
      </if>
      <if test="appSecret != null">
        app_secret = #{appSecret,jdbcType=VARCHAR},
      </if>
      <if test="isEncryptMessage != null">
        is_encrypt_message = #{isEncryptMessage,jdbcType=INTEGER},
      </if>
      <if test="encodingAesKey != null">
        encoding_aes_key = #{encodingAesKey,jdbcType=VARCHAR},
      </if>
      <if test="mchid != null">
        mchid = #{mchid,jdbcType=INTEGER},
      </if>
      <if test="payApiSecret != null">
        pay_api_secret = #{payApiSecret,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="isPayNocredit != null">
        is_pay_noCredit = #{isPayNocredit,jdbcType=INTEGER},
      </if>
      <if test="certName != null">
        cert_name = #{certName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </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.TdBWxConfig">
    update td_b_wx_config
    set appid = #{appid,jdbcType=VARCHAR},
      app_secret = #{appSecret,jdbcType=VARCHAR},
      is_encrypt_message = #{isEncryptMessage,jdbcType=INTEGER},
      encoding_aes_key = #{encodingAesKey,jdbcType=VARCHAR},
      mchid = #{mchid,jdbcType=INTEGER},
      pay_api_secret = #{payApiSecret,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      is_pay_noCredit = #{isPayNocredit,jdbcType=INTEGER},
      cert_name = #{certName,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      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>