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