|
Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 31s
- 添加 api/house/presale 接口模块实现新房预售证查询功能 - 新增 POST /api/service/admin/house/presale/list 接口支持 region/purpose/keyword 筛选 - 在 HousePresaleVO 中增加 PublishDate 字段用于存储公示发布日期 - 在 house_presale 表中添加 publish_date 字段并完成数据库同步 - 更新权限种子配置新增菜单 95 新房预售及 950 查询权限 - 完成相关 controller 和 service 层代码实现并验证接口返回正常数据 |
||
|---|---|---|
| .gitea/workflows | ||
| .workbuddy/memory | ||
| api | ||
| common | ||
| deploy | ||
| docs | ||
| hack | ||
| internal | ||
| manifest | ||
| resource | ||
| utility | ||
| .gitattributes | ||
| .gitignore | ||
| AGENTS.md | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| PROJECT_STRUCTURE.md | ||
| README.MD | ||
Personal multi-client service
Layout
api → internal/controller → internal/service → internal/dao → internal/model(entity/do) is enforced. DTO and VO live in internal/model/dto and internal/model/vo; neither API types nor entities cross that boundary.
Database model generation
Run manifest/sql/001_core.sql on MySQL, set DB_DSN, then run:
gf gen dao -p internal -g default -gt -c
The command is intentionally the only source of internal/dao, internal/model/do, and internal/model/entity.
API isolation
/api/v1/*: user API, terminal header/body supportsmini,h5, andapp./admin/v1/*: admin API. Protected endpoints require both an admin access token and anX-Permissionidentifier.
Use GF_GCFG_FILE=config.dev.yaml (or config.test.yaml / config.prod.yaml) and set DB_DSN plus a strong JWT_SECRET before startup.
Local startup
- Terminal:
source .env.dev && go run main.go(.env.devis gitignored, holds local DSN + secret). - GoLand: run configuration
.run/service-dev.run.xml(project-level, auto-detected after reloading the project) already injectsGF_GCFG_FILE/DB_DSN/JWT_SECRET; pick it in the run dropdown. The file is gitignored because it contains the DB password.