From c6f8ef070aacfd0405f65cf75a19960e851670f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Mon, 20 Mar 2023 15:54:18 +0800 Subject: [PATCH] =?UTF-8?q?search=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/dao/activity/integral/StoreIntegralDao.php | 2 +- crmeb/app/dao/agent/AgentLevelDao.php | 2 +- crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php | 2 +- crmeb/app/dao/service/StoreServiceAuxiliaryDao.php | 2 ++ crmeb/app/dao/service/StoreServiceDao.php | 2 +- crmeb/app/dao/system/config/SystemConfigDao.php | 1 + crmeb/app/dao/user/UserBillDao.php | 4 ++-- crmeb/app/dao/user/UserMoneyDao.php | 4 ++-- crmeb/app/dao/wechat/WechatReplyKeyDao.php | 2 +- 9 files changed, 12 insertions(+), 9 deletions(-) diff --git a/crmeb/app/dao/activity/integral/StoreIntegralDao.php b/crmeb/app/dao/activity/integral/StoreIntegralDao.php index be4751eba..94df3303b 100644 --- a/crmeb/app/dao/activity/integral/StoreIntegralDao.php +++ b/crmeb/app/dao/activity/integral/StoreIntegralDao.php @@ -54,7 +54,7 @@ class StoreIntegralDao extends BaseDao */ public function getList(array $where, int $page = 0, int $limit = 0, string $field = '*') { - return $this->search($where)->where('is_del', 0) + return $this->search($where, false)->where('is_del', 0) ->when(isset($where['integral_time']) && $where['integral_time'] !== '', function ($query) use ($where) { list($startTime, $endTime) = explode('-', $where['integral_time']); $query->where('add_time', '>', strtotime($startTime)) diff --git a/crmeb/app/dao/agent/AgentLevelDao.php b/crmeb/app/dao/agent/AgentLevelDao.php index f69960181..93549b987 100644 --- a/crmeb/app/dao/agent/AgentLevelDao.php +++ b/crmeb/app/dao/agent/AgentLevelDao.php @@ -46,7 +46,7 @@ class AgentLevelDao extends BaseDao */ public function getList(array $where = [], string $field = '*', array $with = [], int $page = 0, int $limit = 0, $grade = 0) { - return $this->search($where)->when($grade, function ($query) use ($grade) { + return $this->search($where, false)->when($grade, function ($query) use ($grade) { $query->where('grade', '>=', $grade); })->field($field)->when($with, function ($query) use ($with) { $query->with($with); diff --git a/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php b/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php index ec20f00cc..da9c54e7c 100644 --- a/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php +++ b/crmeb/app/dao/order/StoreOrderStoreOrderStatusDao.php @@ -59,7 +59,7 @@ class StoreOrderStoreOrderStatusDao extends BaseDao * @param array $where * @return \crmeb\basic\BaseModel|mixed|\think\Model */ - protected function search(array $where = []) + public function search(array $where = [], bool $search = false) { return $this->getModel()->when(isset($where['paid']), function ($query) use ($where) { $query->where($this->alias . '.paid', $where['paid']); diff --git a/crmeb/app/dao/service/StoreServiceAuxiliaryDao.php b/crmeb/app/dao/service/StoreServiceAuxiliaryDao.php index eca06987f..9924cb73b 100644 --- a/crmeb/app/dao/service/StoreServiceAuxiliaryDao.php +++ b/crmeb/app/dao/service/StoreServiceAuxiliaryDao.php @@ -25,7 +25,9 @@ class StoreServiceAuxiliaryDao extends AuxiliaryDao /** * 搜索 * @param array $where + * @param bool $search * @return \crmeb\basic\BaseModel|mixed|\think\Model + * @throws \ReflectionException */ public function search(array $where = [], bool $search = false) { diff --git a/crmeb/app/dao/service/StoreServiceDao.php b/crmeb/app/dao/service/StoreServiceDao.php index 65a3a4a6d..ab5d6566b 100644 --- a/crmeb/app/dao/service/StoreServiceDao.php +++ b/crmeb/app/dao/service/StoreServiceDao.php @@ -57,7 +57,7 @@ class StoreServiceDao extends BaseDao */ public function getServiceList(array $where, int $page, int $limit) { - return $this->search($where)->with('user')->when($page && $limit, function ($query) use ($page, $limit) { + return $this->search($where, false)->with('user')->when($page && $limit, function ($query) use ($page, $limit) { $query->page($page, $limit); })->when(isset($where['noId']), function ($query) use ($where) { $query->whereNotIn('uid', $where['noId']); diff --git a/crmeb/app/dao/system/config/SystemConfigDao.php b/crmeb/app/dao/system/config/SystemConfigDao.php index 3d17b5314..d093c2c23 100644 --- a/crmeb/app/dao/system/config/SystemConfigDao.php +++ b/crmeb/app/dao/system/config/SystemConfigDao.php @@ -91,6 +91,7 @@ class SystemConfigDao extends BaseDao * 获取上传配置中的上传类型 * @param string $configName * @return array + * @throws \ReflectionException */ public function getUploadTypeList(string $configName) { diff --git a/crmeb/app/dao/user/UserBillDao.php b/crmeb/app/dao/user/UserBillDao.php index 46cfa9ae3..26bb4aabe 100644 --- a/crmeb/app/dao/user/UserBillDao.php +++ b/crmeb/app/dao/user/UserBillDao.php @@ -242,7 +242,7 @@ class UserBillDao extends BaseDao */ public function getWhereSumField(array $where, string $field) { - return $this->search($where) + return $this->search($where, false) ->when(isset($where['timeKey']), function ($query) use ($where) { $query->whereBetweenTime('add_time', $where['timeKey']['start_time'], $where['timeKey']['end_time']); }) @@ -257,7 +257,7 @@ class UserBillDao extends BaseDao */ public function getGroupField(array $where, string $field, string $group) { - return $this->search($where) + return $this->search($where, false) ->when(isset($where['timeKey']), function ($query) use ($where, $field, $group) { $query->whereBetweenTime('add_time', $where['timeKey']['start_time'], $where['timeKey']['end_time']); $timeUinx = "%H"; diff --git a/crmeb/app/dao/user/UserMoneyDao.php b/crmeb/app/dao/user/UserMoneyDao.php index 5e49858cf..6f4c747e7 100644 --- a/crmeb/app/dao/user/UserMoneyDao.php +++ b/crmeb/app/dao/user/UserMoneyDao.php @@ -74,7 +74,7 @@ class UserMoneyDao extends BaseDao */ public function getWhereSumField(array $where, string $field) { - return $this->search($where) + return $this->search($where, false) ->when(isset($where['timeKey']), function ($query) use ($where) { $query->whereBetweenTime('add_time', $where['timeKey']['start_time'], $where['timeKey']['end_time']); }) @@ -93,7 +93,7 @@ class UserMoneyDao extends BaseDao */ public function getGroupField(array $where, string $field, string $group) { - return $this->search($where) + return $this->search($where, false) ->when(isset($where['timeKey']), function ($query) use ($where, $field, $group) { $query->whereBetweenTime('add_time', $where['timeKey']['start_time'], $where['timeKey']['end_time']); if ($where['timeKey']['days'] == 1) { diff --git a/crmeb/app/dao/wechat/WechatReplyKeyDao.php b/crmeb/app/dao/wechat/WechatReplyKeyDao.php index 0b8d9c668..633d53d82 100644 --- a/crmeb/app/dao/wechat/WechatReplyKeyDao.php +++ b/crmeb/app/dao/wechat/WechatReplyKeyDao.php @@ -74,7 +74,7 @@ class WechatReplyKeyDao extends BaseDao * @param bool $group * @return \crmeb\basic\BaseModel|mixed|Model */ - protected function search(array $where = []) + public function search(array $where = [], bool $search = false) { return $this->getModel()->when(isset($where['key']) && $where['key'], function ($query) use ($where) { $query->where($this->joinAlis . '.keys', 'LIKE', "%$where[key]%");