feat(house): 新增新房预售证模块并扩展相关功能
Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 31s
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 层代码实现并验证接口返回正常数据
This commit is contained in:
parent
ea50261cb8
commit
1e28e02dc1
@ -1,6 +1,8 @@
|
||||
# service.xpcool.com 变更记录
|
||||
> 倒序:最新在上。格式:YYYY-MM-DD | 类型 | 摘要
|
||||
|
||||
2026-08-27 | CHG | 看房新增新房预售证模块:api/house/presale + controller/service(POST /api/service/admin/house/presale/list,筛选 region/purpose/keyword,id 倒序);dto 加 HousePresaleVO;house_presale 加 publish_date 字段(013 SQL 同步 + hack/config.yaml tables 补 house_presale + gen dao 更新);权限种子 014(菜单 95 新房预售 + 950 查询权限);go build 通过、接口返回 487 条干净数据(presaleNo/publishDate 正确)
|
||||
|
||||
2026-08-27 | CHG | 看房数据扩充:013_house_presale.sql 建预售证表(presale_no 唯一);house_community 加 avg_price 字段(010 SQL 同步 + gen dao 更新 entity/do 加 AvgPrice);go build 通过
|
||||
2026-08-27 | CHG | 服务器日志(操作审计 admin_operation_log)全面增强为综合分页列表:① 新增字段 admin_username(冗余账号)、ip_location(IP归属地)、error_message(失败原因)、user_agent;② 自建纯 Go 的 xdb v4 离线解析器 internal/library/iploc(go:embed 嵌入 ip2region.xdb,无外部依赖,单次内存二分),审计写入时解析账号+归属地、记录 UA 与错误摘要;③ 查询筛选覆盖时间范围/账号/IP/归属地/HTTP方法/结果(成功2xx·失败非2xx)/关键字(权限码·路径·IP)/耗时上下限/排序(时间·耗时);④ 接口 POST /api/service/admin/system/log(body 入参,遵守全 POST 无参约定),dto.LogQuery/LogItem 同步;⑤ SQL:001_core.sql 建表补列 + 新增 010_server_log_enhance.sql 增量迁移(须手动导库,DB 结构变更不自动 DDL);go build 通过、iploc 单元冒烟通过
|
||||
2026-08-27 | FIX | 看房中心接口异常修复:根因=后端进程是旧代码(recruitment 模块中途编译错误致项目编译不过、后端停在旧进程未加载 house 路由),重启后端加载新代码;附带修复 house listing/transaction 的 List 方法 Fields 在 Count 前设置导致 COUNT(t.*,c.name) SQL 语法错误(Fields 移到 Scan 前);7 个看房接口全部 code 0 验证通过
|
||||
|
||||
@ -16,6 +16,7 @@ type PresaleItem struct {
|
||||
Area float64 `json:"area"`
|
||||
Purpose string `json:"purpose"`
|
||||
IssueDate string `json:"issueDate"`
|
||||
PublishDate string `json:"publishDate"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ func (c *Controller) PresaleList(ctx context.Context, req *presalev1.PresaleList
|
||||
Area: v.Area,
|
||||
Purpose: v.Purpose,
|
||||
IssueDate: v.IssueDate,
|
||||
PublishDate: v.PublishDate,
|
||||
Source: v.Source,
|
||||
})
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ type HousePresaleColumns struct {
|
||||
Area string // 建筑面积(平米)
|
||||
Purpose string // 规划用途(住宅/商业)
|
||||
IssueDate string // 初始核发日期
|
||||
PublishDate string // 公示发布日期(YYYY-MM-DD)
|
||||
Source string // 数据来源
|
||||
CreatedAt string //
|
||||
UpdatedAt string //
|
||||
@ -51,6 +52,7 @@ var housePresaleColumns = HousePresaleColumns{
|
||||
Area: "area",
|
||||
Purpose: "purpose",
|
||||
IssueDate: "issue_date",
|
||||
PublishDate: "publish_date",
|
||||
Source: "source",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
|
||||
@ -22,6 +22,7 @@ type HousePresale struct {
|
||||
Area any // 建筑面积(平米)
|
||||
Purpose any // 规划用途(住宅/商业)
|
||||
IssueDate any // 初始核发日期
|
||||
PublishDate any // 公示发布日期(YYYY-MM-DD)
|
||||
Source any // 数据来源
|
||||
CreatedAt any //
|
||||
UpdatedAt any //
|
||||
|
||||
@ -17,6 +17,7 @@ type HousePresale struct {
|
||||
Area float64 `json:"area" orm:"area" description:"建筑面积(平米)"` // 建筑面积(平米)
|
||||
Purpose string `json:"purpose" orm:"purpose" description:"规划用途(住宅/商业)"` // 规划用途(住宅/商业)
|
||||
IssueDate string `json:"issueDate" orm:"issue_date" description:"初始核发日期"` // 初始核发日期
|
||||
PublishDate string `json:"publishDate" orm:"publish_date" description:"公示发布日期(YYYY-MM-DD)"` // 公示发布日期(YYYY-MM-DD)
|
||||
Source string `json:"source" orm:"source" description:"数据来源"` // 数据来源
|
||||
CreatedAt string `json:"createdAt" orm:"created_at" description:""` //
|
||||
UpdatedAt string `json:"updatedAt" orm:"updated_at" description:""` //
|
||||
|
||||
Loading…
Reference in New Issue
Block a user