Files
douba_shop/app/dao/system/AppVersionDao.php
Karlcarlo c9a98f342c chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材
添加系统版本配置文件(.version)和常量定义文件(.constant)
更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件
添加验证码配置文件(captcha.php)和.gitignore规则
2026-03-06 20:14:23 +08:00

69 lines
1.7 KiB
PHP

<?php
namespace app\dao\system;
use app\dao\BaseDao;
use app\model\system\AppVersion;
class AppVersionDao extends BaseDao
{
/**
* 设置模型名
* @return string
*/
protected function setModel(): string
{
return AppVersion::class;
}
/**
* 获取条件模型
* @param $where
* @return \crmeb\basic\BaseModel
* @author wuhaotian
* @email 442384644@qq.com
* @date 2025/7/4
*/
public function getConditionModel($where)
{
return $this->getModel()->when($where['platform'] != '', function ($query) use ($where) {
$query->where('platform', $where['platform']);
});
}
/**
* 版本列表
* @param $where
* @param int $page
* @param int $limit
* @param string $order
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author wuhaotian
* @email 442384644@qq.com
* @date 2025/7/4
*/
public function versionList($where, $page = 0, $limit = 0, $order = 'id desc')
{
return $this->getConditionModel($where)->order('id desc')->when($page != 0, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->order($order)->select()->toArray();
}
/**
* 获取版本数量
* @param $where
* @return int
* @throws \think\db\exception\DbException
* @author wuhaotian
* @email 442384644@qq.com
* @date 2025/7/4
*/
public function versionCount($where)
{
return $this->getConditionModel($where)->count();
}
}