From e55c8b0a92eb9715edd90c31dfd4de51a47b588b Mon Sep 17 00:00:00 2001
From: liuhaonan <31457034@qq.com>
Date: 星期五, 04 十一月 2022 17:40:08 +0800
Subject: [PATCH] changes

---
 dao/src/main/resources/mapper/C3mOrderMapper.xml |   45 ++++++++++++++++++++++++++++++---------------
 1 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/dao/src/main/resources/mapper/C3mOrderMapper.xml b/dao/src/main/resources/mapper/C3mOrderMapper.xml
index ebca177..7868a8d 100644
--- a/dao/src/main/resources/mapper/C3mOrderMapper.xml
+++ b/dao/src/main/resources/mapper/C3mOrderMapper.xml
@@ -7,49 +7,64 @@
     <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="poleName" column="pole_name" jdbcType="VARCHAR"/>
+        <result property="c3Mac" column="c3_mac" jdbcType="VARCHAR"/>
+        <result property="c3Name" column="c3_name" jdbcType="VARCHAR"/>
+        <result property="c3Udid" column="c3_udid" 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="surplusAmount" column="surplus_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="actualChargingCapacityHide" column="actual_charging_capacity_hide" 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="alreadyChargingTime" column="already_charging_time" 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="chargingStates" column="charging_states" jdbcType="INTEGER"/>
         <result property="userCode" column="user_code" jdbcType="VARCHAR"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         order_id
-        ,pole_id,c3_mac,
-        pole_mac,out_trade_no,order_type,
+        ,pole_id,pole_mac,
+        pole_name,c3_mac,c3_name,
+        c3_udid,out_trade_no,order_type,
         total_amount,receipt_amount,refund_amount,
         ali_buyer_logon_id,subscribe_charging_capacity,actual_charging_capacity,
-        create_timestamp,pay_timestamp,refund_timestamp,
-        refund_msg,start_charging_timestamp,stop_charging_timestamp,
-        order_status,c3_name,pole_name,
-        changing_states,user_code
+        actual_charging_capacity_hide,create_timestamp,pay_timestamp,
+        refund_timestamp,refund_msg,start_charging_timestamp,
+        stop_charging_timestamp,order_status,charging_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>
+        <where>
+            1=1
+            <if test="userId != null">
+                AND (t1.userId = #{userId} OR t1.client_id= #{userId})
+            </if>
+            <if test="orderStatus != null">
+                AND t1.order_status = #{orderStatus}
+            </if>
+            <if test="startTimeStamp != null">
+                AND create_timestamp BETWEEN #{startTimeStamp} AND #{nowTimeStamp}
+            </if>
+            <if test="keyword != null and keyword != ''">
+                AND t1.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+            </if>
+        </where>
     </select>
 </mapper>

--
Gitblit v1.9.3