OrderChargeOperateLogMapper.xml 13.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.order.mapper.OrderChargeOperateLogMapper">
  <resultMap id="BaseResultMap" type="com.zteits.order.domain.OrderChargeOperateLog">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="order_id" jdbcType="VARCHAR" property="orderId" />
    <result column="operator_id" jdbcType="VARCHAR" property="operatorId" />
    <result column="operation_type" jdbcType="INTEGER" property="operationType" />
    <result column="title" jdbcType="VARCHAR" property="title" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="operation_result" jdbcType="INTEGER" property="operationResult" />
    <result column="request_info" jdbcType="VARCHAR" property="requestInfo" />
    <result column="response_info" jdbcType="VARCHAR" property="responseInfo" />
    <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_date" jdbcType="TIMESTAMP" property="createDate" />
    <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, order_id, operator_id, operation_type, title, content, operation_result, request_info, 
    response_info, data_state, create_emp_id, create_emp_name, create_date, org_id
  </sql>
  <select id="selectByExample" parameterType="com.zteits.order.domain.OrderChargeOperateLogExample" resultMap="BaseResultMap">
    select
    <if test="distinct">
      distinct
    </if>
    <include refid="Base_Column_List" />
    from order_charge_operate_log
    <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 order_charge_operate_log
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from order_charge_operate_log
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <delete id="deleteByExample" parameterType="com.zteits.order.domain.OrderChargeOperateLogExample">
    delete from order_charge_operate_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </delete>
  <insert id="insert" parameterType="com.zteits.order.domain.OrderChargeOperateLog">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into order_charge_operate_log (order_id, operator_id, operation_type, 
      title, content, operation_result, 
      request_info, response_info, data_state, 
      create_emp_id, create_emp_name, create_date, 
      org_id)
    values (#{orderId,jdbcType=VARCHAR}, #{operatorId,jdbcType=VARCHAR}, #{operationType,jdbcType=INTEGER}, 
      #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{operationResult,jdbcType=INTEGER}, 
      #{requestInfo,jdbcType=VARCHAR}, #{responseInfo,jdbcType=VARCHAR}, #{dataState,jdbcType=INTEGER}, 
      #{createEmpId,jdbcType=VARCHAR}, #{createEmpName,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 
      #{orgId,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" parameterType="com.zteits.order.domain.OrderChargeOperateLog">
    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
      SELECT LAST_INSERT_ID()
    </selectKey>
    insert into order_charge_operate_log
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="orderId != null">
        order_id,
      </if>
      <if test="operatorId != null">
        operator_id,
      </if>
      <if test="operationType != null">
        operation_type,
      </if>
      <if test="title != null">
        title,
      </if>
      <if test="content != null">
        content,
      </if>
      <if test="operationResult != null">
        operation_result,
      </if>
      <if test="requestInfo != null">
        request_info,
      </if>
      <if test="responseInfo != null">
        response_info,
      </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="createDate != null">
        create_date,
      </if>
      <if test="orgId != null">
        org_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="orderId != null">
        #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="operatorId != null">
        #{operatorId,jdbcType=VARCHAR},
      </if>
      <if test="operationType != null">
        #{operationType,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="operationResult != null">
        #{operationResult,jdbcType=INTEGER},
      </if>
      <if test="requestInfo != null">
        #{requestInfo,jdbcType=VARCHAR},
      </if>
      <if test="responseInfo != null">
        #{responseInfo,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="createDate != null">
        #{createDate,jdbcType=TIMESTAMP},
      </if>
      <if test="orgId != null">
        #{orgId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <select id="countByExample" parameterType="com.zteits.order.domain.OrderChargeOperateLogExample" resultType="java.lang.Long">
    select count(*) from order_charge_operate_log
    <if test="_parameter != null">
      <include refid="Example_Where_Clause" />
    </if>
  </select>
  <update id="updateByExampleSelective" parameterType="map">
    update order_charge_operate_log
    <set>
      <if test="record.id != null">
        id = #{record.id,jdbcType=BIGINT},
      </if>
      <if test="record.orderId != null">
        order_id = #{record.orderId,jdbcType=VARCHAR},
      </if>
      <if test="record.operatorId != null">
        operator_id = #{record.operatorId,jdbcType=VARCHAR},
      </if>
      <if test="record.operationType != null">
        operation_type = #{record.operationType,jdbcType=INTEGER},
      </if>
      <if test="record.title != null">
        title = #{record.title,jdbcType=VARCHAR},
      </if>
      <if test="record.content != null">
        content = #{record.content,jdbcType=VARCHAR},
      </if>
      <if test="record.operationResult != null">
        operation_result = #{record.operationResult,jdbcType=INTEGER},
      </if>
      <if test="record.requestInfo != null">
        request_info = #{record.requestInfo,jdbcType=VARCHAR},
      </if>
      <if test="record.responseInfo != null">
        response_info = #{record.responseInfo,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.createDate != null">
        create_date = #{record.createDate,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 order_charge_operate_log
    set id = #{record.id,jdbcType=BIGINT},
      order_id = #{record.orderId,jdbcType=VARCHAR},
      operator_id = #{record.operatorId,jdbcType=VARCHAR},
      operation_type = #{record.operationType,jdbcType=INTEGER},
      title = #{record.title,jdbcType=VARCHAR},
      content = #{record.content,jdbcType=VARCHAR},
      operation_result = #{record.operationResult,jdbcType=INTEGER},
      request_info = #{record.requestInfo,jdbcType=VARCHAR},
      response_info = #{record.responseInfo,jdbcType=VARCHAR},
      data_state = #{record.dataState,jdbcType=INTEGER},
      create_emp_id = #{record.createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{record.createEmpName,jdbcType=VARCHAR},
      create_date = #{record.createDate,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.order.domain.OrderChargeOperateLog">
    update order_charge_operate_log
    <set>
      <if test="orderId != null">
        order_id = #{orderId,jdbcType=VARCHAR},
      </if>
      <if test="operatorId != null">
        operator_id = #{operatorId,jdbcType=VARCHAR},
      </if>
      <if test="operationType != null">
        operation_type = #{operationType,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        title = #{title,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
        content = #{content,jdbcType=VARCHAR},
      </if>
      <if test="operationResult != null">
        operation_result = #{operationResult,jdbcType=INTEGER},
      </if>
      <if test="requestInfo != null">
        request_info = #{requestInfo,jdbcType=VARCHAR},
      </if>
      <if test="responseInfo != null">
        response_info = #{responseInfo,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="createDate != null">
        create_date = #{createDate,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.order.domain.OrderChargeOperateLog">
    update order_charge_operate_log
    set order_id = #{orderId,jdbcType=VARCHAR},
      operator_id = #{operatorId,jdbcType=VARCHAR},
      operation_type = #{operationType,jdbcType=INTEGER},
      title = #{title,jdbcType=VARCHAR},
      content = #{content,jdbcType=VARCHAR},
      operation_result = #{operationResult,jdbcType=INTEGER},
      request_info = #{requestInfo,jdbcType=VARCHAR},
      response_info = #{responseInfo,jdbcType=VARCHAR},
      data_state = #{dataState,jdbcType=INTEGER},
      create_emp_id = #{createEmpId,jdbcType=VARCHAR},
      create_emp_name = #{createEmpName,jdbcType=VARCHAR},
      create_date = #{createDate,jdbcType=TIMESTAMP},
      org_id = #{orgId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>