docker,字段更改

This commit is contained in:
lhx
2025-09-27 10:23:00 +08:00
parent 524be063d0
commit e6fe0fab48
4 changed files with 20 additions and 20 deletions

View File

@@ -14,11 +14,11 @@ router = APIRouter(prefix="/accounts", tags=["账号管理"])
def create_account(account: AccountCreate, db: Session = Depends(get_db)):
"""创建账号"""
# 检查账号是否已存在
existing_account = AccountService.get_account_by_account(db, account.account)
existing_account = AccountService.get_account_by_username(db, account.username)
if existing_account:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="账号已存在"
detail="用户名已存在"
)
return AccountService.create_account(db, account)
@@ -34,8 +34,8 @@ def get_account(request: AccountGetRequest, db: Session = Depends(get_db)):
accounts = AccountService.search_accounts(
db,
account_id=request.account_id,
account=request.account,
section=request.section,
username=request.username,
project_name=request.project_name,
status=request.status,
today_updated=request.today_updated
)