diff --git a/.gitignore b/.gitignore index 0c0da3e..51f3bb8 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,5 @@ nbdist/ !*/build/*.java !*/build/*.html !*/build/*.xml + +logs/ diff --git a/AGENTS.md b/AGENTS.md index 6c29401..0211000 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,27 +1,27 @@ -# Repository Guidelines +# 仓库协作指南 -## Project Structure & Module Organization -This repository follows the RuoYi-Vue split architecture. Backend modules live at the repo root: `ruoyi-admin` is the Spring Boot entry point, `ruoyi-framework` holds security and web infrastructure, `ruoyi-system` contains business services and MyBatis mappers, `ruoyi-common` stores shared utilities, and `ruoyi-quartz` / `ruoyi-generator` provide scheduling and code generation. Frontend code is in `ruoyi-ui`, with pages under `src/views`, API wrappers under `src/api`, shared components under `src/components`, and static assets under `src/assets`. SQL scripts belong in `sql/`, and project documents go in `doc/`. +## 项目结构与模块组织 +本仓库采用 RuoYi-Vue 前后端分离架构。后端模块位于仓库根目录:`ruoyi-admin` 为 Spring Boot 启动入口,`ruoyi-framework` 负责安全与 Web 基础设施,`ruoyi-system` 承载业务服务与 MyBatis Mapper,`ruoyi-common` 存放公共工具,`ruoyi-quartz` 与 `ruoyi-generator` 分别提供定时任务和代码生成功能。前端代码位于 `ruoyi-ui`,页面放在 `src/views`,接口封装位于 `src/api`,公共组件位于 `src/components`,静态资源位于 `src/assets`。SQL 脚本统一放在 `sql/`,项目文档统一放在 `doc/`。 -## Build, Test, and Development Commands -Backend: -- `mvn clean package -DskipTests` builds all Java modules. -- `mvn test` runs backend tests for the full Maven reactor. -- `mvn -pl ruoyi-admin -am spring-boot:run` starts the admin service with dependent modules. +## 构建、测试与开发命令 +后端: +- `mvn clean package -DskipTests`:构建全部 Java 模块。 +- `mvn test`:运行整个 Maven 聚合工程的后端测试。 +- `mvn -pl ruoyi-admin -am spring-boot:run`:启动管理端服务,并自动构建依赖模块。 -Frontend: -- `cd ruoyi-ui && nvm use && npm install` installs frontend dependencies with Node managed by `nvm`. -- `cd ruoyi-ui && npm run dev` starts the Vue 2 development server. -- `cd ruoyi-ui && npm run build:prod` creates the production bundle. +前端: +- `cd ruoyi-ui && nvm use && npm install`:通过 `nvm` 切换并使用项目要求的 Node 版本后安装依赖。 +- `cd ruoyi-ui && npm run dev`:启动 Vue 2 开发服务。 +- `cd ruoyi-ui && npm run build:prod`:构建生产环境前端产物。 -## Coding Style & Naming Conventions -Use 4 spaces for Java indentation and keep packages under `com.ruoyi.`. Follow existing suffixes such as `*Controller`, `*Service`, `*ServiceImpl`, and `*Mapper`; mapper XML files should stay under `src/main/resources/mapper/**`. Vue files follow the existing feature layout, for example `src/views/system/user/index.vue` and `src/api/system/user.js`. Match the repository’s current naming style instead of introducing new patterns. +## 编码风格与命名规范 +Java 代码统一使用 4 个空格缩进,包路径保持在 `com.ruoyi.` 下。请沿用现有后缀命名,例如 `*Controller`、`*Service`、`*ServiceImpl`、`*Mapper`;Mapper XML 文件应继续放在 `src/main/resources/mapper/**` 下。Vue 文件遵循现有功能目录组织方式,例如 `src/views/system/user/index.vue` 与 `src/api/system/user.js`。新增代码时请保持与仓库现有命名风格一致,不要引入新的命名体系。 -## Testing Guidelines -There are currently no committed `src/test` files, so new backend features should add focused tests under `module/src/test/java` using the `*Test` suffix. When changing frontend behavior, at minimum verify `npm run build:prod` succeeds and smoke-test the affected page flow locally. Keep tests narrow and aligned to the module you changed. +## 测试规范 +当前仓库中尚未发现已提交的 `src/test` 测试文件,因此新增后端功能时,应在对应模块的 `src/test/java` 下补充聚焦型测试类,并使用 `*Test` 作为类名后缀。涉及前端改动时,至少需要验证 `npm run build:prod` 可以成功执行,并对相关页面流程进行本地冒烟验证。测试范围应聚焦于本次改动所在模块,避免无关扩散。 -## Commit & Pull Request Guidelines -Current history is minimal (`init`), so keep commit messages short, specific, and in Chinese, for example `新增贷款定价审批接口`. Ignore `.DS_Store` changes. PRs should state the affected modules, summarize behavior changes, list any SQL or configuration updates, and include screenshots for UI changes. +## 提交与 Pull Request 规范 +当前仓库提交历史较少,仅有 `init`,因此提交信息请保持简短、明确,并统一使用中文,例如 `新增贷款定价审批接口`。忽略 `.DS_Store` 文件的变更。提交 PR 时,需要说明影响的模块、概述行为变化、列出 SQL 或配置变更,并在涉及界面调整时附上截图。 -## Agent-Specific Notes -Every change should leave an implementation record in `doc/`. If a feature touches both backend and frontend, maintain separate frontend and backend implementation plans; otherwise, record only the impacted side. +## Agent 协作说明 +每次改动都必须在 `doc/` 中留下实施记录。如果一个功能同时涉及前端和后端,则需要分别维护前端实施计划和后端实施计划;如果仅涉及单侧改动,则只记录对应侧的实施内容。