|
|
@@ -61,9 +61,13 @@ class Withdraw extends Controller
|
|
|
|
|
|
$totalAmount = (float)$query->where($where)
|
|
|
->whereDate('created_at', date('Y-m-d'))->sum('amount');
|
|
|
+ $totalSuccess = (float)$query->where($where)->whereDate('created_at', date('Y-m-d'))
|
|
|
+ ->whereIn('status', [1,2])->sum('amount');
|
|
|
|
|
|
|
|
|
- $result = ['total_amount' => $totalAmount, 'total' => $count, 'data' => $list];
|
|
|
+
|
|
|
+
|
|
|
+ $result = ['totalSuccess'=>$totalSuccess,'total_amount' => $totalAmount, 'total' => $count, 'data' => $list];
|
|
|
} catch (ValidationException $e) {
|
|
|
return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
|
|
|
} catch (Exception $e) {
|