소스 검색

Weenier 168otc项目部署 0630

wesmiler 3 년 전
부모
커밋
24d4052fdd
2개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 2
      app/Services/BaseService.php
  2. 1 1
      app/Services/Common/CoinLogService.php

+ 6 - 2
app/Services/BaseService.php

@@ -268,9 +268,13 @@ class BaseService
      * @param string $pk 键名
      * @param string $pk 键名
      * @return mixed
      * @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;
             return $result;
         }
         }
 
 
-        $result = parent::checkExists($field, $value, $pk);
+        $result = parent::checkExists($field, $value, $pk, 0);
         if($result){
         if($result){
             RedisService::set($cacheKey, $result, rand(3,5));
             RedisService::set($cacheKey, $result, rand(3,5));
         }
         }