|
@@ -24,7 +24,6 @@ abstract class BaseDao
|
|
|
{
|
|
|
|
|
|
use CacheDaoTrait;
|
|
|
-
|
|
|
|
|
|
* 当前表名别名
|
|
|
* @var string
|
|
@@ -67,12 +66,9 @@ abstract class BaseDao
|
|
|
* @param array $where
|
|
|
* @return int
|
|
|
*/
|
|
|
- public function getCount(array $where, $search = false)
|
|
|
+ public function getCount(array $where)
|
|
|
{
|
|
|
- if ($search) {
|
|
|
- return $this->search($where)->count();
|
|
|
- } else
|
|
|
- return $this->getModel()->where($where)->count();
|
|
|
+ return $this->getModel()->where($where)->count();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -232,11 +228,11 @@ abstract class BaseDao
|
|
|
return $this->getModel()::whereIn(is_null($key) ? $this->getPk() : $key, $ids)->update($data);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
* 批量更新数据,增加条件
|
|
|
* @param array $ids
|
|
|
* @param array $data
|
|
|
- * @param array $where
|
|
|
+ * @param array $where
|
|
|
* @param string|null $key
|
|
|
* @return BaseModel
|
|
|
*/
|