lizhen_gitee 2 лет назад
Родитель
Сommit
fddbfc88c1
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      application/common/library/Auth.php

+ 2 - 1
application/common/library/Auth.php

@@ -577,10 +577,11 @@ class Auth
             'have_paid' => ['gt',0],
         ];
         $order_price_sum = Db::name('unishop_order')->where($map)->sum('order_price');
+        $order_price_sum = $order_price_sum ?: 0;
 
         $score = model('wallet')->getWallet($this->id,'score');//积分
 
-        if($score >= $order_price_sum){
+        if($score >= $order_price_sum*2){
             return true;
         }