refactor(work): remove BaseAuth enterprise wechat dao dependency

Made-with: Cursor
This commit is contained in:
apple
2026-04-29 17:20:23 +08:00
parent 02bdc41ff8
commit fe72924111
6 changed files with 31 additions and 28 deletions

View File

@@ -8,7 +8,7 @@ namespace app\dao\work;
use app\dao\BaseDao;
use app\model\work\WorkClient;
use crmeb\basic\BaseAuth;
use app\services\dao\SearchConditionBuilder;
use crmeb\basic\BaseModel;
use crmeb\traits\SearchDaoTrait;
use think\db\exception\DbException;
@@ -38,13 +38,7 @@ class WorkClientDao extends BaseDao
*/
public function searchWhere(array $where, bool $authWhere = true)
{
[$with, $whereKey] = app()->make(BaseAuth::class)->________(array_keys($where), $this->setModel());
$whereData = [];
foreach ($whereKey as $key) {
if (isset($where[$key])) {
$whereData[$key] = $where[$key];
}
}
[$with] = app()->make(SearchConditionBuilder::class)->build(array_keys($where), $this->setModel());
return $this->getModel()->withSearch($with, $where)->when(!empty($where['label']) || !empty($where['notLabel']), function ($query) use ($where) {
$query->whereIn('id', function ($query) use ($where) {