TdBPayAppMapper.xml 13.5 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.TdBPayAppMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.TdBPayApp">
    <id column="pay_app_id" jdbcType="BIGINT" property="payAppId" />
    <result column="pay_app_name" jdbcType="VARCHAR" property="payAppName" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="app_status" jdbcType="INTEGER" property="appStatus" />
    <result column="app_status_remark" jdbcType="VARCHAR" property="appStatusRemark" />
    <result column="app_remark" jdbcType="VARCHAR" property="appRemark" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
    <result column="modify_emp_id" jdbcType="VARCHAR" property="modifyEmpId" />
    <result column="modify_emp_name" jdbcType="VARCHAR" property="modifyEmpName" />
    <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
  </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">
    pay_app_id, pay_app_name, org_id, app_status, app_status_remark, app_remark, remark, 
    data_state, create_emp_id, create_emp_name, create_time, modify_emp_id, modify_emp_name, 
    modify_time
  </sql>
  <select id="selectByExample" parameterType="com.zteits.order.domain.TdBPayAppExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from td_b_pay_app
    <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.Integer" resultMap="BaseResultMap">
    select 
    <include refid="Base_Column_List" />
    from td_b_pay_app
    where pay_app_id = #{payAppId,jdbcType=INTEGER}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
    delete from td_b_pay_app
    where pay_app_id = #{payAppId,jdbcType=INTEGER}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.order.domain.TdBPayAppExample">
    delete from td_b_pay_app
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.order.domain.TdBPayApp">
    insert into td_b_pay_app (pay_app_id, pay_app_name, org_id, 
      app_status, app_status_remark, app_remark, 
      remark, data_state, create_emp_id, 
      create_emp_name, create_time, modify_emp_id, 
      modify_emp_name, modify_time)
    values (#{payAppId,jdbcType=INTEGER}, #{payAppName,jdbcType=VARCHAR}, #{orgId,jdbcType=INTEGER}, 
      #{appStatus,jdbcType=INTEGER}, #{appStatusRemark,jdbcType=VARCHAR}, #{appRemark,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, #{createEmpId,jdbcType=VARCHAR}, 
      #{createEmpName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyEmpId,jdbcType=VARCHAR}, 
      #{modifyEmpName,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.order.domain.TdBPayApp">
    insert into td_b_pay_app
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="payAppId != null">
        pay_app_id,
      </if>
      <if test="payAppName != null">
        pay_app_name,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="appStatus != null">
        app_status,
      </if>
      <if test="appStatusRemark != null">
        app_status_remark,
      </if>
      <if test="appRemark != null">
        app_remark,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createEmpName != null">
        create_emp_name,
      </if>
      <if test="createTime != null">
        create_time,
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id,
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name,
      </if>
      <if test="modifyTime != null">
        modify_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="payAppId != null">
        #{payAppId,jdbcType=INTEGER},
      </if>
      <if test="payAppName != null">
        #{payAppName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=INTEGER},
      </if>
      <if test="appStatus != null">
        #{appStatus,jdbcType=INTEGER},
      </if>
      <if test="appStatusRemark != null">
        #{appStatusRemark,jdbcType=VARCHAR},
      </if>
      <if test="appRemark != null">
        #{appRemark,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null">
        #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.order.domain.TdBPayAppExample" resultType="java.lang.Long">
    select count(*) from td_b_pay_app
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update td_b_pay_app
    <set>
      <if test="record.payAppId != null">
        pay_app_id = #{record.payAppId,jdbcType=INTEGER},
      </if>
      <if test="record.payAppName != null">
        pay_app_name = #{record.payAppName,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=INTEGER},
      </if>
      <if test="record.appStatus != null">
        app_status = #{record.appStatus,jdbcType=INTEGER},
      </if>
      <if test="record.appStatusRemark != null">
        app_status_remark = #{record.appStatusRemark,jdbcType=VARCHAR},
      </if>
      <if test="record.appRemark != null">
        app_remark = #{record.appRemark,jdbcType=VARCHAR},
      </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.createEmpId != null">
        create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.createEmpName != null">
        create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.createTime != null">
        create_time = #{record.createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modifyEmpId != null">
        modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyEmpName != null">
        modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="record.modifyTime != null">
        modify_time = #{record.modifyTime,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_pay_app
    set pay_app_id = #{record.payAppId,jdbcType=INTEGER},
      pay_app_name = #{record.payAppName,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=INTEGER},
      app_status = #{record.appStatus,jdbcType=INTEGER},
      app_status_remark = #{record.appStatusRemark,jdbcType=VARCHAR},
      app_remark = #{record.appRemark,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      create_time = #{record.createTime,jdbcType=TIMESTAMP},
      modify_emp_id = #{record.modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{record.modifyEmpName,jdbcType=VARCHAR},
      modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.order.domain.TdBPayApp">
    update td_b_pay_app
    <set>
      <if test="payAppName != null">
        pay_app_name = #{payAppName,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=INTEGER},
      </if>
      <if test="appStatus != null">
        app_status = #{appStatus,jdbcType=INTEGER},
      </if>
      <if test="appStatusRemark != null">
        app_status_remark = #{appStatusRemark,jdbcType=VARCHAR},
      </if>
      <if test="appRemark != null">
        app_remark = #{appRemark,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createEmpId != null">
        create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="createTime != null">
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="modifyEmpId != null">
        modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modifyEmpName != null">
        modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modifyTime != null">
        modify_time = #{modifyTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where pay_app_id = #{payAppId,jdbcType=INTEGER}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.order.domain.TdBPayApp">
    update td_b_pay_app
    set pay_app_name = #{payAppName,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=INTEGER},
      app_status = #{appStatus,jdbcType=INTEGER},
      app_status_remark = #{appStatusRemark,jdbcType=VARCHAR},
      app_remark = #{appRemark,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      modify_emp_id = #{modifyEmpId,jdbcType=VARCHAR},
      modify_emp_name = #{modifyEmpName,jdbcType=VARCHAR},
      modify_time = #{modifyTime,jdbcType=TIMESTAMP}
    where pay_app_id = #{payAppId,jdbcType=INTEGER}
  </update>
</mapper>