Commit a581cd18 by 宁成龙

增加状态判断

parent f66afe25
...@@ -32,7 +32,7 @@ class AssignUserHandle extends Form implements LazyRenderable ...@@ -32,7 +32,7 @@ class AssignUserHandle extends Form implements LazyRenderable
->refresh(); ->refresh();
} catch (\Throwable $throwable) { } catch (\Throwable $throwable) {
// var_dump((string)$throwable); // var_dump((string)$throwable);
return $this->response()->error(trans('admin.update_failed')); return $this->response()->error(trans('admin.update_failed').": {$throwable->getMessage()}");
} }
} }
......
...@@ -32,7 +32,7 @@ class TransferUserHandle extends Form implements LazyRenderable ...@@ -32,7 +32,7 @@ class TransferUserHandle extends Form implements LazyRenderable
->refresh(); ->refresh();
} catch (\Throwable $throwable) { } catch (\Throwable $throwable) {
// var_dump((string)$throwable); // var_dump((string)$throwable);
return $this->response()->error(trans('admin.update_failed')); return $this->response()->error(trans('admin.update_failed').": {$throwable->getMessage()}");
} }
} }
......
...@@ -204,6 +204,13 @@ class UserService ...@@ -204,6 +204,13 @@ class UserService
} }
//更新客户的数据 //更新客户的数据
$userList = User::getListByIdArr($ids); $userList = User::getListByIdArr($ids);
//判断客户状态
foreach ($userList as $user) {
if ($user['status'] != User::STATUS_NORMAL) {
throw new \Exception("user:[{$user['user_sn']}] status is not normal");
}
}
$userIds = array_column($userList, "id"); $userIds = array_column($userList, "id");
$update = [ $update = [
"sale_id" => $saleId, "sale_id" => $saleId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment