Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 35s
- 新增新房预售证表 house_presale 存储预售许可信息 - 为 house_community 表添加 avg_price 字段存储小区参考均价 - 增强服务器操作审计日志功能,新增管理员账号、IP归属地、错误信息、UA等字段 - 实现纯Go版IP归属地离线解析器,无外部依赖,支持二分查找 - 优化看房列表查询逻辑,修复Fields设置位置导致的SQL语法错误 - 集成招聘模块,添加独立数据库配置和Bark推送服务支持 - 重构日志查询接口,支持多维度筛选和综合分页列表展示 - 更新DAO实体结构同步数据库表结构调整
116 lines
4.1 KiB
Go
116 lines
4.1 KiB
Go
// ==========================================================================
|
|
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
|
// ==========================================================================
|
|
|
|
package internal
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/database/gdb"
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
// HouseCommunityDao is the data access object for the table house_community.
|
|
type HouseCommunityDao struct {
|
|
table string // table is the underlying table name of the DAO.
|
|
group string // group is the database configuration group name of the current DAO.
|
|
columns HouseCommunityColumns // columns contains all the column names of Table for convenient usage.
|
|
handlers []gdb.ModelHandler // handlers for customized model modification.
|
|
}
|
|
|
|
// HouseCommunityColumns defines and stores column names for the table house_community.
|
|
type HouseCommunityColumns struct {
|
|
Id string //
|
|
Name string // 小区/楼盘名
|
|
Region string // 区县(云岩/南明/观山湖/花溪等)
|
|
BusinessDistrict string // 板块
|
|
Address string // 地址
|
|
Lng string // 经度(GCJ-02)
|
|
Lat string // 纬度(GCJ-02)
|
|
BuildYear string // 建成年份
|
|
Households string // 总户数
|
|
PlotRatio string // 容积率
|
|
GreenRate string // 绿化率
|
|
AvgPrice string // 小区参考均价(元/平米)
|
|
PropertyCompany string // 物业公司
|
|
PropertyFee string // 物业费(元/月/平米)
|
|
Developer string // 开发商
|
|
Source string // 数据来源
|
|
CreatedAt string //
|
|
UpdatedAt string //
|
|
DeletedAt string //
|
|
}
|
|
|
|
// houseCommunityColumns holds the columns for the table house_community.
|
|
var houseCommunityColumns = HouseCommunityColumns{
|
|
Id: "id",
|
|
Name: "name",
|
|
Region: "region",
|
|
BusinessDistrict: "business_district",
|
|
Address: "address",
|
|
Lng: "lng",
|
|
Lat: "lat",
|
|
BuildYear: "build_year",
|
|
Households: "households",
|
|
PlotRatio: "plot_ratio",
|
|
GreenRate: "green_rate",
|
|
AvgPrice: "avg_price",
|
|
PropertyCompany: "property_company",
|
|
PropertyFee: "property_fee",
|
|
Developer: "developer",
|
|
Source: "source",
|
|
CreatedAt: "created_at",
|
|
UpdatedAt: "updated_at",
|
|
DeletedAt: "deleted_at",
|
|
}
|
|
|
|
// NewHouseCommunityDao creates and returns a new DAO object for table data access.
|
|
func NewHouseCommunityDao(handlers ...gdb.ModelHandler) *HouseCommunityDao {
|
|
return &HouseCommunityDao{
|
|
group: "default",
|
|
table: "house_community",
|
|
columns: houseCommunityColumns,
|
|
handlers: handlers,
|
|
}
|
|
}
|
|
|
|
// DB retrieves and returns the underlying raw database management object of the current DAO.
|
|
func (dao *HouseCommunityDao) DB() gdb.DB {
|
|
return g.DB(dao.group)
|
|
}
|
|
|
|
// Table returns the table name of the current DAO.
|
|
func (dao *HouseCommunityDao) Table() string {
|
|
return dao.table
|
|
}
|
|
|
|
// Columns returns all column names of the current DAO.
|
|
func (dao *HouseCommunityDao) Columns() HouseCommunityColumns {
|
|
return dao.columns
|
|
}
|
|
|
|
// Group returns the database configuration group name of the current DAO.
|
|
func (dao *HouseCommunityDao) Group() string {
|
|
return dao.group
|
|
}
|
|
|
|
// Ctx creates and returns a Model for the current DAO. It automatically sets the context for the current operation.
|
|
func (dao *HouseCommunityDao) Ctx(ctx context.Context) *gdb.Model {
|
|
model := dao.DB().Model(dao.table)
|
|
for _, handler := range dao.handlers {
|
|
model = handler(model)
|
|
}
|
|
return model.Safe().Ctx(ctx)
|
|
}
|
|
|
|
// Transaction wraps the transaction logic using function f.
|
|
// It rolls back the transaction and returns the error if function f returns a non-nil error.
|
|
// It commits the transaction and returns nil if function f returns nil.
|
|
//
|
|
// Note: Do not commit or roll back the transaction in function f,
|
|
// as it is automatically handled by this function.
|
|
func (dao *HouseCommunityDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
|
return dao.Ctx(ctx).Transaction(ctx, f)
|
|
}
|