chenjiahe
2023-04-02 2a45d42cebd76d0f0add392c0e06d2cbbb36c63f
phi_platform_common/src/main/resources/mapper/platform/RefundMapper.xml
@@ -6,36 +6,57 @@
<mapper namespace="com.hx.phip.dao.mapper.RefundMapper">
   <!--一级支付方式记录返回-支付编号求和-->
   <select id="selectConsumePayList" resultType="com.hx.phip.vo.order.payment.PayMethodVo">
   <select id="getConsumePayGroupByNumberNo" resultType="com.hx.phip.vo.order.payment.PayMethodVo">
      SELECT ANY_VALUE(name) AS name
          ,numberNo
          ,ROUND(SUM(actualTotal-refundTotal),2) AS surplusTotal
          ,ROUND(SUM(actualTotal),2) AS payTotal
          ,ROUND(SUM(refundTotal),2) AS refundTotal
          ,ANY_VALUE(isMoneyPay) AS IsMoneyPay
          ,ANY_VALUE(isExecute) AS isExecute
      FROM consume_pay
      WHERE isDel = 0 AND orderId = #{orderId} GROUP BY numberNo
   </select>
   <!--一级支付方式记录返回-支付编号求和-->
   <select id="selectConsumePayOneList" resultType="com.hx.phip.vo.order.payment.PayMethodVo">
   <select id="getConsumePayOneGroupByNumberNo" resultType="com.hx.phip.vo.order.payment.PayMethodVo">
      SELECT ANY_VALUE(name) AS name
           ,numberNo
           ,ROUND(SUM(actualTotal),2) AS surplusTotal
           ,ROUND(SUM(actualTotal),2) AS payTotal
          ,ANY_VALUE(isMoneyPay) AS IsMoneyPay
          ,ANY_VALUE(isExecute) AS isExecute
      FROM consume_pay_item
        WHERE isDel = 0 AND typeId = #{typeId} GROUP BY numberNo
   </select>
   <!--二级支付方式记录返回-支付编号求和-->
   <select id="selectConsumePayTwoList" resultType="com.hx.phip.vo.order.payment.PayMethodVo" >
   <select id="getConsumePayTwoGroupByNumberNo" resultType="com.hx.phip.vo.order.payment.PayMethodVo" >
      SELECT ANY_VALUE(name) AS name
           ,numberNo
           ,ROUND(SUM(actualTotal),2) AS surplusTotal
          ,ROUND(SUM(actualTotal),2) AS payTotal
          ,ANY_VALUE(isMoneyPay) AS IsMoneyPay
          ,ANY_VALUE(isExecute) AS isExecute
      FROM consume_pay_item_son
      WHERE isDel = 0 AND typeId = #{typeId} GROUP BY numberNo
   </select>
   <!--一级支付方式记录返回-->
   <select id="selectConsumePayOneList" resultType="com.hx.phiappt.model.consume.ConsumePayItem">
      SELECT
         *
      FROM consume_pay_item
      WHERE isDel = 0 AND typeId = #{typeId}
   </select>
   <!--二级支付方式记录返回-->
   <select id="selectConsumePayTwoList" resultType="com.hx.phiappt.model.consume.ConsumePayItemSon" >
      SELECT
         *
      FROM consume_pay_item_son
      WHERE isDel = 0 AND typeId = #{typeId}
   </select>
</mapper>