修改原有框架中英文映射

This commit is contained in:
2026-03-17 18:09:10 +08:00
parent e7b8f4cae9
commit bdf50e61f5
81 changed files with 1956 additions and 735 deletions

View File

@@ -43,7 +43,7 @@ class SystemRoleLogic extends BaseLogic
{
$model = $this->model->findOrEmpty($id);
if ($model->isEmpty()) {
throw new ApiException('数据不存在');
throw new ApiException('Data not found');
}
$data = $this->handleData($data);
return $model->save($data);
@@ -60,7 +60,7 @@ class SystemRoleLogic extends BaseLogic
$num = SystemRole::where('level', '>=', $maxLevel)->whereIn('id', $ids)->count();
if ($num > 0) {
throw new ApiException('不能操作比当前账户职级高的角色');
throw new ApiException('Cannot operate roles with higher level than current account');
} else {
return $this->model->destroy($ids);
}
@@ -75,7 +75,7 @@ class SystemRoleLogic extends BaseLogic
$levelArr = array_column($this->adminInfo['roleList'], 'level');
$maxLevel = max($levelArr);
if ($data['level'] >= $maxLevel) {
throw new ApiException('不能操作比当前账户职级高的角色');
throw new ApiException('Cannot operate roles with higher level than current account');
}
return $data;
}