Ver código fonte

添加sql默认值为0

zhaoxian 4 anos atrás
pai
commit
f7bf664a9d

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/EtlKuaiShouGroupDailyReportMapper.xml

@@ -72,12 +72,12 @@
         account_id as 'accountId',
         unit_name as 'unitName',
         t1.charge,
-        ROUND(t1.charge/activation,2) as 'activationCost',
+        IFNULL(ROUND(t1.charge/activation,2),0) as 'activationCost',
         bid,
         bid_type as 'bidType',
         unit_status as 'unitStatus',
         activation,
-        ROUND((t1.charge-t2.charge)/t2.charge*100,2) 'grew',
+        IFNULL(ROUND((t1.charge-t2.charge)/t2.charge*100,2),0)'grew',
         t1.update_time as 'updateTime'
         FROM ctop_etl_kuaishou_group_daily_report t1
         LEFT JOIN (