From bc40155ef059a6cd57a7f11398c845732d37cb91 Mon Sep 17 00:00:00 2001 From: tangweijie <877588133@qq.com> Date: Thu, 22 Jan 2026 21:10:49 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8F=8A=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 deploy/ 目录包含 Docker 部署配置、数据库脚本、部署脚本 - 更新 .gitignore 忽略 deploy 构建产物 - 添加 AGENTS.md AI Agent 指南 - 添加项目构建脚本 build.sh --- .cursor/rules/usecluade.mdc | 9 + .gitignore | 7 + AGENTS.md | 154 + backend | 2 +- build.sh | 162 ++ deploy/.gitignore | 27 + deploy/DEPLOYMENT_CHECKLIST.md | 297 ++ deploy/DEPLOYMENT_STATUS.md | 232 ++ deploy/DEPLOY_JAR.md | 393 +++ deploy/README.md | 439 +++ deploy/config/application-prod.yaml | 173 ++ deploy/docker-compose.yml | 100 + deploy/scripts/check-remote.sh | 188 ++ deploy/scripts/deploy-xlcp.sh | 131 + deploy/scripts/init-db.sh | 94 + deploy/scripts/init-permissions.sh | 48 + deploy/scripts/save-images-xlcp.sh | 100 + deploy/sql/prison_schema.sql | 290 ++ deploy/sql/quartz.sql | 284 ++ deploy/sql/ruoyi-vue-pro.sql | 4087 +++++++++++++++++++++++++++ docs/DEPLOYMENT.md | 756 +++++ frontend | 2 +- images-archive/upload.sh | 57 + 23 files changed, 8030 insertions(+), 2 deletions(-) create mode 100644 .cursor/rules/usecluade.mdc create mode 100644 AGENTS.md create mode 100644 build.sh create mode 100644 deploy/.gitignore create mode 100644 deploy/DEPLOYMENT_CHECKLIST.md create mode 100644 deploy/DEPLOYMENT_STATUS.md create mode 100644 deploy/DEPLOY_JAR.md create mode 100644 deploy/README.md create mode 100644 deploy/config/application-prod.yaml create mode 100644 deploy/docker-compose.yml create mode 100755 deploy/scripts/check-remote.sh create mode 100755 deploy/scripts/deploy-xlcp.sh create mode 100755 deploy/scripts/init-db.sh create mode 100755 deploy/scripts/init-permissions.sh create mode 100755 deploy/scripts/save-images-xlcp.sh create mode 100644 deploy/sql/prison_schema.sql create mode 100644 deploy/sql/quartz.sql create mode 100644 deploy/sql/ruoyi-vue-pro.sql create mode 100644 docs/DEPLOYMENT.md create mode 100755 images-archive/upload.sh diff --git a/.cursor/rules/usecluade.mdc b/.cursor/rules/usecluade.mdc new file mode 100644 index 0000000..de7be1d --- /dev/null +++ b/.cursor/rules/usecluade.mdc @@ -0,0 +1,9 @@ +--- +name: usecluade +description: This is a new rule +--- + +# Overview + +Insert overview text here. The agent will only see this should they choose to apply the rule. +请使用CLAUDE.md中的规则来回答问题。 \ No newline at end of file diff --git a/.gitignore b/.gitignore index f9b09f0..edbed78 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,13 @@ Thumbs.db .history/ codegen/ +# ========== Deploy ========== +deploy/xlcp-images/ +deploy/data/ +deploy/logs/ +deploy/*/target/ +deploy/*/dist/ + # ========== Frontend (separate repo) ========== frontend/ node_modules/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..e6d3718 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,154 @@ +# AGENTS.md + +This file provides guidance for AI agents working on the XL Prison Management System codebase. + +## Project Overview + +XL监狱综合管理平台 - A prison management platform built on the Yudao (芋道) framework. + +**Tech Stack**: Java 17, Spring Boot 3.5.9, MyBatis-Plus, Vue 3.5.12, TypeScript 5.3.3, Element Plus, MySQL 8.0+ + +## Essential Commands + +### Backend (Maven) +```bash +# Build all modules +cd backend && mvn clean install -DskipTests + +# Build prison module only +cd backend/yudao-module-prison && mvn clean package + +# Run dev server (port 48080) +cd backend/yudao-server && mvn spring-boot:run + +# Run all tests +cd backend/yudao-module-prison && mvn test + +# Run single test class +mvn test -Dtest=PrisonAreaControllerTest + +# Force update dependencies +mvn clean install -U +``` + +### Frontend (pnpm) +```bash +cd frontend + +# Install dependencies +pnpm install + +# Dev server (local mode) +pnpm dev + +# TypeScript checking +pnpm ts:check + +# Build for different environments +pnpm build:local # Uses .env.local +pnpm build:dev # Uses .env.dev +pnpm build:prod # Uses .env.prod + +# Linting +pnpm lint:eslint # ESLint check & fix (.js,.ts,.vue) +pnpm lint:format # Prettier format +pnpm lint:style # Stylelint fix +``` + +### Quick Start with Make +```bash +make frontend # Start frontend dev server +make backend # Start backend dev server +make run # Start both +``` + +## Code Style Guidelines + +### Java (Backend) + +**Imports**: Grouped by: Spring → Yudao → Third-party → Java stdlib. No wildcard imports. + +**Naming Conventions**: +- Classes: PascalCase (e.g., `PrisonAreaController`, `ScoreDO`) +- Variables/Methods: camelCase (e.g., `getPage()`, `updateTime`) +- Constants: UPPER_SNAKE_CASE (e.g., `DEFAULT_PAGE_SIZE`) +- Package: `cn.iocoder.yudao.module.prison.{module}` + +**VO Naming**: `SaveReqVO`, `PageReqVO`, `RespVO` suffixes required. + +**Annotations**: Place on separate lines. Order: `@RestController` → `@RequestMapping` → `@Tag` → `@PreAuthorize`. + +**Error Handling**: Use `CommonResult` return type. Throw `ServiceException` for business errors with error codes from `ErrorCodeConstants`. + +**Comments**: No comments unless explaining complex business logic. Javadoc only on public APIs. + +### TypeScript/Vue (Frontend) + +**Imports**: Sorted alphabetically. No unused imports. Use absolute imports (`@/`). + +**Naming**: +- Interfaces: PascalCase (e.g., `Area`, `QuestionnaireRecord`) +- Variables/Props: camelCase +- Components: PascalCase file names, kebab-case usage + +**Types**: Avoid `any`. Use explicit types or `unknown` for union types. + +**Vue Composition API**: Use `