Просмотр исходного кода

[储值卡][新增]:消费记录sum修复

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
5c3eeb4619
1 измененных файлов: 3 добавлений и 2 удалений
  1. +3
    -2
      mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml

+ 3
- 2
mallinkService/src/main/resources/mapper/WxCardSpendMapper.xml Просмотреть файл

@@ -133,7 +133,7 @@
<sql id="allVoColumns"> <sql id="allVoColumns">
cs.`id`,cs.`tenant_id`,cs.`card_id`,cs.`owner_id`,cs.`merchant_id`,cs.`order_id`,cs.`deduction_amount`,cs.`payment`,cs.`real_payment`, cs.`id`,cs.`tenant_id`,cs.`card_id`,cs.`owner_id`,cs.`merchant_id`,cs.`order_id`,cs.`deduction_amount`,cs.`payment`,cs.`real_payment`,
cs.`card_remain_amount`,cs.`card_before_amount`,cs.`card_remain_real_amount`,cs.`card_before_real_amount`, cs.`card_remain_amount`,cs.`card_before_amount`,cs.`card_remain_real_amount`,cs.`card_before_real_amount`,
cs.`create_date`,cs.`update_date`, cs.`pay_status`
cs.`create_date`,cs.`update_date`, cs.`pay_status`,
m.`name`, c.`title`, m.`name`, c.`title`,
ms.`subsidy`,ms.`real_subsidy`,ms.`status`, ms.`subsidy`,ms.`real_subsidy`,ms.`status`,
ou.`nick_name` as onick_name, ou.`phone` as ou_phone ou.`nick_name` as onick_name, ou.`phone` as ou_phone
@@ -225,7 +225,7 @@
</select> </select>


<select id="sumCardSpendVo" parameterType="com.iformall.domain.vo.WxCardSpendVo" resultType="hashmap"> <select id="sumCardSpendVo" parameterType="com.iformall.domain.vo.WxCardSpendVo" resultType="hashmap">
select
select cs.merchant_id, m.name as merchantName
IFNULL(SUM(cs.`deduction_amount`),0) as sum_deduction_amount, IFNULL(SUM(cs.`deduction_amount`),0) as sum_deduction_amount,
IFNULL(SUM(cs.`payment`),0) as sum_payment, IFNULL(SUM(cs.`payment`),0) as sum_payment,
IFNULL(SUM(cs.`real_payment`),0) as sum_real_payment, IFNULL(SUM(cs.`real_payment`),0) as sum_real_payment,
@@ -238,6 +238,7 @@
left join wx_merchant_subsidy ms on ms.order_id = cs.order_id left join wx_merchant_subsidy ms on ms.order_id = cs.order_id
left join wx_c_user ou on ou.id = co.owner_id left join wx_c_user ou on ou.id = co.owner_id
<include refid="dynamicVoWhereConditions" /> <include refid="dynamicVoWhereConditions" />
group by cs.merchant_id
</select> </select>


Загрузка…
Отмена
Сохранить