|
@@ -21,7 +21,7 @@
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
id, channel_id, order_id, ticket_id, sale_amt, sale_comm_rate, sale_comm_amt, comm_rate, comm_amt, created_time, updated_time
|
|
id, channel_id, order_id, ticket_id, sale_amt, sale_comm_rate, sale_comm_amt, comm_rate, comm_amt, created_time, updated_time
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
|
|
+
|
|
<!-- 查询子渠道一定时间范围内的佣金金额 -->
|
|
<!-- 查询子渠道一定时间范围内的佣金金额 -->
|
|
<select id="getChannelCommAmtCnt" resultType="integer">
|
|
<select id="getChannelCommAmtCnt" resultType="integer">
|
|
select IFNULL(SUM(t1.comm_amt),0) as commAmt
|
|
select IFNULL(SUM(t1.comm_amt),0) as commAmt
|
|
@@ -30,13 +30,13 @@
|
|
where t2.channel_no like concat(#{channelNo},'.%')
|
|
where t2.channel_no like concat(#{channelNo},'.%')
|
|
AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()
|
|
AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<!-- 查询子渠道一定时间范围内的销售金额 -->
|
|
<!-- 查询子渠道一定时间范围内的销售金额 -->
|
|
<select id="getChannelSaleAmtCnt" resultType="integer">
|
|
<select id="getChannelSaleAmtCnt" resultType="integer">
|
|
select IFNULL(SUM(t3.sale_amt),0) as saleAmt
|
|
select IFNULL(SUM(t3.sale_amt),0) as saleAmt
|
|
from (
|
|
from (
|
|
- select t1.ticket_id, MIN(t1.sale_amt)
|
|
|
|
|
|
+ select t1.ticket_id, MIN(t1.sale_amt) sale_amt
|
|
from mp_channel_commission t1
|
|
from mp_channel_commission t1
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
where t2.channel_no like concat(#{channelNo},'.%')
|
|
where t2.channel_no like concat(#{channelNo},'.%')
|