| | |
| | | <mapper namespace="com.sandu.ximon.dao.mapper.C3mOrderMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.C3mOrder"> |
| | | <id property="orderId" column="order_id" jdbcType="BIGINT"/> |
| | | <result property="poleId" column="pole_id" jdbcType="BIGINT"/> |
| | | <result property="c3Mac" column="c3_mac" jdbcType="VARCHAR"/> |
| | | <result property="poleMac" column="pole_mac" jdbcType="VARCHAR"/> |
| | | <result property="outTradeNo" column="out_trade_no" jdbcType="VARCHAR"/> |
| | | <result property="orderType" column="order_type" jdbcType="VARCHAR"/> |
| | | <result property="totalAmount" column="total_amount" jdbcType="DECIMAL"/> |
| | | <result property="receiptAmount" column="receipt_amount" jdbcType="DECIMAL"/> |
| | | <result property="refundAmount" column="refund_amount" jdbcType="DECIMAL"/> |
| | | <result property="aliBuyerLogonId" column="ali_buyer_logon_id" jdbcType="VARCHAR"/> |
| | | <result property="subscribeChargingCapacity" column="subscribe_charging_capacity" jdbcType="INTEGER"/> |
| | | <result property="actualChargingCapacity" column="actual_charging_capacity" jdbcType="DOUBLE"/> |
| | | <result property="createTimestamp" column="create_timestamp" jdbcType="BIGINT"/> |
| | | <result property="payTimestamp" column="pay_timestamp" jdbcType="BIGINT"/> |
| | | <result property="refundTimestamp" column="refund_timestamp" jdbcType="BIGINT"/> |
| | | <result property="refundMsg" column="refund_msg" jdbcType="VARCHAR"/> |
| | | <result property="startChargingTimestamp" column="start_charging_timestamp" jdbcType="BIGINT"/> |
| | | <result property="stopChargingTimestamp" column="stop_charging_timestamp" jdbcType="BIGINT"/> |
| | | <result property="orderStatus" column="order_status" jdbcType="INTEGER"/> |
| | | <result property="c3Name" column="c3_name" jdbcType="VARCHAR"/> |
| | | <result property="poleName" column="pole_name" jdbcType="VARCHAR"/> |
| | | <result property="changingStates" column="changing_states" jdbcType="INTEGER"/> |
| | | <result property="userCode" column="user_code" jdbcType="VARCHAR"/> |
| | | <id property="orderId" column="order_id" jdbcType="BIGINT"/> |
| | | <result property="poleId" column="pole_id" jdbcType="BIGINT"/> |
| | | <result property="c3Mac" column="c3_mac" jdbcType="VARCHAR"/> |
| | | <result property="poleMac" column="pole_mac" jdbcType="VARCHAR"/> |
| | | <result property="outTradeNo" column="out_trade_no" jdbcType="VARCHAR"/> |
| | | <result property="orderType" column="order_type" jdbcType="VARCHAR"/> |
| | | <result property="totalAmount" column="total_amount" jdbcType="DECIMAL"/> |
| | | <result property="receiptAmount" column="receipt_amount" jdbcType="DECIMAL"/> |
| | | <result property="refundAmount" column="refund_amount" jdbcType="DECIMAL"/> |
| | | <result property="aliBuyerLogonId" column="ali_buyer_logon_id" jdbcType="VARCHAR"/> |
| | | <result property="subscribeChargingCapacity" column="subscribe_charging_capacity" jdbcType="INTEGER"/> |
| | | <result property="actualChargingCapacity" column="actual_charging_capacity" jdbcType="DOUBLE"/> |
| | | <result property="createTimestamp" column="create_timestamp" jdbcType="BIGINT"/> |
| | | <result property="payTimestamp" column="pay_timestamp" jdbcType="BIGINT"/> |
| | | <result property="refundTimestamp" column="refund_timestamp" jdbcType="BIGINT"/> |
| | | <result property="refundMsg" column="refund_msg" jdbcType="VARCHAR"/> |
| | | <result property="startChargingTimestamp" column="start_charging_timestamp" jdbcType="BIGINT"/> |
| | | <result property="stopChargingTimestamp" column="stop_charging_timestamp" jdbcType="BIGINT"/> |
| | | <result property="orderStatus" column="order_status" jdbcType="INTEGER"/> |
| | | <result property="c3Name" column="c3_name" jdbcType="VARCHAR"/> |
| | | <result property="poleName" column="pole_name" jdbcType="VARCHAR"/> |
| | | <result property="changingStates" column="changing_states" jdbcType="INTEGER"/> |
| | | <result property="userCode" column="user_code" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | order_id,pole_id,c3_mac, |
| | | order_id |
| | | ,pole_id,c3_mac, |
| | | pole_mac,out_trade_no,order_type, |
| | | total_amount,receipt_amount,refund_amount, |
| | | ali_buyer_logon_id,subscribe_charging_capacity,actual_charging_capacity, |
| | |
| | | order_status,c3_name,pole_name, |
| | | changing_states,user_code |
| | | </sql> |
| | | |
| | | <select id="orderList" resultType="com.sandu.ximon.dao.bo.C3mOrderBo" parameterType="java.lang.Long"> |
| | | SELECT |
| | | t1.* |
| | | FROM |
| | | c3_order t1 |
| | | LEFT JOIN pole t2 ON t1.pole_id = t2.id |
| | | <if test="userId != null"> |
| | | WHERE (t1.userId = #{userId} OR t1.client_id= #{userId}) |
| | | </if> |
| | | </select> |
| | | </mapper> |