$this->request->param('uid/d', 0), 'prize_type' => $this->request->param('prize_type/d', 0), 'start_time' => $this->request->param('start_time/d', 0), 'end_time' => $this->request->param('end_time/d', time()) ]; $service = new LotteryService(); $stat = $service->statWinner($where); return json([ 'code' => 0, 'msg' => '统计成功', 'data' => $stat ]); } catch (Exception $e) { Log::error('中奖统计失败:' . $e->getMessage()); return json([ 'code' => 1, 'msg' => $e->getMessage(), 'data' => [] ]); } } }