ChargingOrderMapper.xml 2.14 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="cn.com.glsx.evbusiness.modules.mapper.ChargingOrderMapper">
  <resultMap id="BaseResultMap" type="cn.com.glsx.evbusiness.modules.entity.ChargingOrder">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id"/>
    <result column="order_code" jdbcType="VARCHAR" property="orderCode"/>
    <result column="order_status" jdbcType="TINYINT" property="orderStatus"/>
    <result column="order_source" jdbcType="TINYINT" property="orderSource"/>
    <result column="spear_id" jdbcType="INTEGER" property="spearId"/>
    <result column="park_space_num" jdbcType="VARCHAR" property="parkSpaceNum"/>
    <result column="execute_type" jdbcType="TINYINT" property="executeType"/>
    <result column="order_amount" jdbcType="DOUBLE" property="orderAmount"/>
    <result column="car_number" jdbcType="VARCHAR" property="carNumber"/>
    <result column="charg_endtime" jdbcType="TIMESTAMP" property="chargEndtime"/>
    <result column="charg_starttime" jdbcType="TIMESTAMP" property="chargStarttime"/>
    <result column="end_type" jdbcType="TINYINT" property="endType"/>
    <result column="total_degrees" jdbcType="REAL" property="totalDegrees"/>
    <result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
    -->
    id, order_code, order_status, order_source, spear_id, park_space_num, execute_type,
    order_amount, car_number, charg_endtime, charg_starttime, end_type, total_degrees,
    created_time
  </sql>

  <select id="selectList" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from charging_order
    <where>
      <if test="orderSearch.orderStatus != null">
        and order_status=#{orderSearch.orderStatus}
      </if>
    </where>
  </select>

  <select id="findByOrderCode" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from charging_order
    where order_code=#{orderCode}
  </select>
</mapper>