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 变更记录
|
# service.xpcool.com 变更记录
|
||||||
> 倒序:最新在上。格式:YYYY-MM-DD | 类型 | 摘要
|
> 倒序:最新在上。格式: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 | 看房数据扩充: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 | 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 验证通过
|
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"`
|
Area float64 `json:"area"`
|
||||||
Purpose string `json:"purpose"`
|
Purpose string `json:"purpose"`
|
||||||
IssueDate string `json:"issueDate"`
|
IssueDate string `json:"issueDate"`
|
||||||
|
PublishDate string `json:"publishDate"`
|
||||||
Source string `json:"source"`
|
Source string `json:"source"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@ func (c *Controller) PresaleList(ctx context.Context, req *presalev1.PresaleList
|
|||||||
Area: v.Area,
|
Area: v.Area,
|
||||||
Purpose: v.Purpose,
|
Purpose: v.Purpose,
|
||||||
IssueDate: v.IssueDate,
|
IssueDate: v.IssueDate,
|
||||||
|
PublishDate: v.PublishDate,
|
||||||
Source: v.Source,
|
Source: v.Source,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,7 @@ type HousePresaleColumns struct {
|
|||||||
Area string // 建筑面积(平米)
|
Area string // 建筑面积(平米)
|
||||||
Purpose string // 规划用途(住宅/商业)
|
Purpose string // 规划用途(住宅/商业)
|
||||||
IssueDate string // 初始核发日期
|
IssueDate string // 初始核发日期
|
||||||
|
PublishDate string // 公示发布日期(YYYY-MM-DD)
|
||||||
Source string // 数据来源
|
Source string // 数据来源
|
||||||
CreatedAt string //
|
CreatedAt string //
|
||||||
UpdatedAt string //
|
UpdatedAt string //
|
||||||
@ -51,6 +52,7 @@ var housePresaleColumns = HousePresaleColumns{
|
|||||||
Area: "area",
|
Area: "area",
|
||||||
Purpose: "purpose",
|
Purpose: "purpose",
|
||||||
IssueDate: "issue_date",
|
IssueDate: "issue_date",
|
||||||
|
PublishDate: "publish_date",
|
||||||
Source: "source",
|
Source: "source",
|
||||||
CreatedAt: "created_at",
|
CreatedAt: "created_at",
|
||||||
UpdatedAt: "updated_at",
|
UpdatedAt: "updated_at",
|
||||||
|
|||||||
@ -22,6 +22,7 @@ type HousePresale struct {
|
|||||||
Area any // 建筑面积(平米)
|
Area any // 建筑面积(平米)
|
||||||
Purpose any // 规划用途(住宅/商业)
|
Purpose any // 规划用途(住宅/商业)
|
||||||
IssueDate any // 初始核发日期
|
IssueDate any // 初始核发日期
|
||||||
|
PublishDate any // 公示发布日期(YYYY-MM-DD)
|
||||||
Source any // 数据来源
|
Source any // 数据来源
|
||||||
CreatedAt any //
|
CreatedAt any //
|
||||||
UpdatedAt any //
|
UpdatedAt any //
|
||||||
|
|||||||
@ -6,19 +6,20 @@ package entity
|
|||||||
|
|
||||||
// HousePresale is the golang structure for table house_presale.
|
// HousePresale is the golang structure for table house_presale.
|
||||||
type HousePresale struct {
|
type HousePresale struct {
|
||||||
Id uint64 `json:"id" orm:"id" description:""` //
|
Id uint64 `json:"id" orm:"id" description:""` //
|
||||||
PresaleNo string `json:"presaleNo" orm:"presale_no" description:"预售证号"` // 预售证号
|
PresaleNo string `json:"presaleNo" orm:"presale_no" description:"预售证号"` // 预售证号
|
||||||
CommunityName string `json:"communityName" orm:"community_name" description:"楼盘/项目名"` // 楼盘/项目名
|
CommunityName string `json:"communityName" orm:"community_name" description:"楼盘/项目名"` // 楼盘/项目名
|
||||||
Developer string `json:"developer" orm:"developer" description:"房地产开发企业"` // 房地产开发企业
|
Developer string `json:"developer" orm:"developer" description:"房地产开发企业"` // 房地产开发企业
|
||||||
Region string `json:"region" orm:"region" description:"区县"` // 区县
|
Region string `json:"region" orm:"region" description:"区县"` // 区县
|
||||||
Address string `json:"address" orm:"address" description:"建筑位置"` // 建筑位置
|
Address string `json:"address" orm:"address" description:"建筑位置"` // 建筑位置
|
||||||
BuildingNo string `json:"buildingNo" orm:"building_no" description:"楼栋号"` // 楼栋号
|
BuildingNo string `json:"buildingNo" orm:"building_no" description:"楼栋号"` // 楼栋号
|
||||||
HouseCount int `json:"houseCount" orm:"house_count" description:"套数"` // 套数
|
HouseCount int `json:"houseCount" orm:"house_count" description:"套数"` // 套数
|
||||||
Area float64 `json:"area" orm:"area" description:"建筑面积(平米)"` // 建筑面积(平米)
|
Area float64 `json:"area" orm:"area" description:"建筑面积(平米)"` // 建筑面积(平米)
|
||||||
Purpose string `json:"purpose" orm:"purpose" description:"规划用途(住宅/商业)"` // 规划用途(住宅/商业)
|
Purpose string `json:"purpose" orm:"purpose" description:"规划用途(住宅/商业)"` // 规划用途(住宅/商业)
|
||||||
IssueDate string `json:"issueDate" orm:"issue_date" description:"初始核发日期"` // 初始核发日期
|
IssueDate string `json:"issueDate" orm:"issue_date" description:"初始核发日期"` // 初始核发日期
|
||||||
Source string `json:"source" orm:"source" description:"数据来源"` // 数据来源
|
PublishDate string `json:"publishDate" orm:"publish_date" description:"公示发布日期(YYYY-MM-DD)"` // 公示发布日期(YYYY-MM-DD)
|
||||||
CreatedAt string `json:"createdAt" orm:"created_at" description:""` //
|
Source string `json:"source" orm:"source" description:"数据来源"` // 数据来源
|
||||||
UpdatedAt string `json:"updatedAt" orm:"updated_at" description:""` //
|
CreatedAt string `json:"createdAt" orm:"created_at" description:""` //
|
||||||
DeletedAt string `json:"deletedAt" orm:"deleted_at" description:""` //
|
UpdatedAt string `json:"updatedAt" orm:"updated_at" description:""` //
|
||||||
|
DeletedAt string `json:"deletedAt" orm:"deleted_at" description:""` //
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user