This commit is contained in:
weiz 2024-01-23 17:37:26 +08:00
parent 6e33251069
commit bfed0ce494

View File

@ -15,6 +15,7 @@
namespace app\adminapi\logic\project;
use app\common\model\project\Project;
use app\common\model\project\ProjectLogs;
use app\common\logic\BaseLogic;
use think\facade\Db;
@ -116,6 +117,10 @@ class ProjectLogsLogic extends BaseLogic
*/
public static function detail($params): array
{
return ProjectLogs::findOrEmpty($params['id'])->toArray();
$data = ProjectLogs::findOrEmpty($params['id']);
$project = Project::field('name,project_code')->where('id',$data['project_id'])->findOrEmpty();
$data['project_name'] = $project['name'];
$data['project_code'] = $project['project_code'];
return $data->toArray();
}
}