|
|
@@ -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);
|
|
|
}
|
|
|
|
|
|
/**
|