123456789101112131415161718192021222324252627 |
- <?php
- namespace catchAdmin\device\model\search;
- use catchAdmin\system\model\SysDictData;
- use Exception;
- use think\facade\Db;
- trait DeviceSearch
- {
- /**
- * 根据部门搜索
- */
- public function searchNameAttr($query, $value, $data)
- {
- return $query->where('DEVICE_NAME', 'like', '%'.$value.'%');
- }
- /**
- * 根据imei搜索
- */
- public function searchShortCodeAttr($query, $value, $data)
- {
- return $query->where('DEVICE_CODE', 'like', '%'.$value.'%');
- }
-
- }
|