Prechádzať zdrojové kódy

Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

From-wh 2 rokov pred
rodič
commit
d4e3744e11

+ 4 - 4
crmeb/app/adminapi/controller/Common.php

@@ -235,28 +235,28 @@ class Common extends AuthController
         if ($data['ordernum'] != 0) {
         if ($data['ordernum'] != 0) {
             $value[] = [
             $value[] = [
                 'title' => "您有$data[ordernum]个待发货的订单",
                 'title' => "您有$data[ordernum]个待发货的订单",
-                'type' => 'bulb',
+                'type' => 1,
                 'url' => '/admin/order/list?status=1'
                 'url' => '/admin/order/list?status=1'
             ];
             ];
         }
         }
         if ($data['inventory'] != 0) {
         if ($data['inventory'] != 0) {
             $value[] = [
             $value[] = [
                 'title' => "您有$data[inventory]个商品库存预警",
                 'title' => "您有$data[inventory]个商品库存预警",
-                'type' => 'information',
+                'type' => 2,
                 'url' => '/admin/product/product_list?type=5',
                 'url' => '/admin/product/product_list?type=5',
             ];
             ];
         }
         }
         if ($data['commentnum'] != 0) {
         if ($data['commentnum'] != 0) {
             $value[] = [
             $value[] = [
                 'title' => "您有$data[commentnum]条评论待回复",
                 'title' => "您有$data[commentnum]条评论待回复",
-                'type' => 'bulb',
+                'type' => 3,
                 'url' => '/admin/product/product_reply?is_reply=0'
                 'url' => '/admin/product/product_reply?is_reply=0'
             ];
             ];
         }
         }
         if ($data['reflectnum'] != 0) {
         if ($data['reflectnum'] != 0) {
             $value[] = [
             $value[] = [
                 'title' => "您有$data[reflectnum]个提现申请待审核",
                 'title' => "您有$data[reflectnum]个提现申请待审核",
-                'type' => 'bulb',
+                'type' => 4,
                 'url' => '/admin/finance/user_extract/index?status=0',
                 'url' => '/admin/finance/user_extract/index?status=0',
             ];
             ];
         }
         }

+ 1 - 1
crmeb/app/api/controller/v1/user/UserRechargeController.php

@@ -53,7 +53,7 @@ class UserRechargeController
         $uid = (int)$request->uid();
         $uid = (int)$request->uid();
         $re = $this->services->recharge($uid, $price, $recharId, $type, $from, true);
         $re = $this->services->recharge($uid, $price, $recharId, $type, $from, true);
         if ($re) {
         if ($re) {
-            $payType = $re['pay_type'];
+            $payType = $re['pay_type'] ?? '';
             unset($re['pay_type']);
             unset($re['pay_type']);
             return app('json')->status($payType, 410125, $re);
             return app('json')->status($payType, 410125, $re);
         }
         }

+ 10 - 5
crmeb/app/dao/BaseDao.php

@@ -309,7 +309,9 @@ abstract class BaseDao
             if ($responses->hasMethod($method)) {
             if ($responses->hasMethod($method)) {
                 $with[] = $key;
                 $with[] = $key;
             } else {
             } else {
-                $otherWhere[] = $value;
+                if ($key != 'timeKey') {
+                    $otherWhere[] = $value;
+                }
             }
             }
         }
         }
         return [$with, $otherWhere];
         return [$with, $otherWhere];
@@ -324,25 +326,28 @@ abstract class BaseDao
      * @email 442384644@qq.com
      * @email 442384644@qq.com
      * @date 2023/03/18
      * @date 2023/03/18
      */
      */
-    protected function withSearchSelect($where)
+    protected function withSearchSelect($where, $search)
     {
     {
         [$with, $otherWhere] = $this->getSearchData($where);
         [$with, $otherWhere] = $this->getSearchData($where);
-        return $this->getModel()->withSearch($with, $where)->where($otherWhere);
+        return $this->getModel()->withSearch($with, $where)->when($search, function ($query) use ($otherWhere) {
+            $query->where($otherWhere);
+        });
     }
     }
 
 
     /**
     /**
      * 搜索
      * 搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return BaseModel
      * @return BaseModel
      * @throws \ReflectionException
      * @throws \ReflectionException
      * @author 吴汐
      * @author 吴汐
      * @email 442384644@qq.com
      * @email 442384644@qq.com
      * @date 2023/03/18
      * @date 2023/03/18
      */
      */
-    protected function search(array $where = [])
+    public function search(array $where = [], bool $search = true)
     {
     {
         if ($where) {
         if ($where) {
-            return $this->withSearchSelect($where);
+            return $this->withSearchSelect($where, $search);
         } else {
         } else {
             return $this->getModel();
             return $this->getModel();
         }
         }

+ 10 - 3
crmeb/app/dao/activity/combination/StoreCombinationDao.php

@@ -35,11 +35,13 @@ class StoreCombinationDao extends BaseDao
     /**
     /**
      * 搜索
      * 搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['pinkIngTime']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['pinkIngTime']), function ($query) use ($where) {
             $time = time();
             $time = time();
             [$startTime, $stopTime] = is_array($where['pinkIngTime']) ? $where['pinkIngTime'] : [$time, $time];
             [$startTime, $stopTime] = is_array($where['pinkIngTime']) ? $where['pinkIngTime'] : [$time, $time];
             $query->where('start_time', '<=', $startTime)->where('stop_time', '>=', $stopTime);
             $query->where('start_time', '<=', $startTime)->where('stop_time', '>=', $stopTime);
@@ -100,6 +102,7 @@ class StoreCombinationDao extends BaseDao
                 $query->page($page, $limit);
                 $query->page($page, $limit);
             })->order('sort desc,id desc')->select()->toArray();
             })->order('sort desc,id desc')->select()->toArray();
     }
     }
+
     /**获取列表
     /**获取列表
      * @param array $where
      * @param array $where
      * @param int $page
      * @param int $page
@@ -164,6 +167,7 @@ class StoreCombinationDao extends BaseDao
     {
     {
         return $this->search($where)->with('getPrice')->page($page, $limit)->order('sort desc,id desc')->select()->toArray();
         return $this->search($where)->with('getPrice')->page($page, $limit)->order('sort desc,id desc')->select()->toArray();
     }
     }
+
     /**
     /**
      * 条件获取数量
      * 条件获取数量
      * @param array $where
      * @param array $where
@@ -173,6 +177,7 @@ class StoreCombinationDao extends BaseDao
     {
     {
         return $this->search($where)->count();
         return $this->search($where)->count();
     }
     }
+
     /**
     /**
      * 页面设计获取商拼团列表
      * 页面设计获取商拼团列表
      * @param array $where
      * @param array $where
@@ -183,9 +188,11 @@ class StoreCombinationDao extends BaseDao
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\DbException
      * @throws \think\db\exception\ModelNotFoundException
      * @throws \think\db\exception\ModelNotFoundException
      */
      */
-    public function diyCombinationList(array $where, int $page, int $limit){
+    public function diyCombinationList(array $where, int $page, int $limit)
+    {
         return $this->search($where)->with('getCategory')->page($page, $limit)->order('sort desc,id desc')->select()->toArray();
         return $this->search($where)->with('getCategory')->page($page, $limit)->order('sort desc,id desc')->select()->toArray();
     }
     }
+
     /**
     /**
      * 根据id获取拼团数据
      * 根据id获取拼团数据
      * @param array $ids
      * @param array $ids

+ 4 - 2
crmeb/app/dao/activity/coupon/StoreCouponIssueDao.php

@@ -34,11 +34,13 @@ class StoreCouponIssueDao extends BaseDao
 
 
     /**
     /**
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['type']) && $where['type'] != '', function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['type']) && $where['type'] != '', function ($query) use ($where) {
             if ($where['type'] == 'send') {
             if ($where['type'] == 'send') {
                 $query->where('receive_type', 3)->where(function ($query1) {
                 $query->where('receive_type', 3)->where(function ($query1) {
                     $query1->where(function ($query2) {
                     $query1->where(function ($query2) {

+ 4 - 2
crmeb/app/dao/activity/integral/StoreIntegralOrderDao.php

@@ -40,15 +40,17 @@ class StoreIntegralOrderDao extends BaseDao
     /**
     /**
      * 订单搜索
      * 订单搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
         $isDel = isset($where['is_del']) && $where['is_del'] !== '' && $where['is_del'] != -1;
         $isDel = isset($where['is_del']) && $where['is_del'] !== '' && $where['is_del'] != -1;
         $realName = $where['real_name'] ?? '';
         $realName = $where['real_name'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
-        return parent::search($where)->when($isDel, function ($query) use ($where) {
+        return parent::search($where, $search)->when($isDel, function ($query) use ($where) {
             $query->where('is_del', $where['is_del']);
             $query->where('is_del', $where['is_del']);
         })->when(isset($where['is_system_del']), function ($query) {
         })->when(isset($where['is_system_del']), function ($query) {
             $query->where('is_system_del', 0);
             $query->where('is_system_del', 0);

+ 15 - 5
crmeb/app/dao/activity/lottery/LuckLotteryDao.php

@@ -32,13 +32,23 @@ class LuckLotteryDao extends BaseDao
         return LuckLottery::class;
         return LuckLottery::class;
     }
     }
 
 
-    public function search(array $data = [])
+    /**
+     * 抽奖搜索
+     * @param array $data
+     * @param bool $search
+     * @return \crmeb\basic\BaseModel
+     * @throws \ReflectionException
+     * @author 吴汐
+     * @email 442384644@qq.com
+     * @date 2023/03/20
+     */
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($data)->when(isset($data['id']) && $data['id'], function ($query) use ($data) {
-            $query->where('id', $data['id']);
-        })->when(isset($data['start']) && $data['start'] !== '', function ($query) use ($data) {
+        return parent::search($where, $search)->when(isset($where['id']) && $where['id'], function ($query) use ($where) {
+            $query->where('id', $where['id']);
+        })->when(isset($where['start']) && $where['start'] !== '', function ($query) use ($where) {
             $time = time();
             $time = time();
-            switch ($data['start']) {
+            switch ($where['start']) {
                 case 0:
                 case 0:
                     $query->where('start_time', '>', $time)->where('status', 1);
                     $query->where('start_time', '>', $time)->where('status', 1);
                     break;
                     break;

+ 4 - 2
crmeb/app/dao/activity/seckill/StoreSeckillDao.php

@@ -35,11 +35,13 @@ class StoreSeckillDao extends BaseDao
     /**
     /**
      * 搜索
      * 搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    protected function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['seckllTime']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['seckllTime']), function ($query) use ($where) {
             [$startTime, $stopTime] = is_array($where['seckllTime']) ? $where['seckllTime'] : [time(), time() - 86400];
             [$startTime, $stopTime] = is_array($where['seckllTime']) ? $where['seckllTime'] : [time(), time() - 86400];
             $query->where('start_time', '<=', $startTime)->where('stop_time', '>=', $stopTime);
             $query->where('start_time', '<=', $startTime)->where('stop_time', '>=', $stopTime);
         })->when(isset($where['sid']) && $where['sid'], function ($query) use ($where) {
         })->when(isset($where['sid']) && $where['sid'], function ($query) use ($where) {

+ 12 - 2
crmeb/app/dao/article/ArticleDao.php

@@ -30,9 +30,19 @@ class ArticleDao extends BaseDao
         return Article::class;
         return Article::class;
     }
     }
 
 
-    public function search(array $where = [])
+    /**
+     * 文章搜索
+     * @param array $where
+     * @param bool $search
+     * @return \crmeb\basic\BaseModel
+     * @throws \ReflectionException
+     * @author 吴汐
+     * @email 442384644@qq.com
+     * @date 2023/03/20
+     */
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['ids']) && count($where['ids']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['ids']) && count($where['ids']), function ($query) use ($where) {
             $query->whereNotIn('id', $where['ids']);
             $query->whereNotIn('id', $where['ids']);
         });
         });
     }
     }

+ 19 - 9
crmeb/app/dao/order/OtherOrderDao.php

@@ -38,11 +38,11 @@ class OtherOrderDao extends BaseDao
     public function getPayUserCount(int $time, string $channel_type = '')
     public function getPayUserCount(int $time, string $channel_type = '')
     {
     {
         return $this->getModel()->when($channel_type != '', function ($query) use ($channel_type) {
         return $this->getModel()->when($channel_type != '', function ($query) use ($channel_type) {
-                $query->where('channel_type', $channel_type);
-            })->field('distinct(uid),add_time')
-                ->group('uid')->having('add_time < ' . $time)
-                ->order('add_time desc')
-                ->select()->toArray();
+            $query->where('channel_type', $channel_type);
+        })->field('distinct(uid),add_time')
+            ->group('uid')->having('add_time < ' . $time)
+            ->order('add_time desc')
+            ->select()->toArray();
     }
     }
 
 
     /**
     /**
@@ -161,12 +161,22 @@ class OtherOrderDao extends BaseDao
             ->page($page, $limit)->select()->toArray();
             ->page($page, $limit)->select()->toArray();
     }
     }
 
 
-    public function search(array $where = [])
+    /**
+     * 其他订单搜索
+     * @param array $where
+     * @param bool $search
+     * @return \crmeb\basic\BaseModel
+     * @throws \ReflectionException
+     * @author 吴汐
+     * @email 442384644@qq.com
+     * @date 2023/03/20
+     */
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['name']) && $where['name'], function ($query) use($where){
-            $query->where('uid', 'in', function ($que) use($where){
+        return parent::search($where, $search)->when(isset($where['name']) && $where['name'], function ($query) use ($where) {
+            $query->where('uid', 'in', function ($que) use ($where) {
                 $nickname = trim($where['name']);
                 $nickname = trim($where['name']);
-                $que->name('user')->where('nickname', 'like', $nickname.'%')->field(['uid'])->select();
+                $que->name('user')->where('nickname', 'like', $nickname . '%')->field(['uid'])->select();
             });
             });
         });
         });
     }
     }

+ 4 - 2
crmeb/app/dao/order/StoreCartDao.php

@@ -45,11 +45,13 @@ class StoreCartDao extends BaseDao
     /**
     /**
      * 搜索
      * 搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['id']) && $where['id'], function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['id']) && $where['id'], function ($query) use ($where) {
             $query->whereIn('id', $where['id']);
             $query->whereIn('id', $where['id']);
         })->when(isset($where['status']), function ($query) use ($where) {
         })->when(isset($where['status']), function ($query) use ($where) {
             //兼容之前老用户 数据库默认值null
             //兼容之前老用户 数据库默认值null

+ 4 - 2
crmeb/app/dao/order/StoreOrderDao.php

@@ -40,15 +40,17 @@ class StoreOrderDao extends BaseDao
     /**
     /**
      * 订单搜索
      * 订单搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
         $isDel = isset($where['is_del']) && $where['is_del'] !== '' && $where['is_del'] != -1;
         $isDel = isset($where['is_del']) && $where['is_del'] !== '' && $where['is_del'] != -1;
         $realName = $where['real_name'] ?? '';
         $realName = $where['real_name'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
-        return parent::search($where)->when($isDel, function ($query) use ($where) {
+        return parent::search($where, $search)->when($isDel, function ($query) use ($where) {
             $query->where('is_del', $where['is_del']);
             $query->where('is_del', $where['is_del']);
         })->when(isset($where['is_system_del']), function ($query) {
         })->when(isset($where['is_system_del']), function ($query) {
             $query->where('is_system_del', 0);
             $query->where('is_system_del', 0);

+ 12 - 2
crmeb/app/dao/order/StoreOrderInvoiceDao.php

@@ -33,14 +33,24 @@ class StoreOrderInvoiceDao extends BaseDao
         return StoreOrderInvoice::class;
         return StoreOrderInvoice::class;
     }
     }
 
 
-    public function search(array $where = [])
+    /**
+     * 发票搜索
+     * @param array $where
+     * @param bool $search
+     * @return \crmeb\basic\BaseModel
+     * @throws \ReflectionException
+     * @author 吴汐
+     * @email 442384644@qq.com
+     * @date 2023/03/20
+     */
+    public function search(array $where = [], bool $search = false)
     {
     {
         $realName = $where['real_name'] ?? '';
         $realName = $where['real_name'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
         $type = $where['type'] ?? '';
         $type = $where['type'] ?? '';
         unset($where['type']);
         unset($where['type']);
-        return parent::search($where)->when($type, function ($query) use ($type) {
+        return parent::search($where, $search)->when($type, function ($query) use ($type) {
             switch ($type) {
             switch ($type) {
                 case 1://待开
                 case 1://待开
                     $query->where('is_invoice', 0)->where('invoice_time', 0)->where('is_refund', 0);
                     $query->where('is_invoice', 0)->where('invoice_time', 0)->where('is_refund', 0);

+ 4 - 2
crmeb/app/dao/order/StoreOrderRefundDao.php

@@ -19,14 +19,16 @@ class StoreOrderRefundDao extends BaseDao
     /**
     /**
      * 搜索器
      * 搜索器
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
         $realName = $where['real_name'] ?? '';
         $realName = $where['real_name'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $where['field_key'] ?? '';
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
         $fieldKey = $fieldKey == 'all' ? '' : $fieldKey;
-        return parent::search($where)->when(isset($where['refund_type']) && $where['refund_type'] !== '', function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['refund_type']) && $where['refund_type'] !== '', function ($query) use ($where) {
             if ($where['refund_type'] == 0) {
             if ($where['refund_type'] == 0) {
                 $query->where('refund_type', '>', 0);
                 $query->where('refund_type', '>', 0);
             } else {
             } else {

+ 2 - 2
crmeb/app/dao/service/StoreServiceAuxiliaryDao.php

@@ -27,9 +27,9 @@ class StoreServiceAuxiliaryDao extends AuxiliaryDao
      * @param array $where
      * @param array $where
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      */
      */
-    protected function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->where('type', 0);
+        return parent::search($where, $search)->where('type', 0);
     }
     }
 
 
 }
 }

+ 4 - 2
crmeb/app/dao/system/attachment/SystemAttachmentCategoryDao.php

@@ -58,11 +58,13 @@ class SystemAttachmentCategoryDao extends BaseDao
     /**
     /**
      * 搜索附件分类search
      * 搜索附件分类search
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['id']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['id']), function ($query) use ($where) {
             $query->whereIn('id', $where['id']);
             $query->whereIn('id', $where['id']);
         });
         });
     }
     }

+ 5 - 2
crmeb/app/dao/system/config/SystemConfigDao.php

@@ -34,20 +34,23 @@ class SystemConfigDao extends BaseDao
      * 获取某个系统配置
      * 获取某个系统配置
      * @param string $configNmae
      * @param string $configNmae
      * @return mixed
      * @return mixed
+     * @throws \ReflectionException
      */
      */
     public function getConfigValue(string $configNmae)
     public function getConfigValue(string $configNmae)
     {
     {
-        return $this->withSearchSelect(['menu_name'], ['menu_name' => $configNmae])->value('value');
+        return $this->search(['menu_name' => $configNmae])->value('value');
     }
     }
 
 
     /**
     /**
      * 获取所有配置
      * 获取所有配置
+     * @param array $configName
      * @return array
      * @return array
+     * @throws \ReflectionException
      */
      */
     public function getConfigAll(array $configName = [])
     public function getConfigAll(array $configName = [])
     {
     {
         if ($configName) {
         if ($configName) {
-            return $this->withSearchSelect(['menu_name'], ['menu_name' => $configName])->column('value', 'menu_name');
+            return $this->search(['menu_name' => $configName])->column('value', 'menu_name');
         } else {
         } else {
             return $this->getModel()->column('value', 'menu_name');
             return $this->getModel()->column('value', 'menu_name');
         }
         }

+ 4 - 2
crmeb/app/dao/system/config/SystemStorageDao.php

@@ -64,11 +64,13 @@ class SystemStorageDao extends BaseDao
 
 
     /**
     /**
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['type']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['type']), function ($query) use ($where) {
             $query->where('type', $where['type']);
             $query->where('type', $where['type']);
         })->where('is_delete', 0)->when(isset($where['access_key']), function ($query) use ($where) {
         })->where('is_delete', 0)->when(isset($where['access_key']), function ($query) use ($where) {
             $query->where('access_key', $where['access_key']);
             $query->where('access_key', $where['access_key']);

+ 4 - 2
crmeb/app/dao/user/UserBrokerageFrozenDao.php

@@ -34,11 +34,13 @@ class UserBrokerageFrozenDao extends BaseDao
     /**
     /**
      * 搜索
      * 搜索
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
      * @return \crmeb\basic\BaseModel|mixed|\think\Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['isFrozen']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['isFrozen']), function ($query) use ($where) {
             if ($where['isFrozen']) {
             if ($where['isFrozen']) {
                 $query->where('frozen_time', '>', time());
                 $query->where('frozen_time', '>', time());
             } else {
             } else {

+ 4 - 2
crmeb/app/dao/wechat/WechatKeyDao.php

@@ -31,11 +31,13 @@ class WechatKeyDao extends BaseDao
     /**
     /**
      * 搜索器
      * 搜索器
      * @param array $where
      * @param array $where
+     * @param bool $search
      * @return \crmeb\basic\BaseModel|mixed|Model
      * @return \crmeb\basic\BaseModel|mixed|Model
+     * @throws \ReflectionException
      */
      */
-    public function search(array $where = [])
+    public function search(array $where = [], bool $search = false)
     {
     {
-        return parent::search($where)->when(isset($where['id']), function ($query) use ($where) {
+        return parent::search($where, $search)->when(isset($where['id']), function ($query) use ($where) {
             $query->where('id', $where['id']);
             $query->where('id', $where['id']);
         });
         });
     }
     }