You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.0 KiB
PHP
47 lines
1.0 KiB
PHP
<?php
|
|
namespace Site\Model;
|
|
|
|
use Think\Model;
|
|
|
|
/**
|
|
* 分类模型
|
|
* 鹿文学
|
|
*/
|
|
class SiteBaseModel extends Model{
|
|
|
|
protected $_validate = array(
|
|
|
|
);
|
|
|
|
protected $_auto = array(
|
|
|
|
);
|
|
|
|
/**
|
|
* 构造函数
|
|
* @param string $name 模型名称
|
|
* @param string $tablePrefix 表前缀
|
|
* @param mixed $connection 数据库连接信息
|
|
*/
|
|
public function __construct($name = '', $tablePrefix = '', $connection = '') {
|
|
/* 设置默认的表前缀 */
|
|
$this->tablePrefix ='tab_';
|
|
/* 执行构造方法 */
|
|
parent::__construct($name, $tablePrefix, $connection);
|
|
}
|
|
|
|
|
|
/**
|
|
* 获取详细信息
|
|
* @author 鹿文学
|
|
* @param integer 用户编号
|
|
* @return array 详情数据
|
|
*/
|
|
public function detail($account) {
|
|
|
|
return $this->field('tab_site_base.*,tab_site_apply.site_url')->join('tab_site_apply on tab_site_apply.promote_id=tab_site_base.promote_id','right')->where(array('tab_site_apply.promote_id'=>$account,'tab_site_apply.status'=>1))->find();
|
|
|
|
}
|
|
|
|
}
|