Goods.php
776 字节
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019/10/23
* Time: 10:09
*/
namespace app\home\model;
use think\Model;
class Goods extends Model
{
public function selectPageData($where,$page,$pageNum){
$where['start_time'] = ['lt',time()];
$where['end_time'] = ['gt',time()];
$where['status'] = ['eq',2];
$where['user_is_up'] = ['eq',1];
$where['admin_is_up'] = ['eq',1];
$where['user_deletetime'] = ['eq',0];
$where['admin_deletetime'] = ['eq',0];
$data = $this->where($where)->order('exp desc,end_time asc')->page($page,$pageNum)->select();
return $data;
}
public function findData($where){
$data = $this->where($where)->find();
return $data;
}
}