diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index f61e32448..74391e3d7 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -1335,7 +1335,7 @@ class FinanceController extends ThinkController $map8[] = ['u.id = v.user_id']; $map8['v.create_time'] = $map['create_time']; - $valueQuery5 = M('value_detail_log', 'tab_')->alias('v')->field('sum(abs(v.value)) as spend_value') + $valueQuery5 = M('value_detail_log', 'tab_')->alias('v')->field('if(sum(abs(v.value)) != null, sum(abs(v.value)) , 0) as spend_value') ->where($map5)->buildSql(); $valueQuery6 = M('value_detail_log', 'tab_')->alias('v')->field('sum(v.value) as spend_value') ->where($map6)->buildSql();