房间流水详情
This commit is contained in:
@@ -154,12 +154,12 @@ class GiveGiftBase extends Model
|
||||
public function getGiftRecords($where = [], $options = [])
|
||||
{
|
||||
$defaultOptions = [
|
||||
'fields' => '*',
|
||||
'order' => 'createtime desc',
|
||||
'page' => 1,
|
||||
'limit' => 20,
|
||||
'start_time'=> null,
|
||||
'end_time' => null,
|
||||
'fields' => '*',
|
||||
'order' => 'createtime desc',
|
||||
'page' => 1,
|
||||
'limit' => 20,
|
||||
'start_time' => null,
|
||||
'end_time' => null,
|
||||
];
|
||||
|
||||
$options = array_merge($defaultOptions, $options);
|
||||
@@ -191,13 +191,13 @@ class GiveGiftBase extends Model
|
||||
$conditions = [];
|
||||
|
||||
$fieldMap = [
|
||||
'user_id' => 'user_id',
|
||||
'gift_user' => 'gift_user',
|
||||
'from_id' => 'from_id',
|
||||
'gift_id' => 'gift_id',
|
||||
'type' => 'type',
|
||||
'from' => 'from',
|
||||
'gift_type' => 'gift_type',
|
||||
'user_id' => 'user_id',
|
||||
'gift_user' => 'gift_user',
|
||||
'from_id' => 'from_id',
|
||||
'gift_id' => 'gift_id',
|
||||
'type' => 'type',
|
||||
'from' => 'from',
|
||||
'gift_type' => 'gift_type',
|
||||
'createtime' => 'createtime',
|
||||
];
|
||||
|
||||
@@ -276,7 +276,7 @@ class GiveGiftBase extends Model
|
||||
$data = [];
|
||||
if ($total > 0) {
|
||||
$offset = ($options['page'] - 1) * $options['limit'];
|
||||
$dataSql = "{$unionSql} ORDER BY {$options['order']} DESC LIMIT {$offset}, {$options['limit']}";
|
||||
$dataSql = "{$unionSql} ORDER BY {$options['order']} LIMIT {$offset}, {$options['limit']}";
|
||||
|
||||
try {
|
||||
$data = Db::query($dataSql, $params);
|
||||
@@ -288,8 +288,8 @@ class GiveGiftBase extends Model
|
||||
|
||||
return [
|
||||
'total' => $total,
|
||||
'data' => $data,
|
||||
'page' => $options['page'],
|
||||
'data' => $data,
|
||||
'page' => $options['page'],
|
||||
'limit' => $options['limit']
|
||||
];
|
||||
}
|
||||
@@ -303,9 +303,9 @@ class GiveGiftBase extends Model
|
||||
public function getGiftStatistics($where = [], $options = [])
|
||||
{
|
||||
$defaultOptions = [
|
||||
'group_by' => null, // 分组字段
|
||||
'group_by' => null, // 分组字段
|
||||
'start_time' => null,
|
||||
'end_time' => null,
|
||||
'end_time' => null,
|
||||
];
|
||||
|
||||
$options = array_merge($defaultOptions, $options);
|
||||
|
||||
Reference in New Issue
Block a user