Commit daef6de1 authored by clone's avatar clone

1

parent de8ca5f4
......@@ -32,6 +32,8 @@ class UAccountBalance extends Model
{
$pageNo = empty($params['pageNo']) ? 0 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$indexStart = $pageNo * $pageSize;
$where_str = "";
if (!empty($params['create_time_start']) && !empty($params['create_time_end'])) {
$where_str .= " and a.create_time BETWEEN '" . $params['create_time_start'] . " 00:00:00' AND '" . $params['create_time_end'] . " 23:59:59'";
......@@ -48,7 +50,7 @@ class UAccountBalance extends Model
left join c_activity c on b.activity_id=c.id WHERE a.status = 0 and a.source_type = 0 $where_str) UNION
( SELECT a.id, a.user_id,0 as source_id , a.money, a.user_name, a.create_time, 2 AS is_essay,a.status,0 as title FROM `u_account_check` a
WHERE a.status IN ( 0, 1, 2 ) $where_str)
) AS aaa ORDER BY `create_time` DESC LIMIT {$pageNo}, {$pageSize}";
) AS aaa ORDER BY `create_time` DESC LIMIT {$indexStart}, {$pageSize}";
$result = $this->query($sql);
//echo $this->getLastSql();
return $result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment