dataLists(new WithdrawMethodLists()); } /** * @notes 添加提现方式 * @return \think\response\Json * @author BD * @date 2024/02/23 14:34 */ public function add() { $params = (new WithdrawMethodValidate())->post()->goCheck('add'); $result = WithdrawMethodLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(WithdrawMethodLogic::getError()); } /** * @notes 编辑提现方式 * @return \think\response\Json * @author BD * @date 2024/02/23 14:34 */ public function edit() { $params = (new WithdrawMethodValidate())->post()->goCheck('edit'); $result = WithdrawMethodLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(WithdrawMethodLogic::getError()); } /** * @notes 删除提现方式 * @return \think\response\Json * @author BD * @date 2024/02/23 14:34 */ public function delete() { $params = (new WithdrawMethodValidate())->post()->goCheck('delete'); WithdrawMethodLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取提现方式详情 * @return \think\response\Json * @author BD * @date 2024/02/23 14:34 */ public function detail() { $params = (new WithdrawMethodValidate())->goCheck('detail'); $result = WithdrawMethodLogic::detail($params); return $this->data($result); } /** * @notes 获取全部提现方式 * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author BD * @date 2024/02/23 14:34 */ public function all() { $result = WithdrawMethodLogic::getAllData(); return $this->data($result); } }