Commit 69e7d879 authored by zhuwei's avatar zhuwei

新增站点模型

parent 96b6d393
<?php
namespace app\model;
use think\Model;
class ASite extends BaseModel
{
protected $table = 'a_site';
/**
* 新增数据
* 朱伟 2018-10-18 10:41:10
*/
public function saveSite($data) {
$time = date("Y-m-d h:i:sa", time());
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->insert($data);
}
/**
* 查询数据
* 朱伟 2018-10-18 10:41:10
*/
public function getSite($field,$params)
{
$result = $this
->field($field)
//->alias('a')
->where($params)
->select();
//dump($this->getLastSql());
return $result;
}
/**
* 更新数据
* 朱伟 2018-10-18 10:41:10
*/
public function updateSite($params)
{
$result = $this->update($params);
//dump($this->getLastSql());
return $result;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment