diff --git a/crmeb/app/adminapi/controller/v1/user/User.php b/crmeb/app/adminapi/controller/v1/user/User.php index 6f3795d0b..ef60567ac 100644 --- a/crmeb/app/adminapi/controller/v1/user/User.php +++ b/crmeb/app/adminapi/controller/v1/user/User.php @@ -170,6 +170,9 @@ class User extends AuthController * 获取用户账户详情 * @param $id * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function read($id) { @@ -194,6 +197,9 @@ class User extends AuthController * 执行赠送会员等级 * @param $id * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function save_give_level($id) { @@ -208,6 +214,7 @@ class User extends AuthController * 赠送付费会员时长表单 * @param $id * @return mixed + * @throws \FormBuilder\Exception\FormBuilderException */ public function give_level_time($id) { @@ -219,6 +226,9 @@ class User extends AuthController * 执行赠送付费会员时长 * @param $id * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function save_give_level_time($id) { diff --git a/crmeb/app/api/controller/v1/store/CategoryController.php b/crmeb/app/api/controller/v1/store/CategoryController.php index 110c89b30..f8a2ae83a 100644 --- a/crmeb/app/api/controller/v1/store/CategoryController.php +++ b/crmeb/app/api/controller/v1/store/CategoryController.php @@ -28,7 +28,11 @@ class CategoryController /** * 获取分类列表 + * @param Request $request * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function category(Request $request) { diff --git a/crmeb/app/api/controller/v2/user/UserInvoiceController.php b/crmeb/app/api/controller/v2/user/UserInvoiceController.php index 574228246..4e87f6f15 100644 --- a/crmeb/app/api/controller/v2/user/UserInvoiceController.php +++ b/crmeb/app/api/controller/v2/user/UserInvoiceController.php @@ -142,7 +142,11 @@ class UserInvoiceController $uid = (int)$request->uid(); $re = $this->services->saveInvoice($uid, $data); if ($re) { - return app('json')->success($re['type'] == 'edit' ? 100001 : $re['data']); + if ($re['type'] == 'edit') { + return app('json')->success(100001); + } else { + return app('json')->success(100021, $re['data']); + } } else { return app('json')->fail(100005); } diff --git a/crmeb/app/dao/user/UserDao.php b/crmeb/app/dao/user/UserDao.php index c26240aa1..715374a5c 100644 --- a/crmeb/app/dao/user/UserDao.php +++ b/crmeb/app/dao/user/UserDao.php @@ -82,7 +82,9 @@ class UserDao extends BaseDao /** * @param $uid + * @param string $field * @return \think\Collection + * @throws \ReflectionException * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException diff --git a/crmeb/app/services/product/product/StoreCategoryServices.php b/crmeb/app/services/product/product/StoreCategoryServices.php index 97ab79f0a..c096dca60 100644 --- a/crmeb/app/services/product/product/StoreCategoryServices.php +++ b/crmeb/app/services/product/product/StoreCategoryServices.php @@ -107,17 +107,16 @@ class StoreCategoryServices extends BaseServices /** * 设置分类状态 - * @param $id - * @param $is_show + * @param int $id + * @param int $is_show */ public function setShow(int $id, int $is_show) { $res = $this->dao->update($id, ['is_show' => $is_show]); $res = $res && $this->dao->update($id, ['is_show' => $is_show], 'pid'); + $this->cacheDriver()->clear(); if (!$res) { throw new AdminException(100005); - } else { - $this->cacheDriver()->clear(); } } @@ -184,6 +183,10 @@ class StoreCategoryServices extends BaseServices /** * 保存新增数据 * @param $data + * @return int + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function createData($data) { diff --git a/crmeb/app/services/user/UserAddressServices.php b/crmeb/app/services/user/UserAddressServices.php index 9a9fc5914..d6a1d11ef 100644 --- a/crmeb/app/services/user/UserAddressServices.php +++ b/crmeb/app/services/user/UserAddressServices.php @@ -82,6 +82,9 @@ class UserAddressServices extends BaseServices * @param int $uid * @param string $field * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function getUserDefaultAddress(int $uid, string $field = '*') { diff --git a/crmeb/app/services/user/UserLabelRelationServices.php b/crmeb/app/services/user/UserLabelRelationServices.php index 46f5bc731..faa3629f8 100644 --- a/crmeb/app/services/user/UserLabelRelationServices.php +++ b/crmeb/app/services/user/UserLabelRelationServices.php @@ -47,8 +47,10 @@ class UserLabelRelationServices extends BaseServices /** * 用户设置标签 - * @param int $uid + * @param $uids * @param array $labels + * @return bool + * @throws \Exception */ public function setUserLable($uids, array $labels) { diff --git a/crmeb/app/services/user/UserLabelServices.php b/crmeb/app/services/user/UserLabelServices.php index 16ed06cd1..a0607b30a 100644 --- a/crmeb/app/services/user/UserLabelServices.php +++ b/crmeb/app/services/user/UserLabelServices.php @@ -40,6 +40,9 @@ class UserLabelServices extends BaseServices * 获取某一本标签 * @param $id * @return array|\think\Model|null + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function getLable($id) { @@ -110,6 +113,9 @@ class UserLabelServices extends BaseServices * @param int $id * @param array $data * @return mixed + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function save(int $id, array $data) { @@ -144,8 +150,11 @@ class UserLabelServices extends BaseServices /** * 删除 - * @param $id - * @throws \Exception + * @param int $id + * @return bool + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function delLabel(int $id) {