Procházet zdrojové kódy

Weenier 168otc项目部署 0630

wesmiler před 3 roky
rodič
revize
24d4052fdd

+ 6 - 2
app/Services/BaseService.php

@@ -268,9 +268,13 @@ class BaseService
      * @param string $pk 键名
      * @return mixed
      */
-    public function checkExists($field, $value, $pk='id')
+    public function checkExists($field, $value, $pk='id',$status=1)
     {
-        return $this->model->where([$field=> $value,'status'=>1,'mark'=>1])->value($pk);
+        $where = [$field=> $value,'status'=>$status,'mark'=>1];
+        if($status>0){
+            $where['status'] = $status;
+        }
+        return $this->model->where($where)->value($pk);
     }
 
     /**

+ 1 - 1
app/Services/Common/CoinLogService.php

@@ -116,7 +116,7 @@ class CoinLogService extends BaseService
             return $result;
         }
 
-        $result = parent::checkExists($field, $value, $pk);
+        $result = parent::checkExists($field, $value, $pk, 0);
         if($result){
             RedisService::set($cacheKey, $result, rand(3,5));
         }