dataLists(new UserKadanLists()); } /** * @notes 添加卡单规则 * @return \think\response\Json * @author BD * @date 2024/04/24 17:00 */ public function add() { $params = (new UserKadanValidate())->post()->goCheck('add'); $result = UserKadanLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(UserKadanLogic::getError()); } /** * @notes 编辑卡单规则 * @return \think\response\Json * @author BD * @date 2024/04/24 17:00 */ public function edit() { $params = (new UserKadanValidate())->post()->goCheck('edit'); $result = UserKadanLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(UserKadanLogic::getError()); } /** * @notes 删除卡单规则 * @return \think\response\Json * @author BD * @date 2024/04/24 17:00 */ public function delete() { $params = (new UserKadanValidate())->post()->goCheck('delete'); UserKadanLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取卡单规则详情 * @return \think\response\Json * @author BD * @date 2024/04/24 17:00 */ public function detail() { $params = (new UserKadanValidate())->goCheck('detail'); $result = UserKadanLogic::detail($params); return $this->data($result); } }