|
@@ -626,6 +626,25 @@ class User extends BaseController
|
|
|
return app('json')->fail('数据不存在');
|
|
return app('json')->fail('数据不存在');
|
|
|
return app('json')->success(formToData($this->repository->changeIsServiceForm($id)));
|
|
return app('json')->success(formToData($this->repository->changeIsServiceForm($id)));
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改用户服务中心
|
|
|
|
|
+ * @param $id
|
|
|
|
|
+ * @return mixed
|
|
|
|
|
+ * @throws DataNotFoundException
|
|
|
|
|
+ * @throws DbException
|
|
|
|
|
+ * @throws ModelNotFoundException
|
|
|
|
|
+ * @author xaboy
|
|
|
|
|
+ * @day 2020-05-07
|
|
|
|
|
+ */
|
|
|
|
|
+ public function changeIsService($id)
|
|
|
|
|
+ {
|
|
|
|
|
+ $data = $this->request->params(['type']);
|
|
|
|
|
+ if (!$this->repository->exists($id))
|
|
|
|
|
+ return app('json')->fail('数据不存在');
|
|
|
|
|
+ $this->repository->changeIsService($id, $this->request->adminId(), $data['type']);
|
|
|
|
|
+
|
|
|
|
|
+ return app('json')->success('修改成功');
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* 修改用户积分
|
|
* 修改用户积分
|
|
|
* @param $id
|
|
* @param $id
|