|
@@ -7,7 +7,7 @@
|
|
|
<id column="id" property="id" />
|
|
|
<result column="channel_id" property="channelId" />
|
|
|
<result column="order_id" property="orderId" />
|
|
|
- <result column="ticket_id" property="ticketId" />
|
|
|
+ <result column="box_id" property="boxId" />
|
|
|
<result column="sale_amt" property="saleAmt" />
|
|
|
<result column="sale_comm_rate" property="saleCommRate" />
|
|
|
<result column="sale_comm_amt" property="saleCommAmt" />
|
|
@@ -19,7 +19,7 @@
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<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, order_id, sale_amt, sale_comm_rate, sale_comm_amt, comm_rate, comm_amt, created_time, updated_time
|
|
|
</sql>
|
|
|
|
|
|
<!-- 查询子渠道一定时间范围内的佣金金额 -->
|
|
@@ -36,12 +36,12 @@
|
|
|
<select id="getChannelSaleAmtCnt" resultType="integer">
|
|
|
select IFNULL(SUM(t3.sale_amt),0) as saleAmt
|
|
|
from (
|
|
|
- select t1.ticket_id, MIN(t1.sale_amt) sale_amt
|
|
|
+ select t1.order_id, MIN(t1.sale_amt) sale_amt
|
|
|
from mp_channel_commission t1
|
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
|
where (t2.channel_no like concat(#{channelNo},'.%') or t2.channel_no = #{channelNo})
|
|
|
AND t1.created_time > DATE_SUB(CURDATE(),INTERVAL #{days} DAY)
|
|
|
- GROUP BY t1.ticket_id
|
|
|
+ GROUP BY t1.order_id
|
|
|
) t3
|
|
|
</select>
|
|
|
|
|
@@ -59,11 +59,11 @@
|
|
|
<select id="getChannelTotalSaleAmtCnt" resultType="integer">
|
|
|
select IFNULL(SUM(t3.sale_amt),0) as saleAmt
|
|
|
from (
|
|
|
- select t1.ticket_id, MIN(t1.sale_amt) sale_amt
|
|
|
+ select t1.order_id, MIN(t1.sale_amt) sale_amt
|
|
|
from mp_channel_commission t1
|
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
|
where (t2.channel_no like concat(#{channelNo},'.%') or t2.channel_no = #{channelNo})
|
|
|
- GROUP BY t1.ticket_id
|
|
|
+ GROUP BY t1.order_id
|
|
|
) t3
|
|
|
</select>
|
|
|
|