<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!-- namespace:该mapper.xml映射文件的 唯一标识 -->
|
<mapper namespace="com.hx.phip.dao.mapper.RefundMapper">
|
|
<!--一级支付方式记录返回-支付编号求和-->
|
<select id="selectConsumePayList" 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
|
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 ANY_VALUE(name) AS name
|
,numberNo
|
,ROUND(SUM(actualTotal),2) AS surplusTotal
|
,ROUND(SUM(actualTotal),2) AS payTotal
|
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 ANY_VALUE(name) AS name
|
,numberNo
|
,ROUND(SUM(actualTotal),2) AS surplusTotal
|
,ROUND(SUM(actualTotal),2) AS payTotal
|
FROM consume_pay_item_son
|
WHERE isDel = 0 AND typeId = #{typeId} GROUP BY numberNo
|
</select>
|
|
|
</mapper>
|