瀏覽代碼

Merge remote-tracking branch 'origin/master'

小么熊🐻 2 年之前
父節點
當前提交
83f8772461

+ 4 - 4
jsjp-service/src/main/java/com/miaxis/order/vo/QuerySchoolOrderListVo.java

@@ -38,12 +38,12 @@ public class QuerySchoolOrderListVo  {
     @ApiModelProperty(value = "订单总数")
     private String orderCount;
 
-    @Excel(name = "激活金额")
-    @ApiModelProperty(value = "激活金额")
+    @Excel(name = "激活金额(选择合作时字段有效)")
+    @ApiModelProperty(value = "激活金额(选择合作时字段有效)")
     private Float activationCommission;
 
-    @Excel(name = "补贴金额")
-    @ApiModelProperty(value = "补贴金额")
+    @Excel(name = "补贴金额(选择合作时字段有效)")
+    @ApiModelProperty(value = "补贴金额(选择合作时字段有效)")
     private Float subsidy;
 
 

+ 20 - 14
jsjp-service/src/main/resources/mapper/order/OrderInfoMapper.xml

@@ -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">