diff --git a/application/common/model/score/Log.php b/application/common/model/score/Log.php index e857515..4b433aa 100644 --- a/application/common/model/score/Log.php +++ b/application/common/model/score/Log.php @@ -258,16 +258,16 @@ class Log extends BaseModel //判断是否是员工 if(!$employee)$employee = Employee::where("user_id",$user_id)->find(); if(!$employee) throw new \Exception(__('用户不是员工')); - if(!$employee["team_id"])throw new \Exception(__('用户未加入队伍!')); - $team = Team::where("id",$employee["team_id"])->find(); - if(!$team)throw new \Exception(__('用户未加入队伍!')); +// if(!$employee["team_id"])throw new \Exception(__('用户未加入队伍!')); +// $team = Team::where("id",$employee["team_id"])->find(); +// if(!$team)throw new \Exception(__('用户未加入队伍!')); if(!$params["images"] || !$params["name"] || !$params["score"])throw new \Exception(__('缺少关键申请参数!')); $params["score_employee_id"] = $employee["id"]; $params["score_event_id"] = $score_event_id; - $params["score_team_id"] = $team["id"]; + $params["score_team_id"] = $team["id"] ?? 0; $params["status"] = $params["status"] ?? 0; $params["authtime"] = $params["status"] != 0 ? time() : NULL;