1.修改方法名

This commit is contained in:
whm
2025-11-01 13:52:18 +08:00
parent 48afb0a25e
commit c7dc9b875a
3 changed files with 8 additions and 4 deletions

View File

@@ -411,7 +411,7 @@ def get_all_section_by_account(request: SectionByAccountRequest, db: Session = D
try: try:
account_id = request.account_id account_id = request.account_id
section_service = SectionDataService() section_service = SectionDataService()
result_data = section_service.get_all_section_by_account(db, account_id=account_id) result_data = section_service.get_by_section_id(db, account_id=account_id)
return DataResponse( return DataResponse(
code=ResponseCode.SUCCESS, code=ResponseCode.SUCCESS,
message="查询成功", message="查询成功",

View File

@@ -76,12 +76,13 @@ class TaskScheduler:
"""设置系统定时任务""" """设置系统定时任务"""
try: try:
# 检查是否已存在每日重置任务 # 检查是否已存在每日重置任务
existing_job = self.scheduler.get_job("daily_reset_today_updated") existing_job = self.scheduler.get_job("daily_reset_today_updated")
existing_job = self.scheduler.get_job("get_max_nyid")
if not existing_job: if not existing_job:
# 添加每天午夜12点重置today_updated字段的任务 # 添加每天午夜12点重置today_updated字段的任务
self.scheduler.add_job( self.scheduler.add_job(
reset_today_updated_task, reset_today_updated_task,
scheduled_get_max_nyid_by_point_id,
'cron', 'cron',
id='daily_reset_today_updated', id='daily_reset_today_updated',
hour=0, hour=0,
@@ -89,6 +90,10 @@ class TaskScheduler:
second=0, second=0,
name='每日重置账号更新状态' name='每日重置账号更新状态'
) )
self.scheduler.add_job(
scheduled_get_max_nyid_by_point_id,
id='get_max_nyid',
)
logger.info("系统定时任务:每日重置账号更新状态已添加") logger.info("系统定时任务:每日重置账号更新状态已添加")
except Exception as e: except Exception as e:
logger.error(f"设置系统定时任务失败: {e}") logger.error(f"设置系统定时任务失败: {e}")

View File

@@ -16,7 +16,7 @@ if [ "$1" = "0" ]; then
else else
echo "默认执行代码拉取" echo "默认执行代码拉取"
fi fi
echo "whm"
# 如果不跳过git pull则拉取最新代码 # 如果不跳过git pull则拉取最新代码
if [ $SKIP_GIT_PULL -eq 0 ]; then if [ $SKIP_GIT_PULL -eq 0 ]; then
echo "" echo ""
@@ -42,7 +42,6 @@ echo -n "请输入sudo密码: "
read -s SUDO_PASSWORD read -s SUDO_PASSWORD
echo "" echo ""
echo "" echo ""
# 检查密码是否为空 # 检查密码是否为空
if [ -z "$SUDO_PASSWORD" ]; then if [ -z "$SUDO_PASSWORD" ]; then
echo "错误: 密码不能为空" echo "错误: 密码不能为空"