<?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="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="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="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>
|