refactor(work): remove BaseAuth enterprise wechat dao dependency
Made-with: Cursor
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user