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 层代码实现并验证接口返回正常数据
38 lines
1.3 KiB
Go
38 lines
1.3 KiB
Go
// Package house_presale 定义新房预售证查询接口,路由前缀 /house。
|
|
package house_presale
|
|
|
|
import "github.com/gogf/gf/v2/frame/g"
|
|
|
|
// PresaleItem 一条新房预售许可证。
|
|
type PresaleItem struct {
|
|
Id uint64 `json:"id"`
|
|
PresaleNo string `json:"presaleNo"`
|
|
CommunityName string `json:"communityName"`
|
|
Developer string `json:"developer"`
|
|
Region string `json:"region"`
|
|
Address string `json:"address"`
|
|
BuildingNo string `json:"buildingNo"`
|
|
HouseCount int `json:"houseCount"`
|
|
Area float64 `json:"area"`
|
|
Purpose string `json:"purpose"`
|
|
IssueDate string `json:"issueDate"`
|
|
PublishDate string `json:"publishDate"`
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
// PresaleListReq 分页查询新房预售证。
|
|
type PresaleListReq struct {
|
|
g.Meta `path:"/house/presale/list" method:"post" tags:"Admin/House/Presale" summary:"新房预售证列表"`
|
|
Page int `json:"page" d:"1" v:"min:1"`
|
|
Size int `json:"size" d:"10" v:"min:1|max:100"`
|
|
Region string `json:"region"`
|
|
Purpose string `json:"purpose"` // 规划用途(住宅/商业)
|
|
Keyword string `json:"keyword"` // 匹配楼盘名/开发商/预售证号
|
|
}
|
|
|
|
// PresaleListRes 是 PresaleListReq 的响应。
|
|
type PresaleListRes struct {
|
|
List []*PresaleItem `json:"list"`
|
|
Total int `json:"total"`
|
|
}
|