|
@@ -157,7 +157,7 @@
|
|
|
<if test="addTime != null "> and cm_distribution.addTime = #{addTime}</if>
|
|
|
<if test="settleStatus != null ">
|
|
|
<if test="settleStatus == 1 ">
|
|
|
- and (SELECT ifnull(sum(IFNULL(cop.organizeCostPrice,cop.price*cop.organizePercent)),0)
|
|
|
+ and (SELECT ifnull(sum(IFNULL(cop.organizeCostPrice*cop.num,cop.price*cop.organizePercent*cop.num)),0)
|
|
|
from cm_reporting_club a
|
|
|
left join cm_distribution cd on cd.id = a.distributionId
|
|
|
left join cm_order co on co.orderID = a.orderID
|
|
@@ -169,7 +169,7 @@
|
|
|
)=0
|
|
|
</if>
|
|
|
<if test="settleStatus == 0 ">
|
|
|
- and (SELECT ifnull(sum(IFNULL(cop.organizeCostPrice,cop.price*cop.organizePercent)),0)
|
|
|
+ and (SELECT ifnull(sum(IFNULL(cop.organizeCostPrice*cop.num,cop.price*cop.organizePercent*cop.num)),0)
|
|
|
from cm_reporting_club a
|
|
|
left join cm_distribution cd on cd.id = a.distributionId
|
|
|
left join cm_order co on co.orderID = a.orderID
|
|
@@ -245,7 +245,7 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getByCommissions" resultType="bigDecimal">
|
|
|
- SELECT ifnull(sum(IFNULL(cop.organizeCostPrice,cop.price*cop.organizePercent)),0)
|
|
|
+ SELECT ifnull(sum(IFNULL(cop.organizeCostPrice*cop.num,cop.price*cop.organizePercent*cop.num)),0)
|
|
|
from cm_reporting_club a
|
|
|
left join cm_distribution cd on cd.id = a.distributionId
|
|
|
left join cm_order co on co.orderID = a.orderID
|