更新内核
This commit is contained in:
@@ -12,7 +12,7 @@ namespace app\common\model;
|
||||
/**
|
||||
* 设置模型
|
||||
*/
|
||||
class Document extends \think\Model{
|
||||
class Document extends Base{
|
||||
|
||||
protected $fk = 'doc_id';
|
||||
protected $pk = 'id';
|
||||
@@ -72,9 +72,18 @@ class Document extends \think\Model{
|
||||
public function extend($name){
|
||||
$name = strtoupper($name);
|
||||
$this->join('__DOCUMENT_' . $name . '__', $this->fk . '=' . $this->pk, 'LEFT');
|
||||
$this->dao = $this->db()->alias('d')
|
||||
->join('__DOCUMENT_' . $name . '__ dc', 'dc.' . $this->fk . '= d.' . $this->pk, 'RIGHT');
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function lists($map, $order){
|
||||
$list = $this->dao->where($map)->order($order)->paginate(15, false, array(
|
||||
'query' => $this->param,
|
||||
));
|
||||
return $list;
|
||||
}
|
||||
|
||||
public function change(){
|
||||
/* 获取数据对象 */
|
||||
$data = \think\Request::instance()->post();
|
||||
|
||||
Reference in New Issue
Block a user