更新客服服务

This commit is contained in:
yaooo 2023-12-13 13:40:04 +08:00
parent 17dc611c28
commit c2e2ae73ef
2 changed files with 14 additions and 1 deletions

View File

@ -127,6 +127,9 @@ class CustomServiceLogic extends BaseLogic
*/
public static function detail($params): array
{
return CustomService::findOrEmpty($params['id'])->toArray();
$customService = CustomService::findOrEmpty($params['id']);
$customService->project = $customService->project;
$customService->custom = $customService->custom;
return $customService->toArray();
}
}

View File

@ -35,4 +35,14 @@ class CustomService extends BaseModel
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
}
public function custom()
{
return $this->belongsTo(\app\common\model\custom\Custom::class, 'custom_id');
}
public function project()
{
return $this->belongsTo(\app\common\model\project\Project::class, 'project_id');
}
}