java110
2023-05-30 f14c50cb0036d3ddd655ce4e34732ba396a836c4
java110-db/src/main/resources/mapper/common/ChargeMachineOrderAcctV1ServiceDaoImplMapper.xml
@@ -8,9 +8,9 @@
    <!-- 保存充电扣款信息 add by wuxw 2018-07-03 -->
    <insert id="saveChargeMachineOrderAcctInfo" parameterType="Map">
        insert into charge_machine_order_acct(
        amount,cmoa_id,order_id,acct_detail_id,acct_id,start_time,remark,end_time,community_id,energy
        amount,cmoa_id,order_id,acct_detail_id,acct_id,start_time,remark,end_time,community_id,energy,duration_price
        ) values (
        #{amount},#{cmoaId},#{orderId},#{acctDetailId},#{acctId},#{startTime},#{remark},#{endTime},#{communityId},#{energy}
        #{amount},#{cmoaId},#{orderId},#{acctDetailId},#{acctId},#{startTime},#{remark},#{endTime},#{communityId},#{energy},#{durationPrice}
        )
    </insert>
@@ -19,7 +19,8 @@
    <select id="getChargeMachineOrderAcctInfo" parameterType="Map" resultType="Map">
        select t.amount,t.cmoa_id,t.cmoa_id cmoaId,t.order_id,t.order_id orderId,t.acct_detail_id,t.acct_detail_id
        acctDetailId,t.acct_id,t.acct_id acctId,t.start_time,t.start_time startTime,t.remark,t.status_cd,t.status_cd
        statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.energy,t.create_time createTime
        statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.energy,t.duration_price durationPrice,
        t.create_time createTime
        from charge_machine_order_acct t
        where 1 =1
        <if test="amount !=null and amount != ''">
@@ -55,6 +56,7 @@
        <if test="energy !=null and energy != ''">
            and t.energy= #{energy}
        </if>
        <if test="powerTime !=null and powerTime != ''">
            and t.start_time &lt; #{powerTime}
            and t.end_time &gt; #{powerTime}
@@ -97,6 +99,9 @@
        <if test="energy !=null and energy != ''">
            , t.energy= #{energy}
        </if>
        <if test="durationPrice !=null and durationPrice != ''">
            , t.duration_price= #{durationPrice}
        </if>
        where 1=1
        <if test="cmoaId !=null and cmoaId != ''">
            and t.cmoa_id= #{cmoaId}