seven 2 miesięcy temu
rodzic
commit
6f0bfc9f93

+ 1 - 0
app/Http/Controllers/admin/Balance.php

@@ -47,6 +47,7 @@ class Balance extends Controller
                 'member_id' => ['nullable', 'string', 'min:1']
                 'member_id' => ['nullable', 'string', 'min:1']
             ]);
             ]);
             $search = request()->all();
             $search = request()->all();
+            $search['change_types'] = ['充值','提现','人工充值','人工扣款'];
             $result = BalanceLogService::paginate($search);
             $result = BalanceLogService::paginate($search);
         } catch (ValidationException $e) {
         } catch (ValidationException $e) {
             return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());
             return $this->error(HttpStatus::CUSTOM_ERROR, $e->validator->errors()->first());

+ 3 - 0
app/Services/BalanceLogService.php

@@ -49,6 +49,9 @@ class BalanceLogService extends BaseService
         if (isset($search['member_id']) && !empty($search['member_id'])) {
         if (isset($search['member_id']) && !empty($search['member_id'])) {
             $where[] = ['member_id', '=', $search['member_id']];
             $where[] = ['member_id', '=', $search['member_id']];
         }
         }
+        if (isset($search['change_types']) && !empty($search['change_types'])) {
+            $where[] = ['change_type', 'in', $search['change_types']];
+        }
         return $where;
         return $where;
     }
     }