From 925920a6c5c02d02cf21ba53c5b25e5b11c02ed2 Mon Sep 17 00:00:00 2001 From: ldjun Date: Wed, 18 Mar 2026 14:19:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:storay=E4=B8=AD=E4=BB=BB=E5=8A=A1=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/application/api/controller/Story.php | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/back/application/api/controller/Story.php b/back/application/api/controller/Story.php index 4a058be..5e87993 100644 --- a/back/application/api/controller/Story.php +++ b/back/application/api/controller/Story.php @@ -68,7 +68,6 @@ class Story extends Common ->where('u.user_type', 1) ->where('u.id', $opStory['story_manager']) ->find(); - if (null != $ret) { $opStory['story_managername'] = $ret['staff_name']; @@ -193,15 +192,15 @@ class Story extends Common ->where('story_id', $param['story_id']) ->find(); if ($story_info) { - - $user = new User(); - $story_info_member = explode(',', $story_info['story_member']); foreach ($story_info_member as $memberId) { - - $user_info = $user->GetUserInfoByLoginId($memberId); - $item['id'] = $user_info['id']; - $item['staff_name'] = $user_info['name']; + $ret = db('system_user')->alias('u') + ->join('hr_staff s','s.staff_id=u.user_id', 'left') + ->where('u.user_type', 1) + ->where('u.id', $memberId) + ->find(); + $item['id'] = $memberId; + $item['staff_name'] = $ret['staff_name']; $array[] = $item; } } @@ -247,8 +246,13 @@ class Story extends Common $user = new User(); for ($i=0; $iGetUserInfoByLoginId($opTasks[$i]['task_processor']); - $opTasks[$i]['task_processor_name'] = $user_info['name']; + // $user_info = $user->GetUserInfoByLoginId($opTasks[$i]['task_processor']); + $ret = db('system_user')->alias('u') + ->join('hr_staff s','s.staff_id=u.user_id', 'left') + ->where('u.user_type', 1) + ->where('u.id', $opTasks[$i]['task_processor']) + ->find(); + $opTasks[$i]['task_processor_name'] = $ret['staff_name']; } return $this->sendSuccess($opTasks); }