|
|
@ -34,12 +34,12 @@ class SpendModel extends Model
|
|
|
|
array('order_number', '', self::MODEL_INSERT),
|
|
|
|
array('order_number', '', self::MODEL_INSERT),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
protected function _after_select(&$result, $options)
|
|
|
|
// protected function _after_select(&$result, $options)
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
foreach ($result as $key => $value) {
|
|
|
|
// foreach ($result as $key => $value) {
|
|
|
|
// $result[$key]['pay_way'] = date('Y-m-d ', $value['time']);
|
|
|
|
// // $result[$key]['pay_way'] = date('Y-m-d ', $value['time']);
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 构造函数
|
|
|
|
* 构造函数
|
|
|
@ -51,6 +51,11 @@ class SpendModel extends Model
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* 设置默认的表前缀 */
|
|
|
|
/* 设置默认的表前缀 */
|
|
|
|
$this->tablePrefix = 'tab_';
|
|
|
|
$this->tablePrefix = 'tab_';
|
|
|
|
|
|
|
|
if(is_subsiteTable("tab_spend")){
|
|
|
|
|
|
|
|
//修改连接
|
|
|
|
|
|
|
|
$this->connection = SUBSITE_DB;
|
|
|
|
|
|
|
|
$connection = SUBSITE_DB;
|
|
|
|
|
|
|
|
}
|
|
|
|
/* 执行构造方法 */
|
|
|
|
/* 执行构造方法 */
|
|
|
|
parent::__construct($name, $tablePrefix, $connection);
|
|
|
|
parent::__construct($name, $tablePrefix, $connection);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -796,12 +801,12 @@ class SpendModel extends Model
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$row = 10;
|
|
|
|
$row = 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$list = $this->db(1)
|
|
|
|
$list = $this
|
|
|
|
->where($map)
|
|
|
|
->where($map)
|
|
|
|
->page($page, $row)
|
|
|
|
->page($page, $row)
|
|
|
|
->order($order ? $order : 'pay_time desc')
|
|
|
|
->order($order ? $order : 'pay_time desc')
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
$count = $this->db(1)->where($map)->count();
|
|
|
|
$count = $this->where($map)->count();
|
|
|
|
$data['data'] = $list;
|
|
|
|
$data['data'] = $list;
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
if ($page) {
|
|
|
|
if ($page) {
|
|
|
|