同步扣除

This commit is contained in:
Jerry Yan 2020-12-24 12:21:48 +08:00
parent 1731aced5b
commit 92875784d8

View File

@ -54,8 +54,9 @@ class UserTrees extends Base
public static function realGetUsersHelpSaleNum($fromUsers, $level){ public static function realGetUsersHelpSaleNum($fromUsers, $level){
$count = DB::table("hyh_orders")->where("userId='$fromUsers' and helpUserLevel='$level' and orderStatus=2")->sum("helpGetCount"); $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"); // $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){ public static function realGetLevelsDownBetween($fromUser, $toUser, $level=0){