WIN-2308041133\Administrator il y a 3 mois
Parent
commit
f1223eed40
1 fichiers modifiés avec 19 ajouts et 0 suppressions
  1. 19 0
      app/controller/admin/user/User.php

+ 19 - 0
app/controller/admin/user/User.php

@@ -626,6 +626,25 @@ class User extends BaseController
             return app('json')->fail('数据不存在');
         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