|
|
|
@@ -294,7 +294,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<select id = "findCreateDateCouponOrderCount" resultType="hashmap" parameterType="hashmap"> |
|
|
|
select DATE_FORMAT(create_date,'%m/%d') as createTime ,count(1) as count from wx_coupon_order |
|
|
|
select DATE_FORMAT(create_date,'%m/%d') as createTime ,count(1) as count from wx_coupon_order co |
|
|
|
where `tenant_id` = #{tenantId} |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
@@ -318,7 +318,7 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id = "findCreateDateCouponOrderUserCount" resultType="hashmap" parameterType="hashmap"> |
|
|
|
select DATE_FORMAT(create_date,'%m/%d') as createTime ,count(DISTINCT c_user_id) as count from wx_coupon_order |
|
|
|
select DATE_FORMAT(create_date,'%m/%d') as createTime ,count(DISTINCT c_user_id) as count from wx_coupon_order co |
|
|
|
where `tenant_id` = #{tenantId} |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
@@ -460,18 +460,7 @@ |
|
|
|
|
|
|
|
<select id="findCount" parameterType="com.iformall.domain.po.WxCouponOrder" resultType="java.lang.Integer"> |
|
|
|
select COUNT(1) FROM wx_coupon_order co |
|
|
|
<if test=" null != businessId "> |
|
|
|
inner join wx_coupon c |
|
|
|
on c.id = co.coupon_id |
|
|
|
and c.business = #{businessId} |
|
|
|
<if test=" null != subBusinessId "> |
|
|
|
and c.sub_business = #{subBusinessId} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and co.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
where co.`tenant_id` = #{tenantId} |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and co.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
@@ -561,10 +550,7 @@ |
|
|
|
|
|
|
|
<select id="findProductCount" parameterType="com.iformall.domain.po.WxCouponOrder" resultType="java.lang.Integer"> |
|
|
|
select COALESCE(sum(coupon_number),0) FROM wx_coupon_order co |
|
|
|
where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and co.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
where co.`tenant_id` = #{tenantId} |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and co.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
|