From 92875784d80087b16566c8d2cd6345ddf5bfd5cd Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 24 Dec 2020 12:21:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=89=A3=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hyhproject/common/model/UserTrees.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hyhproject/common/model/UserTrees.php b/hyhproject/common/model/UserTrees.php index cd31e3d..857a743 100755 --- a/hyhproject/common/model/UserTrees.php +++ b/hyhproject/common/model/UserTrees.php @@ -54,8 +54,9 @@ class UserTrees extends Base public static function realGetUsersHelpSaleNum($fromUsers, $level){ $count = DB::table("hyh_orders")->where("userId='$fromUsers' and helpUserLevel='$level' and orderStatus=2")->sum("helpGetCount"); + $minus = DB::table("hyh_orders")->where("helpUserId='$fromUsers' and helpUserLevel='$level' and orderStatus=2")->sum("helpGetCount"); // $count -= DB::table("hyh_orders")->where("helpUserId='$fromUsers' and helpUserLevel='$level' and orderStatus=2")->sum("helpGetCount2"); - return round($count, 2); + return round($count-$minus, 2); } public static function realGetLevelsDownBetween($fromUser, $toUser, $level=0){