sqlite-web 0.7.2
gitea.db
issue
Create
Query
access
access_token
action
action_artifact
action_run
action_run_index
action_run_job
action_runner
action_runner_token
action_schedule
action_schedule_spec
action_task
action_task_output
action_task_step
action_tasks_version
action_variable
app_state
attachment
auth_token
badge
branch
collaboration
comment
commit_status
commit_status_index
commit_status_summary
commit_sync_log
commit_sync_status
dbfs_data
dbfs_meta
deploy_key
email_address
email_hash
external_login_user
follow
gpg_key
gpg_key_import
hook_task
issue
issue_assignees
issue_content_history
issue_dependency
issue_index
issue_label
issue_pin
issue_user
issue_watch
label
language_stat
lfs_lock
lfs_meta_object
login_source
milestone
mirror
notice
notification
oauth2_application
oauth2_authorization_code
oauth2_grant
org_user
package
package_blob
package_blob_upload
package_cleanup_rule
package_file
package_property
package_version
project
project_board
project_issue
protected_branch
protected_tag
public_key
pull_auto_merge
pull_request
push_mirror
reaction
release
renamed_branch
repo_archiver
repo_hidden_file
repo_indexer_status
repo_license
repo_redirect
repo_topic
repo_transfer
repo_unit
repository
review
review_state
secret
session
sqlite_sequence
star
stopwatch
system_setting
task
team
team_invite
team_repo
team_unit
team_user
topic
tracked_time
two_factor
upload
user
user_badge
user_blocking
user_open_id
user_redirect
user_setting
version
watch
webauthn_credential
webhook
Toggle helper tables
Structure
Content
Query
Insert
Drop
Import
Export
Update row 767 in issue
id
Primary key.
INTEGER NOT NULL
repo_id
INTEGER
index
INTEGER
poster_id
INTEGER
original_author
TEXT
original_author_id
INTEGER
name
[后台管理] 按省市统计设备月度新增上线数量报表
TEXT
content
## 关联 Issue Close #4 — [后台] 按省市统计设备月度新增上线数量报表 (Issue 位于另一仓库 laiqiaojie/jh-project,Gitea 跨仓库 `Close #N` 不会自动关联,merge 后需手动去 jh-project 更新 Issue 状态) ## 变更说明 - 新增 `DeviceOnlineStats` 控制器,暴露 `getProvinceStats`(按月+省份汇总新增上线设备数)、`getCityStats`(指定省份后按城市下钻)两个接口 - `Ahead_authenticate_log_model` 新增对应查询方法:联表 `ahead_authenticate_log` → `ahead_family_servers` → `ahead_yc_shop`,权限过滤复用现有 `Ahead_manage_user_model::check_is_agent()`(超管看全国,运营商强制按 `shop._agent_id` 过滤) - 与 plan.md 的偏差:实现与计划一致;另外在 `/code-review` 中发现并修复了两个问题(均已回归验证): - `month` 参数只校验格式未校验取值范围,如 `2026-00` 会被 `strtotime` 静默接受为上一年 12 月而不报错 → 正则改为 `(0[1-9]|1[0-2])` 严格校验月份范围 - 未绑定门店的设备(`room._shop_id` 为 0/未匹配)会被计入 `total` 但在 `GROUP BY shop._province` 时产生一个 province 为 null 的脏分组 → 加 `room._shop_id > 0` 过滤 ## 测试说明 - 本地起 PHPStudy,登录后手动调用两个接口验证:正常月份返回 `{code:0, result:{total, list}}`;缺 `month`/非法月份(`2026-00`、`2026-13`、`0000-00`)均正确返回 400 - 用只读 SQL 直接查了云端开发库确认 JOIN 链路正确——本地测试库 `ahead_authenticate_log` 表只有 1 条 2021 年的历史数据,所以当月查询返回空列表是预期行为,不是 bug - `tests/api/smoke.mjs` 里补充了对应的自动化用例,但该冒烟测试框架整体依赖另一个尚未推送到 `admin` 分支的提交(`694e34c`,属于另一项未提交的工作,不在本 Issue 范围内),为保持本 PR 改动范围干净,本次未包含测试框架文件,仅代码改动 - 需要 Tech Lead 重点看:`check_is_agent()` 权限过滤范围是否符合预期;`room._shop_id > 0` 过滤是否会误伤合法数据 ## 产物归档 - Plan:[plan/device-online-stats-by-region-admin.md](https://gitea.g-hi.com/laiqiaojie/jh-project/src/branch/design/device-online-stats-by-region/plan/device-online-stats-by-region-admin.md)(位于 laiqiaojie/jh-project 仓库)
TEXT
milestone_id
INTEGER
priority
INTEGER
is_closed
INTEGER
is_pull
INTEGER
num_comments
INTEGER
ref
TEXT
deadline_unix
INTEGER
created_unix
INTEGER
updated_unix
INTEGER
closed_unix
INTEGER
is_locked
INTEGER NOT NULL (default 0
content_version
INTEGER NOT NULL (default 0
time_estimate
INTEGER NOT NULL (default 0
Update
Cancel