dataLists(new RechargeMethodLists()); } /** * @notes 添加充值方式 * @return \think\response\Json * @author BD * @date 2023/11/30 15:22 */ public function add() { $params = (new RechargeMethodValidate())->post()->goCheck('add'); $result = RechargeMethodLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(RechargeMethodLogic::getError()); } /** * @notes 编辑充值方式 * @return \think\response\Json * @author BD * @date 2023/11/30 15:22 */ public function edit() { $params = (new RechargeMethodValidate())->post()->goCheck('edit'); $result = RechargeMethodLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(RechargeMethodLogic::getError()); } /** * @notes 删除充值方式 * @return \think\response\Json * @author BD * @date 2023/11/30 15:22 */ public function delete() { $params = (new RechargeMethodValidate())->post()->goCheck('delete'); RechargeMethodLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取充值方式详情 * @return \think\response\Json * @author BD * @date 2023/11/30 15:22 */ public function detail() { $params = (new RechargeMethodValidate())->goCheck('detail'); $result = RechargeMethodLogic::detail($params); return $this->data($result); } /** * @notes 更改状态 * @return \think\response\Json * @author BD * @date 2323/2/22 10:18 */ public function updateStatus() { $params = (new RechargeMethodValidate())->post()->goCheck('status'); $result = RechargeMethodLogic::updateStatus($params); if (true === $result) { return $this->success('修改成功', [], 1, 1); } return $this->fail(RechargeMethodLogic::getError()); } /** * @notes 获取全部充值方式 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author BD * @date 2323/10/13 10:54 */ public function all() { $result = RechargeMethodLogic::getAllData(); return $this->data($result); } }