| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- // +----------------------------------------------------------------------
- // | likeadmin快速开发前后端分离管理后台(PHP版)
- // +----------------------------------------------------------------------
- // | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
- // | 开源版本可自由商用,可去除界面版权logo
- // | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
- // | github下载:https://github.com/likeshop-github/likeadmin
- // | 访问官网:https://www.likeadmin.cn
- // | likeadmin团队 版权所有 拥有最终解释权
- // +----------------------------------------------------------------------
- // | author: likeadminTeam
- // +----------------------------------------------------------------------
- namespace app\adminapi\lists\asset;
- use app\adminapi\lists\BaseAdminDataLists;
- use app\common\lists\ListsSearchInterface;
- use app\common\model\notice\NoticeSetting;
- use app\common\model\asset\AssetInfo;
- /**
- * 资产管理
- * Class AssetLists
- * @package app\adminapi\lists\asset
- */
- class AssetLists extends BaseAdminDataLists implements ListsSearchInterface
- {
- /**
- * @notes 搜索条件
- * @return \string[][]
- * @author
- * @date 2025/04/12 2:21 下午
- */
- public function setSearch(): array
- {
- return [
- '=' => ['name', 'status']
- ];
- }
- /**
- * @notes 资产信息列表
- * @return array
- * @throws \think\db\exception\DataNotFoundException
- * @throws \think\db\exception\DbException
- * @throws \think\db\exception\ModelNotFoundException
- * @author ljj
- * @date 2022/2/16 3:18 下午
- */
- public function lists(): array
- {
- $lists = (new AssetInfo())->field('id,name,address,images,contacts,mobile,area,content,status,create_time,sort')
- ->append(['status_desc'])
- ->where($this->searchWhere)
- ->limit($this->limitOffset, $this->limitLength)
- ->Order('sort desc')
- ->select()
- ->toArray();
- return $lists;
- }
- /**
- * @notes 资产信息数量
- * @return int
- * @author ljj
- * @date 2022/2/16 3:18 下午
- */
- public function count(): int
- {
- return (new AssetInfo())->where($this->searchWhere)->count();
- }
- }
|