|
@@ -63,6 +63,11 @@ class UserBill extends BaseModel
|
|
|
{
|
|
|
$where = null;
|
|
|
if($pm>-1) $where['pm'] = $pm;
|
|
|
+ $count = self::where('uid', $uid)
|
|
|
+ ->where('category', $category)->where($where)
|
|
|
+ ->field('mark,pm,number,add_time')
|
|
|
+ ->where('status', 1)
|
|
|
+ ->order('add_time DESC')->count();
|
|
|
if ($page) {
|
|
|
$list = self::where('uid', $uid)
|
|
|
->where('category', $category)->where($where)
|
|
@@ -79,13 +84,12 @@ class UserBill extends BaseModel
|
|
|
->order('add_time DESC')
|
|
|
->select();
|
|
|
}
|
|
|
- echo self::getLastSql();
|
|
|
$list = count($list) ? $list->toArray() : [];
|
|
|
foreach ($list as &$v) {
|
|
|
$v['add_time'] = date('Y/m/d H:i', $v['add_time']);
|
|
|
$v['number'] = floatval($v['number']);
|
|
|
}
|
|
|
- return $list;
|
|
|
+ return compact('count','list');
|
|
|
}
|
|
|
|
|
|
/**
|