|
@@ -63,13 +63,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
IFNULL(sum(school_commission),0) as school_commission,
|
|
|
IFNULL(sum(total),0) as order_total,
|
|
|
COUNT(DISTINCT logincode) as people_count,
|
|
|
- COUNT(id) as order_count,
|
|
|
- IFNULL(COUNT(DISTINCT logincode),0)*49*100 as activation_commission,
|
|
|
- (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) as subsidy_bak,
|
|
|
- (case
|
|
|
- when (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) <![CDATA[ <= ]]> 0 then 0
|
|
|
- when (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) <![CDATA[ > ]]> 0 then (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission))
|
|
|
- else 0 end) as subsidy
|
|
|
+ COUNT(id) as order_count
|
|
|
+ <if test="isShare==1">
|
|
|
+ ,
|
|
|
+ IFNULL(COUNT(DISTINCT logincode),0)*49*100 as activation_commission,
|
|
|
+ (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) as subsidy_bak,
|
|
|
+ (case
|
|
|
+ when (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) <![CDATA[ <= ]]> 0 then 0
|
|
|
+ when (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission)) <![CDATA[ > ]]> 0 then (IFNULL(COUNT(DISTINCT logincode),0)*49*100-sum(school_commission))
|
|
|
+ else 0 end) as subsidy
|
|
|
+ </if>
|
|
|
from order_info
|
|
|
<where>
|
|
|
<if test="isShare != null">
|
|
@@ -102,13 +105,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
IFNULL(sum(school_commission)/100,0) as school_commission,
|
|
|
IFNULL(sum(total)/100,0) as order_total,
|
|
|
COUNT(DISTINCT logincode) as people_count,
|
|
|
- COUNT(id) as order_count,
|
|
|
- IFNULL(COUNT(DISTINCT logincode),0)*49 as activation_commission,
|
|
|
- (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission/100)) as subsidy_bak,
|
|
|
- (case
|
|
|
- when (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100) <![CDATA[ <= ]]> 0 then 0
|
|
|
- when (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100) <![CDATA[ > ]]> 0 then (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100)
|
|
|
- else 0 end) as subsidy
|
|
|
+ COUNT(id) as order_count
|
|
|
+ <if test="isShare==1">
|
|
|
+ ,
|
|
|
+ IFNULL(COUNT(DISTINCT logincode),0)*49 as activation_commission,
|
|
|
+ (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission/100)) as subsidy_bak,
|
|
|
+ (case
|
|
|
+ when (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100) <![CDATA[ <= ]]> 0 then 0
|
|
|
+ when (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100) <![CDATA[ > ]]> 0 then (IFNULL(COUNT(DISTINCT logincode),0)*49-sum(school_commission)/100)
|
|
|
+ else 0 end) as subsidy
|
|
|
+ </if>
|
|
|
from order_info
|
|
|
<where>
|
|
|
<if test="isShare != null">
|