10
This commit is contained in:
@@ -170,12 +170,15 @@ class BalanceLog extends Base
|
||||
public static function queryLogs($userId, $currency, $type = null, $startTime = null, $endTime = null)
|
||||
{
|
||||
$model = new static;
|
||||
$query = $model->setSuffix('_'.strtolower($currency))->where('currency', $currency)
|
||||
$query = $model->setSuffix('_'.strtolower($currency))
|
||||
//->where('currency', $currency)
|
||||
->where('user_id', intval($userId))
|
||||
->order('created_at', 'desc');
|
||||
|
||||
if ($type) {
|
||||
$query->whereIn('type', $type);
|
||||
$temp_arr = explode(',', $type); // 得到 ["1", "2", "3", "4"]
|
||||
$arr = array_map('intval', $temp_arr); // 得到 [1, 2, 3, 4]
|
||||
$query->whereIn('type', $arr);
|
||||
}
|
||||
|
||||
if ($startTime) {
|
||||
|
||||
Reference in New Issue
Block a user