request->getMore([ ['keyword', ''], ['status', ''], ['reward_trigger_status', ''], ['start_time', ''], ['end_time', ''], ['page', 1], ['limit', 20], ]); $page = (int)$where['page']; $limit = (int)$where['limit']; unset($where['page'], $where['limit']); return $this->success($this->services->adminTasks($where, $page, $limit)); } public function taskDetail(int $id): mixed { return $this->success($this->services->adminTaskDetail($id)); } public function taskRecords(int $id): mixed { return $this->success($this->services->records($id)); } public function cashoutList(): mixed { $where = $this->request->getMore([ ['keyword', ''], ['audit_status', ''], ['page', 1], ['limit', 20], ]); $where['settle_type'] = 'early_cashout'; $page = (int)$where['page']; $limit = (int)$where['limit']; unset($where['page'], $where['limit']); return $this->success($this->settlementServices->adminList($where, $page, $limit)); } public function settlementList(): mixed { $where = $this->request->getMore([ ['keyword', ''], ['audit_status', ''], ['settle_type', ''], ['page', 1], ['limit', 20], ]); $page = (int)$where['page']; $limit = (int)$where['limit']; unset($where['page'], $where['limit']); return $this->success($this->settlementServices->adminList($where, $page, $limit)); } public function auditCashout(int $id): mixed { $data = $this->request->postMore([ ['status', 1], ['remark', ''], ]); $this->settlementServices->auditCashout($id, (int)$this->adminId, (int)$data['status'], (string)$data['remark']); return $this->success('审核成功'); } public function getConfig(): mixed { return $this->success($this->configServices->getConfig()); } public function saveConfig(): mixed { $data = $this->request->postMore([ ['base_amount', 4333], ['target_count', 4], ['reward_rates', [10, 20, 30, 40]], ['early_cashout_fee_rate', 7], ['task_generate_timing', 'on_confirm'], ['task_order_dedupe', 'order'], ['reward_trigger_enable', 1], ]); $this->configServices->saveConfig($data); return $this->success('保存成功'); } public function retryTrigger(int $taskId): mixed { $this->triggerServices->retry($taskId); return $this->success('重试完成'); } }