Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LLM-Filter
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2026_NGIT
LLM-Filter
Commits
6d17b883
Commit
6d17b883
authored
Dec 13, 2025
by
uuo00_n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 更新.env文件中的数据库配置
将生产环境数据库配置注释掉,启用本地开发环境配置 修改数据库名称为llm_filter_db
parent
e13c1477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
.env
.env
+3
-3
dashboard.py
app/services/dashboard.py
+11
-2
No files found.
.env
View file @
6d17b883
# 数据库配置
# 注意:生产环境请通过安全的环境变量管理传递凭据,避免将敏感信息提交到版本库
MONGODB_URL=mongodb://llm:fSjFMwyShmcH4GdR@datacenter.dldzxx.cn:27017/llm?authSource=llm
#
MONGODB_URL=mongodb://localhost:27017/
DB_NAME=llm
#
MONGODB_URL=mongodb://llm:fSjFMwyShmcH4GdR@datacenter.dldzxx.cn:27017/llm?authSource=llm
MONGODB_URL=mongodb://localhost:27017/
DB_NAME=llm
_filter_db
# JWT配置
SECRET_KEY=your_secret_key_here
...
...
app/services/dashboard.py
View file @
6d17b883
...
...
@@ -196,9 +196,18 @@ async def homeroom_current_summary(current_user: Dict[str, Any]) -> Dict[str, An
weekday
=
await
_weekday
()
period
=
await
_current_period
()
current_lesson_id
=
f
"W{weekday}-P{period}"
uid
=
ObjectId
(
current_user
[
"_id"
])
# 获取当前用户的教师绑定信息
binding
=
await
_get_primary_binding
(
current_user
[
"_id"
])
if
binding
.
get
(
"type"
)
!=
"teacher"
:
raise
HTTPException
(
status_code
=
403
,
detail
=
"当前绑定非教师"
)
teacher
=
await
_get_teacher_entity
(
current_user
[
"_id"
],
binding
)
teacher_person_id
=
teacher
.
get
(
"person_id"
)
classes
=
[]
cursor
=
db
.
db
.
classes
.
find
({
"head_teacher_person_id"
:
uid
})
# 使用 person_id 查询班级
cursor
=
db
.
db
.
classes
.
find
({
"head_teacher_person_id"
:
teacher_person_id
})
async
for
c
in
cursor
:
classes
.
append
(
c
)
class_ids
=
[
c
.
get
(
"class_id"
)
for
c
in
classes
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment