|
|
|
@@ -158,7 +158,7 @@ |
|
|
|
|
|
|
|
<select id="updateByCond" parameterType="com.iformall.domain.po.WxCardSpend"> |
|
|
|
update wx_card_spend |
|
|
|
set `pay_status` = #{payStatus}, `update_date` = #{updateDate} |
|
|
|
set `settlement_status` = #{settlementStatus}, `update_date` = #{updateDate} |
|
|
|
<where> |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
@@ -195,6 +195,9 @@ |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
where 1 = 1 |
|
|
|
<if test=" null != payType "> |
|
|
|
and cs.`pay_type` = #{payType} |
|
|
|
</if> |
|
|
|
<if test=" null != ownerId "> |
|
|
|
and cs.`owner_id` = #{ownerId} |
|
|
|
</if> |
|
|
|
@@ -239,7 +242,11 @@ |
|
|
|
<select id="getMerchantCount" parameterType="com.iformall.domain.po.WxCardSpend" resultType="hashmap"> |
|
|
|
select cs.merchant_id as merchantId, count(1) as count |
|
|
|
from wx_card_spend cs |
|
|
|
where cs.`owner_id` = #{ownerId} and cs.`tenant_id` = #{tenantId} |
|
|
|
where cs.`owner_id` = #{ownerId} |
|
|
|
and cs.`tenant_id` = #{tenantId} |
|
|
|
<if test=" null != payType "> |
|
|
|
and cs.`pay_type` = #{payType} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and cs.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
@@ -277,14 +284,14 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="sumMerchant" parameterType="com.iformall.domain.po.WxCardSpend" resultType="hashmap"> |
|
|
|
select cs.merchant_id, |
|
|
|
select cs.merchant_id,cs.pay_type, |
|
|
|
IFNULL(SUM(cs.`deduction_amount`),0) as sum_deduction_amount, |
|
|
|
IFNULL(SUM(cs.`payment`),0) as sum_payment, |
|
|
|
IFNULL(SUM(cs.`real_payment`),0) as sum_real_payment, |
|
|
|
IFNULL(SUM(cs.`subsidy`),0) as sum_subsidy |
|
|
|
from wx_card_spend cs |
|
|
|
<include refid="dynamicWhereConditions"/> |
|
|
|
group by cs.merchant_id |
|
|
|
group by cs.merchant_id,cs.pay_type |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getMerchantIdList" parameterType="com.iformall.domain.vo.WxCardSpendVo" resultType="Long"> |
|
|
|
@@ -309,6 +316,9 @@ |
|
|
|
from wx_card_spend cs |
|
|
|
where cs.`tenant_id` = #{tenantId} |
|
|
|
and cs.`merchant_id` = #{merchantId} |
|
|
|
<if test=" null != payType "> |
|
|
|
and cs.`pay_type` = #{payType} |
|
|
|
</if> |
|
|
|
<if test=" null != startdate "> |
|
|
|
AND cs.`create_date` >= #{startdate} |
|
|
|
</if> |
|
|
|
|