xieruidong 2 years ago
parent
commit
b854806f7a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      application/common/service/DiscountService.php

+ 3 - 3
application/common/service/DiscountService.php

@@ -4,15 +4,15 @@ namespace app\common\service;
 use app\common\model\SysConfig;
 
 class DiscountService{
-    public static function getById($id=null){
+    public static function getById($level=null){
         static $discount;
         if(is_null($discount)) {
             $discount = SysConfig::look('user_level_discount') ?: [];
         }
-        if(is_null($id)){
+        if(is_null($level)){
             return $discount;
         }
-        return $discount[$id]??null;
+        return $discount[$level]??null;
     }
     public static function saveDiscount($id,$discount){
         $config=self::getById();