Administrator
2024-02-04 1d401fef814034b884e423879cda16f207e2c88b
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml
@@ -359,64 +359,6 @@
    </if>
  </select>
  <!--根据指定条件获取交易统计记录数-->
  <select id="getTransactionStatisticsRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
    SELECT
    COUNT(*) AS recordCount
    FROM v_transactionstatistics
    <where>
      <if test = "operateTimeStart != null and operateTimeStop != null">
        AND tradeDate BETWEEN #{operateTimeStart} AND #{operateTimeStop}
      </if>
    </where>
  </select>
  <!--根据指定条件获取交易统计记录-->
  <select id="getTransactionStatistics" resultType="com.dy.pipIrrGlobal.voSe.VoTransactionStatistics">
    SELECT * FROM v_transactionstatistics
    <where>
      <if test = "operateTimeStart != null and operateTimeStop != null">
        AND tradeDate BETWEEN #{operateTimeStart} AND #{operateTimeStop}
      </if>
    </where>
    ORDER BY tradeDate
    <if test="pageCurr != null and pageSize != null">
      LIMIT ${pageCurr}, ${pageSize}
    </if>
  </select>
  <!--根基指定条件获取笔数合计、实收金额合计、赠送金额合计-->
  <select id="getTransactionStatisticsSums" resultType="java.util.Map">
    SELECT
    SUM(count) AS totalCount,
    SUM(received) AS totalReceived,
    SUM(gift) AS totalGift
    FROM v_transactionstatistics
    <where>
      <if test = "operateTimeStart != null and operateTimeStop != null">
        AND tradeDate BETWEEN #{operateTimeStart} AND #{operateTimeStop}
      </if>
    </where>
  </select>
  <!--获取指定日期、指定支付方式实收金额合计-->
  <select id="getPaymentSums" resultType="java.lang.Float">
    SELECT
    SUM(ope.trade_amount) AS tradeAmount
    FROM se_card_operate ope
    <where>
      <if test = "tradeDate != null and tradeDate !=''">
        AND Date(ope.operate_dt) = #{tradeDate}
      </if>
      <if test = "paymentId != null and paymentId >0">
        AND ope.payment_id = ${paymentId}
      </if>
    </where>
    GROUP BY ope.payment_id,  Date(ope.operate_dt)
  </select>
  <!--根据指定条件获取开卡记录数量-->
  <select id="getActiveCardRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">
    select