dataLists(new SeckillLists()); } /** * @notes 秒杀概况 * @author 张无忌 * @date 2021/7/26 16:44 */ public function survey() { $result = SeckillLogic::survey(); return $this->success('获取成功', $result); } /** * @notes 秒杀详细信息 * @author 张无忌 * @date 2021/7/23 17:00 */ public function detail() { $params = (new SeckillValidate())->goCheck('id'); $result = SeckillLogic::detail($params); return $this->success('获取成功', $result); } /** * @notes 秒杀数据信息 * @author 张无忌 * @date 2021/7/23 17:00 */ public function info() { $params = (new SeckillValidate())->goCheck('id'); $result = SeckillLogic::info($params); return $this->success('获取成功', $result, 1, 1); } /** * @notes 添加秒杀活动 * @author 张无忌 * @date 2021/7/23 16:57 */ public function add() { $params = (new SeckillValidate())->post()->goCheck('add'); $result = SeckillLogic::add($params); if ($result === true) { return $this->success('添加成功', [],1, 1); } return $this->fail($result); } /** * @notes 编辑秒杀活动 * @author 张无忌 * @date 2021/7/23 16:57 */ public function edit() { $params = (new SeckillValidate())->post()->goCheck('edit'); $result = SeckillLogic::edit($params); if ($result === true) { return $this->success('编辑成功', [],1, 1); } return $this->fail($result); } /** * @notes 删除秒杀活动 * @author 张无忌 * @date 2021/7/23 16:57 */ public function delete() { $params = (new SeckillValidate())->post()->goCheck('id'); $result = SeckillLogic::delete($params); if ($result === true) { return $this->success('删除成功', [], 1, 1); } return $this->fail($result); } /** * @notes 确认开启活动 * @param $params * @return \think\response\Json * @author 张无忌 * @date 2021/7/23 16:57 */ public function open($params) { $result = SeckillLogic::open($params); if ($result === true) { return $this->success('确认成功', [], 1, 1); } return $this->fail($result); } /** * @notes 停止关闭活动 * @param $params * @return \think\response\Json * @author 张无忌 * @date 2021/7/23 16:58 */ public function stop($params) { $result = SeckillLogic::stop($params); if ($result === true) { return $this->success('结束成功', [],1, 1); } return $this->fail($result); } }