更新客户

This commit is contained in:
yaooo 2023-12-13 14:17:02 +08:00
parent 17a9857511
commit a4131da38f
2 changed files with 8 additions and 1 deletions

View File

@ -119,6 +119,8 @@ class CustomFollowLogic extends BaseLogic
*/ */
public static function detail($params): array public static function detail($params): array
{ {
return CustomFollow::findOrEmpty($params['id'])->toArray(); $customFollow = CustomFollow::findOrEmpty($params['id']);
$customFollow->custom = $customFollow->custom;
return $customFollow->toArray();
} }
} }

View File

@ -40,5 +40,10 @@ class CustomFollow 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');
}
} }