Files
shanxia2.0/backend/graphify-out/GRAPH_REPORT.md
T
2026-06-01 08:21:21 +08:00

25 KiB
Raw Blame History

Graph Report - backend (2026-06-01)

Corpus Check

  • 121 files · ~92,408 words
  • Verdict: corpus is large enough that graph structure adds value.

Summary

  • 2445 nodes · 18243 edges · 92 communities (86 shown, 6 thin omitted)
  • Extraction: 45% EXTRACTED · 55% INFERRED · 0% AMBIGUOUS · INFERRED: 10057 edges (avg confidence: 0.51)
  • Token cost: 0 input · 0 output

Graph Freshness

  • Built from commit: 9b885814
  • Run git rev-parse HEAD and compare to check if the graph is stale.
  • Run graphify update . after code changes (no API cost).

Community Hubs (Navigation)

God Nodes (most connected - your core abstractions)

  1. Session - 254 edges
  2. success_response() - 246 edges
  3. Session - 243 edges
  4. BaseModel - 242 edges
  5. error_response() - 234 edges
  6. SysUser - 180 edges
  7. get_tenant_no() - 139 edges
  8. int - 111 edges
  9. CustomerListBody - 107 edges
  10. CustomerListBody - 107 edges

Surprising Connections (you probably didn't know these)

  • bool --uses--> SysUser [INFERRED] app/crud/sample_code.py → app/models/models.py
  • date --uses--> CrmContact [INFERRED] app/crud/crm/contact.py → app/models/crm_models.py
  • Session --uses--> CrmCustomer [INFERRED] app/tasks/customer_pool.py → app/models/crm_models.py
  • CrmCustomer --uses--> CrmCustomer [INFERRED] app/tasks/customer_pool.py → app/models/crm_models.py
  • str --uses--> CrmCustomer [INFERRED] app/tasks/customer_pool.py → app/models/crm_models.py

Communities (92 total, 6 thin omitted)

Community 0 - "Community 0"

Cohesion: 0.11 Nodes (52): pool_rule_delete(), Any, int, Session, str, Any, bool, CRM 公海池规则 CRUD + 规则执行逻辑 (+44 more)

Community 1 - "Community 1"

Cohesion: 0.09 Nodes (81): Any, ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, StartInstanceBody, Any, Any, bool (+73 more)

Community 2 - "Community 2"

Cohesion: 0.14 Nodes (23): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,14 个一级菜单), _error_json(), lifespan(), _mask_secret(), Exception, int, Request (+15 more)

Community 3 - "Community 3"

Cohesion: 0.13 Nodes (15): Any, bool, int, str, get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块 支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.html, 统一下单接口 (V3) Args: out_trade_no: 商户订单号 total_amo (+7 more)

Community 4 - "Community 4"

Cohesion: 0.14 Nodes (42): Any, bool, CRM 产品模块 CRUD(产品分类 + 产品 + 附件), int, Session, str, category_code_exists(), _category_row_to_dict() (+34 more)

Community 5 - "Community 5"

Cohesion: 0.05 Nodes (49): Any, bool, bytes, int, str, Any, str, Exception (+41 more)

Community 6 - "Community 6"

Cohesion: 0.09 Nodes (95): attachment_download_url(), AttachmentDownloadUrlBody, create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_post(), create_role_management() (+87 more)

Community 7 - "Community 7"

Cohesion: 0.09 Nodes (47): Any, CRM 报价单 CRUD — 对照 CrmQuoteServiceImpl.java(P2 全量), datetime, Decimal, _build_quote_filters(), calculate_quote_amount(), create_quote(), _decimal_value() (+39 more)

Community 8 - "Community 8"

Cohesion: 0.15 Nodes (34): Session, str, Any, bool, int, Session, str, apply_data_scope() (+26 more)

Community 9 - "Community 9"

Cohesion: 0.33 Nodes (15): Any, int, Session, str, BizLeaveRequest, create_leave(), get_leave(), list_leaves() (+7 more)

Community 10 - "Community 10"

Cohesion: 0.09 Nodes (55): Any, bool, datetime, int, Session, str, _advance_contract_after_approval(), approve_contract() (+47 more)

Community 11 - "Community 11"

Cohesion: 0.04 Nodes (191): category_add(), category_delete(), category_tree(), category_update(), clue_assign(), clue_check_convert(), clue_check_duplicate(), clue_convert() (+183 more)

Community 12 - "Community 12"

Cohesion: 0.12 Nodes (34): BaseModel, AttachmentUploadResponse, ChangePasswordRequest, Config, LoginRequest, LoginResponse, Pydantic schemas - 用户认证, ResetPasswordRequest (+26 more)

Community 13 - "Community 13"

Cohesion: 0.37 Nodes (210): bool, str, UploadFile, CRM 线索管理 Pydantic Schemas, CRM 商机管理 Pydantic Schemas, CRM 客户公海池规则 Pydantic Schemas, CRM 产品模块 Pydantic Schemas, CRM 供方信息 Pydantic Schemas (+202 more)

Community 14 - "Community 14"

Cohesion: 0.18 Nodes (39): Any, bool, CRM 客户 CRUD(客户主表 + 转移/成交/公海池操作), CrmCustomer, date, datetime, float, int (+31 more)

Community 15 - "Community 15"

Cohesion: 0.08 Nodes (25): 技术栈, 1. 创建虚拟环境, 项目结构, 1. 创建虚拟环境, 2. 安装依赖, 2. 安装依赖, 3. 配置环境变量, 快速开始 (+17 more)

Community 16 - "Community 16"

Cohesion: 0.12 Nodes (31): CRM 报价单 API 路由 — 挂接到 crm.router, CRM 报价单 Pydantic Schemas, QuoteAcceptBody, QuoteApprovalApproveBody, QuoteApprovalListBody, QuoteApprovalRefreshNamesBody, QuoteApprovalWithdrawBody, QuoteCreateBody (+23 more)

Community 17 - "Community 17"

Cohesion: 0.26 Nodes (22): Any, bool, datetime, int, Session, str, BizSampleCode, batch_generate_sample_codes() (+14 more)

Community 18 - "Community 18"

Cohesion: 0.17 Nodes (34): Any, bool, int, Session, str, SysUser, create_user(), get_user() (+26 more)

Community 19 - "Community 19"

Cohesion: 0.22 Nodes (11): Any, bool, int, Session, str, bool, camel_to_snake(), CRUDBase (+3 more)

Community 20 - "Community 20"

Cohesion: 0.37 Nodes (17): check_env(), check_python(), create_venv(), init_env(), install_dependencies(), log_error(), log_info(), log_success() (+9 more)

Community 21 - "Community 21"

Cohesion: 0.34 Nodes (16): Any, int, Session, str, _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept() (+8 more)

Community 22 - "Community 22"

Cohesion: 0.23 Nodes (21): Any, bool, CRM 供方信息 CRUD — 对照 CrmSupplierInfoServiceImpl.java, int, Session, str, _apply_list_filters(), create_supplier_info() (+13 more)

Community 23 - "Community 23"

Cohesion: 0.33 Nodes (10): Any, int, Session, str, list_ethnics(), 民族码表 CRUD(全局 sys_ethnic), _row_to_dict(), 民族码表 sys_ethnic(国标 GB/T 3304,全局) (+2 more)

Community 24 - "Community 24"

Cohesion: 0.29 Nodes (14): is_valid_dict_type(), load_portal_baseline(), load_sx(), load_zkxw(), main(), map_tag_type(), normalize_row(), parse_insert() (+6 more)

Community 25 - "Community 25"

Cohesion: 0.40 Nodes (13): check_python(), ensure_dirs(), ensure_venv_and_runtime(), is_running(), log_error(), log_info(), log_warn(), show_help() (+5 more)

Community 26 - "Community 26"

Cohesion: 0.27 Nodes (11): Any, bool, str, decrypt_login_payload(), ensure_initialized(), extract_login_credentials(), get_public_pem(), 登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。 (+3 more)

Community 27 - "Community 27"

Cohesion: 0.16 Nodes (30): Any, bool, int, Session, str, Any, Session, str (+22 more)

Community 28 - "Community 28"

Cohesion: 0.26 Nodes (19): Any, bool, date, int, Session, str, _contact_row_to_dict(), create_contact() (+11 more)

Community 29 - "Community 29"

Cohesion: 0.32 Nodes (7): str, eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci()

Community 30 - "Community 30"

Cohesion: 0.40 Nodes (3): BaseSettings, Config, Settings

Community 36 - "Community 36"

Cohesion: 0.17 Nodes (32): int, Any, bool, int, Session, str, Any, bool (+24 more)

Community 37 - "Community 37"

Cohesion: 0.20 Nodes (10): invoice_info_list(), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价) (+2 more)

Community 38 - "Community 38"

Cohesion: 0.11 Nodes (41): register_quote_routes(), bool, int, Session, str, accept_quote(), create_new_version(), _fill_contract_linked_count() (+33 more)

Community 39 - "Community 39"

Cohesion: 0.20 Nodes (26): Any, bool, Decimal, int, Session, str, batch_insert_quote_products(), calculate_subtotal() (+18 more)

Community 40 - "Community 40"

Cohesion: 0.22 Nodes (33): Any, bool, CRM 线索 CRUD(线索主表 + 转化/分配/无效/等级操作), date, datetime, int, Session, str (+25 more)

Community 41 - "Community 41"

Cohesion: 0.19 Nodes (18): str, Any, bool, Session, str, CRM 模块 Excel 导出列定义(字段与字典类型对齐 Java *Vo @ExcelDictFormat)。, _yes_no(), _build_workbook() (+10 more)

Community 42 - "Community 42"

Cohesion: 0.34 Nodes (16): Any, bool, int, Session, str, create_dict_type(), dict_type_code_exists(), get_dict_type() (+8 more)

Community 43 - "Community 43"

Cohesion: 0.22 Nodes (17): bool, int, Redis, Request, str, _claims_from_auth(), _coerce_post_method_override_to_get(), _get_redis_client() (+9 more)

Community 44 - "Community 44"

Cohesion: 0.67 Nodes (3): Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致), Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致), web_login_rsa_public_key()

Community 45 - "Community 45"

Cohesion: 0.08 Nodes (57): CRM 合同 CRUD — 对照 CrmContractServiceImpl.java(列表/详情 P1), Decimal, _apply_contract_entity_fields(), _apply_contract_scalar_fields(), _build_contract_filters(), _calc_amount_with_tax(), _contract_period_key(), create_contract() (+49 more)

Community 46 - "Community 46"

Cohesion: 0.10 Nodes (62): CRM 合同 API 路由 — GET/PUT/DELETE/POST 对齐原 Java CRM, register_contract_routes(), bool, Session, str, batch_assign_owner(), batch_submit_approval(), batch_submit_contract_approval() (+54 more)

Community 47 - "Community 47"

Cohesion: 0.18 Nodes (19): datetime, int, str, datetime, int, Session, str, BizNoKind (+11 more)

Community 48 - "Community 48"

Cohesion: 0.08 Nodes (42): CRM 合同 Pydantic Schemas — 对照 CrmContractBo / CrmContractVo, ContractApprovalActionBody, ContractApprovalApproveBody, ContractApprovalByContractBody, ContractApprovalExportBody, ContractApprovalListBody, ContractApprovalListQuery, ContractApprovalPageListBody (+34 more)

Community 49 - "Community 49"

Cohesion: 0.19 Nodes (20): operlog_detail(), operlog_list(), 操作日志分页列表(基于 API 请求日志适配 RuoYi OperLog 结构), Session, Any, int, Session, str (+12 more)

Community 50 - "Community 50"

Cohesion: 0.32 Nodes (17): CrmContract, Query, CrmContract, CrmContractProductPriceTier, date, datetime, Query, contract_row_to_dict() (+9 more)

Community 51 - "Community 51"

Cohesion: 0.16 Nodes (13): float, int, str, 微信消息通知服务 支持微信小程序模板消息推送 使用方式: from app.core.wechat_message import WechatMes, 发送订单状态通知 Args: openid: 用户openid order_n, 发送支付成功通知 Args: openid: 用户openid order_n, 发送配送通知 Args: openid: 配送员openid task_no:, 发送配送时效预警 Args: openid: 配送员openid task_n (+5 more)

Community 52 - "Community 52"

Cohesion: 0.29 Nodes (16): API 路由包 — 山峡化工生产一体化门户, create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), submit_leave() (+8 more)

Community 53 - "Community 53"

Cohesion: 0.10 Nodes (35): get_current_user_profile(), get_web_auth_menu_codes(), 获取当前用户信息(与 sys_user 字段对应)。, 获取当前用户信息(与 sys_user 字段对应)。, 获取当前用户菜单权限标识(sys_menu.perms,经角色继承)。, 获取当前用户菜单权限标识(sys_menu.perms,经角色继承)。, Request, Any (+27 more)

Community 54 - "Community 54"

Cohesion: 0.22 Nodes (13): _avatar_url_field(), _build_user_info_payload(), _jwt_user_payload(), public_quote_share(), 公开分享查看报价单 — Java: GET /share/{shareCode}(无 JWT), 与 web-admin userInfo 字段约定一致。, 与 web-admin userInfo 字段约定一致。, Web 端登录:账号为 sys_user.user_no,密码为 sys_user.password(bcrypt)。 (+5 more)

Community 55 - "Community 55"

Cohesion: 0.34 Nodes (16): Any, bool, int, Session, str, create_tenant(), get_tenant(), list_tenants() (+8 more)

Community 56 - "Community 56"

Cohesion: 0.18 Nodes (10): Any, Request, str, str, parse_admin_request_json(), 运营 Web(/web/admin)JSON 请求体解析。 与 ApiCryptoMiddleware 配合:中间件未改写 body 时,在路由内解密 `{, 读取 JSON body;dict 时走 resolve_request_payload(明文 / 密文 / data 包装)。 Returns:, 统一解析接口请求载荷(明文 / 密文信封)。 (+2 more)

Community 57 - "Community 57"

Cohesion: 0.19 Nodes (28): logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/shanxia2.0.sql 基线), 登出:吊销 Redis 会话(若已配置 REDIS_HOST)。, 登出:吊销 Redis 会话(若已配置 REDIS_HOST)。, refresh_token(), bool, Redis, Request (+20 more)

Community 59 - "Community 59"

Cohesion: 0.34 Nodes (21): Any, Decimal, int, Session, str, batch_add_opportunity_products(), _calc_subtotal(), create_opportunity_product() (+13 more)

Community 60 - "Community 60"

Cohesion: 0.19 Nodes (32): Any, bool, CrmContractProductPriceTier, date, Decimal, int, Session, str (+24 more)

Community 61 - "Community 61"

Cohesion: 0.17 Nodes (30): CRM 合同子模块路由 — 变更/模板/审批独立页, register_contract_sub_routes(), Any, int, 运营端角色守卫:admin / super_admin 可访问。, require_admin_or_super_admin(), _change_row_to_dict(), ContractApprovalRefreshNamesBody (+22 more)

Community 62 - "Community 62"

Cohesion: 0.10 Nodes (37): Session, str, Any, bool, int, Session, str, Session (+29 more)

Community 63 - "Community 63"

Cohesion: 0.19 Nodes (27): Any, bool, int, Session, str, date, Query, approve_quote() (+19 more)

Community 65 - "Community 65"

Cohesion: 0.43 Nodes (14): Any, bool, Session, str, _clear_default_for_customer(), create_invoice_info(), get_invoice_info(), list_invoice_info_by_customer() (+6 more)

Community 68 - "Community 68"

Cohesion: 0.33 Nodes (14): Any, int, Session, str, create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options() (+6 more)

Community 69 - "Community 69"

Cohesion: 0.19 Nodes (45): Any, CRM 商机 CRUD(主表 + 阶段/赢输单/统计/看板/漏斗), date, datetime, Decimal, int, Session, str (+37 more)

Community 70 - "Community 70"

Cohesion: 0.14 Nodes (14): product_delete(), 删除产品(支持单条 body.id 和批量 body.ids), 删除产品(支持单条 body.id 和批量 body.ids), 删除产品(支持单条 body.id 和批量 body.ids), 删除产品(支持单条 body.id 和批量 body.ids), 删除产品(支持单条 body.id 和批量 body.ids), 删除产品(支持单条 body.id 和批量 body.ids), 删除产品(支持单条 body.id 和批量 body.ids) (+6 more)

Community 71 - "Community 71"

Cohesion: 0.27 Nodes (18): Any, bool, int, Session, str, create_clue_follow(), delete_clue_follow(), get_clue_follow() (+10 more)

Community 72 - "Community 72"

Cohesion: 0.18 Nodes (20): Decimal, str, Any, str, derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。 约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断; 若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。 (+12 more)

Community 73 - "Community 73"

Cohesion: 0.23 Nodes (27): approve_task(), _business_type_label(), create_process_def(), delete_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields(), get_designer_data() (+19 more)

Community 74 - "Community 74"

Cohesion: 0.40 Nodes (5): bool, str, get_password_hash(), 验证密码(哈希非 bcrypt 或损坏时返回 False,避免抛错), verify_password()

Community 75 - "Community 75"

Cohesion: 0.27 Nodes (15): Any, bool, Session, str, list_share_logs(), _parse_user_agent(), CRM 报价单分享访问日志 CRUD — 对照 CrmQuoteShareLogServiceImpl.java, 简易 User-Agent 解析(替代 Hutool UserAgentUtil) (+7 more)

Community 76 - "Community 76"

Cohesion: 0.35 Nodes (17): Any, bool, datetime, int, Session, str, create_opportunity_follow(), list_follows_by_opportunity() (+9 more)

Community 78 - "Community 78"

Cohesion: 0.33 Nodes (11): SysOss, int, Session, str, SysOss, create_oss(), _oss_row_to_dict(), create_oss() (+3 more)

Community 79 - "Community 79"

Cohesion: 0.60 Nodes (10): Any, Session, str, _apply_create_range(), _base_query(), get_clue_level_statistics(), get_clue_overview_statistics(), get_clue_owner_statistics() (+2 more)

Community 81 - "Community 81"

Cohesion: 0.50 Nodes (4): 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, supplier_info_export()

Community 82 - "Community 82"

Cohesion: 0.50 Nodes (3): CustomerFollowByCustomerBody, CustomerFollowDetailBody, CRM 客户跟进记录 Pydantic Schemas

Community 83 - "Community 83"

Cohesion: 0.32 Nodes (7): Config, LoginResponse, ResetPasswordRequest, UserBase, UserCreate, UserResponse, UserUpdate

Community 84 - "Community 84"

Cohesion: 0.29 Nodes (6): CustomerPoolDetailBody, CustomerPoolListBody, PoolCustomerListBody, PoolRecordDetailBody, PoolRecordListBody, CRM 客户公海池记录 Pydantic Schemas

Community 85 - "Community 85"

Cohesion: 0.33 Nodes (5): CRM 客户管理 Pydantic Schemas, CustomerAssignPoolBody, CustomerCheckDuplicateBody, CustomerDetailBody, CRM 客户管理 CRUD(客户 + 联系人 + 跟进记录)

Community 86 - "Community 86"

Cohesion: 0.40 Nodes (4): ContactByCustomerBody, ContactDetailBody, ContactSetPrimaryBody, CRM 联系人 Pydantic Schemas

Community 87 - "Community 87"

Cohesion: 0.40 Nodes (5): generate_contract_no(), Java: generateContractNo — {供方编码}/X-JT + yyyyMMdd + 3位流水, Java: generateContractNo — {供方编码}/X-JT + yyyyMMdd + 3位流水, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号}, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号}

Community 88 - "Community 88"

Cohesion: 0.50 Nodes (3): Config, PageResult, ResponseModel

Community 89 - "Community 89"

Cohesion: 0.50 Nodes (3): Config, LeaveResponse, Pydantic schemas - 请假申请

Knowledge Gaps

  • 41 isolated node(s): bool, bool, Config, bool, bool (+36 more) These have ≤1 connection - possible missing edges or undocumented components.
  • 6 thin communities (<3 nodes) omitted from report — run graphify query to explore isolated nodes.

Suggested Questions

Questions this graph is uniquely positioned to answer:

  • Why does SysUser connect Community 1 to Community 0, Community 6, Community 7, Community 8, Community 10, Community 14, Community 17, Community 18, Community 19, Community 36, Community 38, Community 40, Community 45, Community 46, Community 47, Community 50, Community 53, Community 54, Community 57, Community 61, Community 63, Community 69, Community 73? High betweenness centrality (0.125) - this node is a cross-community bridge.
  • Why does generate_uuid() connect Community 0 to Community 1, Community 4, Community 7, Community 8, Community 9, Community 10, Community 14, Community 17, Community 18, Community 21, Community 22, Community 27, Community 28, Community 36, Community 38, Community 39, Community 40, Community 42, Community 45, Community 47, Community 54, Community 55, Community 57, Community 59, Community 60, Community 61, Community 62, Community 63, Community 65, Community 68, Community 69, Community 71, Community 73, Community 75, Community 76, Community 78? High betweenness centrality (0.090) - this node is a cross-community bridge.
  • Why does error_response() connect Community 11 to Community 0, Community 1, Community 6, Community 16, Community 36, Community 37, Community 38, Community 43, Community 46, Community 49, Community 52, Community 53, Community 54, Community 57, Community 61, Community 70, Community 73, Community 81, Community 88? High betweenness centrality (0.088) - this node is a cross-community bridge.
  • Are the 28 inferred relationships involving str (e.g. with CRUDBase and LeaveCreate) actually correct? str has 28 INFERRED edges - model-reasoned connections that need verification.
  • Are the 99 inferred relationships involving Session (e.g. with ClueAssignBody and ClueConvertBody) actually correct? Session has 99 INFERRED edges - model-reasoned connections that need verification.
  • Are the 37 inferred relationships involving success_response() (e.g. with category_add() and category_delete()) actually correct? success_response() has 37 INFERRED edges - model-reasoned connections that need verification.
  • Are the 28 inferred relationships involving Session (e.g. with CRUDBase and LeaveCreate) actually correct? Session has 28 INFERRED edges - model-reasoned connections that need verification.