dataLists(new MallGoodsLists()); } /** * @notes 添加积分、抽奖奖品 * @return \think\response\Json * @author BD * @date 2024/10/14 23:57 */ public function add() { $params = (new MallGoodsValidate())->post()->goCheck('add'); $result = MallGoodsLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(MallGoodsLogic::getError()); } /** * @notes 编辑积分、抽奖奖品 * @return \think\response\Json * @author BD * @date 2024/10/14 23:57 */ public function edit() { $params = (new MallGoodsValidate())->post()->goCheck('edit'); $result = MallGoodsLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(MallGoodsLogic::getError()); } /** * @notes 删除积分、抽奖奖品 * @return \think\response\Json * @author BD * @date 2024/10/14 23:57 */ public function delete() { $params = (new MallGoodsValidate())->post()->goCheck('delete'); MallGoodsLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取积分、抽奖奖品详情 * @return \think\response\Json * @author BD * @date 2024/10/14 23:57 */ public function detail() { $params = (new MallGoodsValidate())->goCheck('detail'); $result = MallGoodsLogic::detail($params); return $this->data($result); } }