refactor(dao): remove BaseAuth search dependency

Made-with: Cursor
This commit is contained in:
apple
2026-04-29 17:09:08 +08:00
parent bbeb8bc6b6
commit 083c51ed7e
3 changed files with 86 additions and 2 deletions

View File

@@ -5,8 +5,8 @@
namespace crmeb\traits;
use app\services\dao\SearchConditionBuilder;
use app\dao\BaseDao;
use crmeb\basic\BaseAuth;
use crmeb\basic\BaseModel;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
@@ -28,7 +28,7 @@ trait SearchDaoTrait
*/
public function searchWhere(array $where, bool $authWhere = true)
{
[$with, $whereKey] = app()->make(BaseAuth::class)->________(array_keys($where), $this->setModel());
[$with, $whereKey] = app()->make(SearchConditionBuilder::class)->build(array_keys($where), $this->setModel());
$whereData = [];
foreach ($whereKey as $key) {
if (isset($where[$key]) && 'timeKey' !== $key) {