From 07c385e561c7a9d753e50a4f320bfee2c457ac87 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Mon, 13 Apr 2020 21:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/FinanceController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();