You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
2.2 KiB
70 lines
2.2 KiB
<?php
|
|
/**
|
|
* +----------------------------------------------------------------------
|
|
* | 碎片管理模型
|
|
* +----------------------------------------------------------------------
|
|
* .::::.
|
|
* .::::::::. | AUTHOR: siyu
|
|
* ::::::::::: | EMAIL: 407593529@qq.com
|
|
* ..:::::::::::' | DATETIME: 2020/07/10
|
|
* '::::::::::::'
|
|
* .::::::::::
|
|
* '::::::::::::::..
|
|
* ..::::::::::::.
|
|
* ``::::::::::::::::
|
|
* ::::``:::::::::' .:::.
|
|
* ::::' ':::::' .::::::::.
|
|
* .::::' :::: .:::::::'::::.
|
|
* .:::' ::::: .:::::::::' ':::::.
|
|
* .::' :::::.:::::::::' ':::::.
|
|
* .::' ::::::::::::::' ``::::.
|
|
* ...::: ::::::::::::' ``::.
|
|
* ```` ':. ':::::::::' ::::..
|
|
* '.:::::' ':'````..
|
|
* +----------------------------------------------------------------------
|
|
*/
|
|
namespace app\common\model;
|
|
|
|
// 引入框架内置类
|
|
use think\facade\Request;
|
|
|
|
// 引入构建器
|
|
use app\common\facade\MakeBuilder;
|
|
|
|
class Debris extends Base
|
|
{
|
|
// 定义时间戳字段名
|
|
protected $createTime = 'create_time';
|
|
protected $updateTime = 'update_time';
|
|
|
|
|
|
|
|
|
|
// 获取列表
|
|
public static function getList($where = array(), $pageSize, $order = ['sort', 'id' => 'desc'])
|
|
{
|
|
$list = self::where($where)
|
|
->order($order)
|
|
->paginate([
|
|
'query' => Request::get(),
|
|
'list_rows' => $pageSize,
|
|
]);
|
|
foreach ($list as $k => $v) {
|
|
|
|
}
|
|
return MakeBuilder::changeTableData($list, 'Debris');
|
|
}
|
|
|
|
// 导出列表
|
|
public static function getExport($where = array(), $order = ['sort', 'id' => 'desc'])
|
|
{
|
|
$list = self::where($where)
|
|
->order($order)
|
|
->select();
|
|
foreach ($list as $k => $v) {
|
|
|
|
}
|
|
return MakeBuilder::changeTableData($list, 'Debris');
|
|
}
|
|
|
|
}
|