66 lines
2.2 KiB
PHP
Executable File
66 lines
2.2 KiB
PHP
Executable File
<?php
|
||
|
||
// +----------------------------------------------------------------------
|
||
// | ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
// | 版权所有 2014~2019 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
|
||
// +----------------------------------------------------------------------
|
||
// | 官方网站: http://demo.thinkadmin.top
|
||
// +----------------------------------------------------------------------
|
||
// | 开源协议 ( https://mit-license.org )
|
||
// +----------------------------------------------------------------------
|
||
// | gitee 代码仓库3:https://gitee.com/zoujingli/ThinkAdmin
|
||
// | github 代码仓库3:https://github.com/zoujingli/ThinkAdmin
|
||
// +----------------------------------------------------------------------
|
||
|
||
namespace app\akszadmin\controller;
|
||
|
||
use library\Controller;
|
||
use think\Db;
|
||
|
||
/**
|
||
* 还款详情
|
||
* Class Item
|
||
* @package app\akszadmin\controller
|
||
*/
|
||
class MallInvestList extends Controller
|
||
{
|
||
/**
|
||
* 绑定数据表
|
||
* @var string
|
||
*/
|
||
protected $table = 'LcMallInvestList';
|
||
|
||
/**
|
||
* 还款详情
|
||
* @auth true
|
||
* @menu true
|
||
* @throws \think\Exception
|
||
* @throws \think\db\exception\DataNotFoundException
|
||
* @throws \think\db\exception\ModelNotFoundException
|
||
* @throws \think\exception\DbException
|
||
* @throws \think\exception\PDOException
|
||
*/
|
||
public function index()
|
||
{
|
||
$this->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.iid#i_iid')->like('i.title#i_title,u.phone#u_phone')->dateBetween('i.time1#i_time1')->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->refund = sprintf("%.2f",Db::name('LcInvestList')->where("status = 1 AND pay1 > 0")->sum('pay1'));
|
||
foreach($data as &$vo){
|
||
if($vo['status'] == '0') $vo['time2'] = '挖矿中';
|
||
}
|
||
}
|
||
}
|