Commit f4b47403 authored by hujun's avatar hujun

model

parent 4390267a
<?php
/**
* Created by PhpStorm.
* User: 43897
* Date: 2019/7/17
* Time: 16:50
*/
namespace app\index\controller;
use app\index\extend\Basic;
class Cost extends Basic
{
public function getCostList() {
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
}
}
\ No newline at end of file
<?php
namespace app\model;
use think\Db;
use think\Model;
class FApplyForFee extends BaseModel
{
protected $table = 'f_apply_for_fee';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 新增数据
* @param $data
* @return mixed
*/
public function saveOffice($data) {
$time = date("Y-m-d H:i:s", time());
$data["is_del"] = 0;
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->db_->insert($data);
}
/**
* 查询单条数据
* 朱伟 2018-10-18 10:41:10
*/
public function findByOne($field,$params) {
$result = $this->db_
->field($field)
->where($params)
->find();
return $result;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class FApplyForFeeCheck extends BaseModel
{
protected $table = 'f_apply_for_fee_check';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 新增数据
* @param $data
* @return mixed
*/
public function saveOffice($data) {
$time = date("Y-m-d H:i:s", time());
$data["is_del"] = 0;
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->db_->insert($data);
}
/**
* 查询单条数据
* 朱伟 2018-10-18 10:41:10
*/
public function findByOne($field,$params) {
$result = $this->db_
->field($field)
->where($params)
->find();
return $result;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class FCompanyData extends BaseModel
{
protected $table = 'f_company_data';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 新增数据
* @param $data
* @return mixed
*/
public function saveOffice($data) {
$time = date("Y-m-d H:i:s", time());
$data["is_del"] = 0;
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->db_->insert($data);
}
/**
* 查询单条数据
* 朱伟 2018-10-18 10:41:10
*/
public function findByOne($field,$params) {
$result = $this->db_
->field($field)
->where($params)
->find();
return $result;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class FImg extends BaseModel
{
protected $table = 'f_imgs';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 新增数据
* @param $data
* @return mixed
*/
public function saveOffice($data) {
$time = date("Y-m-d H:i:s", time());
$data["is_del"] = 0;
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->db_->insert($data);
}
/**
* 查询单条数据
* 朱伟 2018-10-18 10:41:10
*/
public function findByOne($field,$params) {
$result = $this->db_
->field($field)
->where($params)
->find();
return $result;
}
}
<?php
namespace app\model;
use think\Db;
use think\Model;
class FSettingLog extends BaseModel
{
protected $table = 'f_setting_log';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::name($this->table);
}
/**
* 新增数据
* @param $data
* @return mixed
*/
public function saveOffice($data) {
$time = date("Y-m-d H:i:s", time());
$data["is_del"] = 0;
$data['create_time'] = $time;
$data['update_time'] = $time;
return $this->db_->insert($data);
}
/**
* 查询单条数据
* 朱伟 2018-10-18 10:41:10
*/
public function findByOne($field,$params) {
$result = $this->db_
->field($field)
->where($params)
->find();
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