dataLists(new MasterWorkerCommissionConfigLists()); } /** * @notes 添加 * @return \think\response\Json * @author likeadmin * @date 2024/12/06 10:42 */ public function add() { $params = (new MasterWorkerCommissionConfigValidate())->post()->goCheck('add',[ 'adminId' => $this->adminId ]); $result = MasterWorkerCommissionConfigLogic::add($params); if (true === $result) { return $this->success('添加成功', [], 1, 1); } return $this->fail(MasterWorkerCommissionConfigLogic::getError()); } /** * @notes 编辑 * @return \think\response\Json * @author likeadmin * @date 2024/12/06 10:42 */ public function edit() { $params = (new MasterWorkerCommissionConfigValidate())->post()->goCheck('edit',[ 'adminId' => $this->adminId ]); $result = MasterWorkerCommissionConfigLogic::edit($params); if (true === $result) { return $this->success('编辑成功', [], 1, 1); } return $this->fail(MasterWorkerCommissionConfigLogic::getError()); } /** * @notes 删除 * @return \think\response\Json * @author likeadmin * @date 2024/12/06 10:42 */ public function delete() { $params = (new MasterWorkerCommissionConfigValidate())->post()->goCheck('delete'); MasterWorkerCommissionConfigLogic::delete($params); return $this->success('删除成功', [], 1, 1); } /** * @notes 获取详情 * @return \think\response\Json * @author likeadmin * @date 2024/12/06 10:42 */ public function detail() { $params = (new MasterWorkerCommissionConfigValidate())->goCheck('detail'); $result = MasterWorkerCommissionConfigLogic::detail($params); return $this->data($result); } public function examine() { $params = (new MasterWorkerCommissionConfigValidate())->post()->goCheck('delete',[ 'adminId' => $this->adminId ]); $result = MasterWorkerCommissionConfigLogic::examine($params); if (true === $result) { return $this->success('启动成功', [], 1, 1); } return $this->fail(MasterWorkerCommissionConfigLogic::getError()); } public function offCommission() { $params = (new MasterWorkerCommissionConfigValidate())->post()->goCheck('delete',[ 'adminId' => $this->adminId ]); $result = MasterWorkerCommissionConfigLogic::offCommission($params); if (true === $result) { return $this->success('关闭成功', [], 1, 1); } return $this->fail(MasterWorkerCommissionConfigLogic::getError()); } }