更新客服服务
This commit is contained in:
parent
17dc611c28
commit
c2e2ae73ef
@ -127,6 +127,9 @@ class CustomServiceLogic extends BaseLogic
|
|||||||
*/
|
*/
|
||||||
public static function detail($params): array
|
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,4 +35,14 @@ class CustomService extends BaseModel
|
|||||||
return empty($value) ? '' : date('Y-m-d H:i:s', $value);
|
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');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user