Commit a581cd18 by 宁成龙

增加状态判断

parent f66afe25
......@@ -32,7 +32,7 @@ class AssignUserHandle extends Form implements LazyRenderable
->refresh();
} catch (\Throwable $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
->refresh();
} catch (\Throwable $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
}
//更新客户的数据
$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");
$update = [
"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