|
|
|
@@ -209,10 +209,12 @@ |
|
|
|
group by m.business_id |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getCountByBusinessIdAndSubId" parameterType="com.iformall.domain.po.WxCardSpend" resultType="hashmap"> |
|
|
|
select m.business_id, m.sub_business_id, count(m.business_id + '' + m.sub_business_id) bu_count |
|
|
|
<select id="getCountBySubBusinessId" parameterType="com.iformall.domain.po.WxCardSpend" resultType="hashmap"> |
|
|
|
select m.sub_business_id, count(m.sub_business_id) bu_count |
|
|
|
from wx_card_spend cs |
|
|
|
inner join wx_merchant m on m.id = cs.merchant_id |
|
|
|
<if test=" null != businessId "> |
|
|
|
inner join wx_merchant m on m.id = cs.merchant_id and m.business_id = #{businessId} |
|
|
|
</if> |
|
|
|
where 1 = 1 |
|
|
|
<if test=" null != ownerId "> |
|
|
|
and cs.`owner_id` = #{ownerId} |
|
|
|
@@ -250,7 +252,7 @@ |
|
|
|
((date_format(cs.create_date,'%H:%m') < '06:00') |
|
|
|
and date_format(cs.create_date,'%w') in (6,0))) |
|
|
|
</if> |
|
|
|
group by m.business_id, m.sub_business_id |
|
|
|
group by m.sub_business_id |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|