..
This commit is contained in:
@@ -46,12 +46,13 @@ class DataService implements DataServiceInterface
|
|||||||
|
|
||||||
public function updateCampus(int $id, array $data): int
|
public function updateCampus(int $id, array $data): int
|
||||||
{
|
{
|
||||||
// TODO: Implement updateCampus() method.
|
$this->campusValidator->scene('update', $data)->check();
|
||||||
|
return $this->campusModel->updateById($id, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteCampus(int $id): bool
|
public function deleteCampus(int $id): bool
|
||||||
{
|
{
|
||||||
// TODO: Implement deleteCampus() method.
|
return $this->campusModel->deleteById($id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCampusById(int $id): array
|
public function getCampusById(int $id): array
|
||||||
|
|||||||
@@ -157,9 +157,9 @@ abstract class AetherModel extends HyperfModel implements CacheableInterface
|
|||||||
/**
|
/**
|
||||||
* 快捷更新.
|
* 快捷更新.
|
||||||
*/
|
*/
|
||||||
public static function updateById(int $id, array $data): bool
|
public static function updateById(int $id, array $data): int
|
||||||
{
|
{
|
||||||
return static::query()->where('id', $id)->update($data) > 0;
|
return static::query()->where('id', $id)->update($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class RpcExceptionHandler extends ExceptionHandler
|
|||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public function handle(Throwable $throwable, ResponseInterface $response): ResponseInterface
|
public function handle(Throwable $throwable, ResponseInterface $response): ResponseInterface
|
||||||
{
|
{var_dump($throwable->getMessage());
|
||||||
try {
|
try {
|
||||||
// 获取请求ID(用于日志追踪)
|
// 获取请求ID(用于日志追踪)
|
||||||
$requestId = Context::get('request_id', '');
|
$requestId = Context::get('request_id', '');
|
||||||
|
|||||||
Reference in New Issue
Block a user