TpPNetworkCardOrgConfigMapper.xml 14.9 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.park.mapper.TpPNetworkCardOrgConfigMapper">
  <resultMap id="BaseResultMap" type="com.zteits.park.domain.TpPNetworkCardOrgConfig">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="operator_type" jdbcType="INTEGER" property="operatorType" />
    <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
    <result column="settle_day" jdbcType="INTEGER" property="settleDay" />
    <result column="user_no" jdbcType="VARCHAR" property="userNo" />
    <result column="user_api_secret" jdbcType="VARCHAR" property="userApiSecret" />
    <result column="auth_value" jdbcType="VARCHAR" property="authValue" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="org_id" jdbcType="BIGINT" property="orgId" />
    <result column="data_state" jdbcType="INTEGER" property="dataState" />
    <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
    <result column="create_emp_id" jdbcType="VARCHAR" property="createEmpId" />
    <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" />
    <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" />
    <result column="modfiy_emp_id" jdbcType="VARCHAR" property="modfiyEmpId" />
    <result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" />
  </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, operator_type, operator_name, settle_day, user_no, user_api_secret, auth_value, 
    remark, org_id, data_state, create_date, create_emp_id, create_emp_name, modfiy_date, 
    modfiy_emp_id, modfiy_emp_name
  </sql>
  <select id="selectByExample" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfigExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from tp_p_network_card_org_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 tp_p_network_card_org_config
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from tp_p_network_card_org_config
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfigExample">
    delete from tp_p_network_card_org_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_network_card_org_config (operator_type, operator_name, settle_day, 
      user_no, user_api_secret, auth_value, 
      remark, org_id, data_state, 
      create_date, create_emp_id, create_emp_name, 
      modfiy_date, modfiy_emp_id, modfiy_emp_name
      )
    values (#{operatorType,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}, #{settleDay,jdbcType=INTEGER}, 
      #{userNo,jdbcType=VARCHAR}, #{userApiSecret,jdbcType=VARCHAR}, #{authValue,jdbcType=VARCHAR}, 
      #{remark,jdbcType=VARCHAR}, #{orgId,jdbcType=BIGINT}, #{dataState,jdbcType=INTEGER}, 
      #{createDate,jdbcType=TIMESTAMP}, #{createEmpId,jdbcType=VARCHAR}, #{createEmpName,jdbcType=VARCHAR}, 
      #{modfiyDate,jdbcType=TIMESTAMP}, #{modfiyEmpId,jdbcType=VARCHAR}, #{modfiyEmpName,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfig">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into tp_p_network_card_org_config
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="operatorType != null">
        operator_type,
      </if>
      <if test="operatorName != null">
        operator_name,
      </if>
      <if test="settleDay != null">
        settle_day,
      </if>
      <if test="userNo != null">
        user_no,
      </if>
      <if test="userApiSecret != null">
        user_api_secret,
      </if>
      <if test="authValue != null">
        auth_value,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
      <if test="dataState != null">
        data_state,
      </if>
      <if test="createDate != null">
        create_date,
      </if>
      <if test="createEmpId != null">
        create_emp_id,
      </if>
      <if test="createEmpName != null">
        create_emp_name,
      </if>
      <if test="modfiyDate != null">
        modfiy_date,
      </if>
      <if test="modfiyEmpId != null">
        modfiy_emp_id,
      </if>
      <if test="modfiyEmpName != null">
        modfiy_emp_name,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="operatorType != null">
        #{operatorType,jdbcType=INTEGER},
      </if>
      <if test="operatorName != null">
        #{operatorName,jdbcType=VARCHAR},
      </if>
      <if test="settleDay != null">
        #{settleDay,jdbcType=INTEGER},
      </if>
      <if test="userNo != null">
        #{userNo,jdbcType=VARCHAR},
      </if>
      <if test="userApiSecret != null">
        #{userApiSecret,jdbcType=VARCHAR},
      </if>
      <if test="authValue != null">
        #{authValue,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="createEmpId != null">
        #{createEmpId,jdbcType=VARCHAR},
      </if>
      <if test="createEmpName != null">
        #{createEmpName,jdbcType=VARCHAR},
      </if>
      <if test="modfiyDate != null">
        #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpId != null">
        #{modfiyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modfiyEmpName != null">
        #{modfiyEmpName,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfigExample" resultType="java.lang.Long">
    select count(*) from tp_p_network_card_org_config
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update tp_p_network_card_org_config
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.operatorType != null">
        operator_type = #{record.operatorType,jdbcType=INTEGER},
      </if>
      <if test="record.operatorName != null">
        operator_name = #{record.operatorName,jdbcType=VARCHAR},
      </if>
      <if test="record.settleDay != null">
        settle_day = #{record.settleDay,jdbcType=INTEGER},
      </if>
      <if test="record.userNo != null">
        user_no = #{record.userNo,jdbcType=VARCHAR},
      </if>
      <if test="record.userApiSecret != null">
        user_api_secret = #{record.userApiSecret,jdbcType=VARCHAR},
      </if>
      <if test="record.authValue != null">
        auth_value = #{record.authValue,jdbcType=VARCHAR},
      </if>
      <if test="record.remark != null">
        remark = #{record.remark,jdbcType=VARCHAR},
      </if>
      <if test="record.orgId != null">
        org_id = #{record.orgId,jdbcType=BIGINT},
      </if>
      <if test="record.dataState != null">
        data_state = #{record.dataState,jdbcType=INTEGER},
      </if>
      <if test="record.createDate != null">
        create_date = #{record.createDate,jdbcType=TIMESTAMP},
      </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.modfiyDate != null">
        modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="record.modfiyEmpId != null">
        modfiy_emp_id = #{record.modfiyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="record.modfiyEmpName != null">
        modfiy_emp_name = #{record.modfiyEmpName,jdbcType=VARCHAR},
      </if>
    </set>
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByExample" parameterType="map">
    update tp_p_network_card_org_config
    set id = #{record.id,jdbcType=BIGINT},
      operator_type = #{record.operatorType,jdbcType=INTEGER},
      operator_name = #{record.operatorName,jdbcType=VARCHAR},
      settle_day = #{record.settleDay,jdbcType=INTEGER},
      user_no = #{record.userNo,jdbcType=VARCHAR},
      user_api_secret = #{record.userApiSecret,jdbcType=VARCHAR},
      auth_value = #{record.authValue,jdbcType=VARCHAR},
      remark = #{record.remark,jdbcType=VARCHAR},
      org_id = #{record.orgId,jdbcType=BIGINT},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_date = #{record.createDate,jdbcType=TIMESTAMP},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      modfiy_date = #{record.modfiyDate,jdbcType=TIMESTAMP},
      modfiy_emp_id = #{record.modfiyEmpId,jdbcType=VARCHAR},
      modfiy_emp_name = #{record.modfiyEmpName,jdbcType=VARCHAR}
    <if test="_parameter != null">
      <include refid="Update_By_Example_Where_Clause" />
    </if>
  </update>
  <update id="updateByPrimaryKeySelective" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfig">
    update tp_p_network_card_org_config
    <set>
      <if test="operatorType != null">
        operator_type = #{operatorType,jdbcType=INTEGER},
      </if>
      <if test="operatorName != null">
        operator_name = #{operatorName,jdbcType=VARCHAR},
      </if>
      <if test="settleDay != null">
        settle_day = #{settleDay,jdbcType=INTEGER},
      </if>
      <if test="userNo != null">
        user_no = #{userNo,jdbcType=VARCHAR},
      </if>
      <if test="userApiSecret != null">
        user_api_secret = #{userApiSecret,jdbcType=VARCHAR},
      </if>
      <if test="authValue != null">
        auth_value = #{authValue,jdbcType=VARCHAR},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="orgId != null">
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="dataState != null">
        data_state = #{dataState,jdbcType=INTEGER},
      </if>
      <if test="createDate != null">
        create_date = #{createDate,jdbcType=TIMESTAMP},
      </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="modfiyDate != null">
        modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      </if>
      <if test="modfiyEmpId != null">
        modfiy_emp_id = #{modfiyEmpId,jdbcType=VARCHAR},
      </if>
      <if test="modfiyEmpName != null">
        modfiy_emp_name = #{modfiyEmpName,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.zteits.park.domain.TpPNetworkCardOrgConfig">
    update tp_p_network_card_org_config
    set operator_type = #{operatorType,jdbcType=INTEGER},
      operator_name = #{operatorName,jdbcType=VARCHAR},
      settle_day = #{settleDay,jdbcType=INTEGER},
      user_no = #{userNo,jdbcType=VARCHAR},
      user_api_secret = #{userApiSecret,jdbcType=VARCHAR},
      auth_value = #{authValue,jdbcType=VARCHAR},
      remark = #{remark,jdbcType=VARCHAR},
      org_id = #{orgId,jdbcType=BIGINT},
      data_state = #{dataState,jdbcType=INTEGER},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      modfiy_date = #{modfiyDate,jdbcType=TIMESTAMP},
      modfiy_emp_id = #{modfiyEmpId,jdbcType=VARCHAR},
      modfiy_emp_name = #{modfiyEmpName,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>