update
This commit is contained in:
parent
a58fd408f0
commit
ba6c3aa2bb
@ -137,9 +137,11 @@ async def get_user_info(
|
|||||||
user_data = user_info.model_dump()
|
user_data = user_info.model_dump()
|
||||||
|
|
||||||
# 获取用户归属小区信息
|
# 获取用户归属小区信息
|
||||||
if current_user.community_id:
|
if current_user.community_id > 0:
|
||||||
user_data['community_id'] = current_user.community_id
|
user_data['community_id'] = current_user.community_id
|
||||||
user_data['community_name'] = db.query(CommunityDB.name).filter(CommunityDB.id == current_user.community_id).first().name
|
community = db.query(CommunityDB).filter(CommunityDB.id == current_user.community_id).first()
|
||||||
|
if community:
|
||||||
|
user_data['community_name'] = community.name
|
||||||
|
|
||||||
# 处理默认地址
|
# 处理默认地址
|
||||||
if default_address:
|
if default_address:
|
||||||
|
|||||||
@ -39,7 +39,7 @@ class Settings(BaseSettings):
|
|||||||
MYSQL_PORT: int = 27469
|
MYSQL_PORT: int = 27469
|
||||||
MYSQL_USER: str = "root"
|
MYSQL_USER: str = "root"
|
||||||
MYSQL_PASSWORD: str = "Aa#223388"
|
MYSQL_PASSWORD: str = "Aa#223388"
|
||||||
MYSQL_DB: str = "beefastapp"
|
MYSQL_DB: str = "beefast"
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user