title = '已投项目管理'; $query = $this->_query($this->table)->alias('i')->field('i.*,u.phone,u.name'); $query->join('lc_user u','i.uid=u.id')->equal('i.type1#i_type1')->like('i.title#i_title,u.phone#u_phone')->dateBetween('i.time#i_time')->order('i.id desc')->page(); } /** * 数据列表处理 * @param array $data * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ protected function _index_page_filter(&$data) { $this->tlist = Db::name('LcItemType')->select(); $this->profit = sprintf("%.2f",Db::name('LcInvestList')->where("status = 1 AND pay1 > 0")->sum('pay1')); $this->un_profit = sprintf("%.2f",Db::name('LcInvestList')->where("status = 0 AND pay1 > 0")->sum('pay1')); } }