新增获取终端数量统计,任务统计

This commit is contained in:
chy
2025-07-05 14:33:28 +08:00
parent 2dfe6540ae
commit 28bb6c6797
13 changed files with 356 additions and 51 deletions

View File

@ -0,0 +1,107 @@
// ==========================================================================
// 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"
)
// StoreClientSessionsDao is the data access object for the table store_client_sessions.
type StoreClientSessionsDao 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 StoreClientSessionsColumns // columns contains all the column names of Table for convenient usage.
handlers []gdb.ModelHandler // handlers for customized model modification.
}
// StoreClientSessionsColumns defines and stores column names for the table store_client_sessions.
type StoreClientSessionsColumns struct {
Id string // 记录ID
StoreId string // 所属门店ID
ClientId string // 客户机ID
AreaId string // 所属区域ID
XyUserId string // 系统唯一用户ID
LevelId string // 会员等级ID如0表示临时卡
LevelName string // 会员等级名称
StartTime string // 上机时间
EndTime string // 下机时间
UsedTime string // 使用时长(分钟)
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 软删除时间戳
AreaName string //
UserId string // 用户 id
}
// storeClientSessionsColumns holds the columns for the table store_client_sessions.
var storeClientSessionsColumns = StoreClientSessionsColumns{
Id: "id",
StoreId: "store_id",
ClientId: "client_id",
AreaId: "area_id",
XyUserId: "xy_user_id",
LevelId: "level_id",
LevelName: "level_name",
StartTime: "start_time",
EndTime: "end_time",
UsedTime: "used_time",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
AreaName: "area_name",
UserId: "user_id",
}
// NewStoreClientSessionsDao creates and returns a new DAO object for table data access.
func NewStoreClientSessionsDao(handlers ...gdb.ModelHandler) *StoreClientSessionsDao {
return &StoreClientSessionsDao{
group: "default",
table: "store_client_sessions",
columns: storeClientSessionsColumns,
handlers: handlers,
}
}
// DB retrieves and returns the underlying raw database management object of the current DAO.
func (dao *StoreClientSessionsDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of the current DAO.
func (dao *StoreClientSessionsDao) Table() string {
return dao.table
}
// Columns returns all column names of the current DAO.
func (dao *StoreClientSessionsDao) Columns() StoreClientSessionsColumns {
return dao.columns
}
// Group returns the database configuration group name of the current DAO.
func (dao *StoreClientSessionsDao) 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 *StoreClientSessionsDao) 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 *StoreClientSessionsDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@ -21,32 +21,28 @@ type StoreNetfeeAreaLevelDao struct {
// StoreNetfeeAreaLevelColumns defines and stores column names for the table store_netfee_area_level.
type StoreNetfeeAreaLevelColumns struct {
Id string // 主键ID
StoreId string // 门店ID
RewardId string // 奖励IDrewards表主键
AreaId string // 区域ID外部系统
AreaName string // 区域名称
MemberLevelId string // 会员等级ID外部系统
MemberLevelName string // 会员等级名称
PriceData string // 7x24价格矩阵
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 删除时间
Id string // 主键ID
StoreId string // 门店ID
RewardId string // 奖励IDrewards表主键
AreaId string // 区域ID外部系统
MemberLevelId string // 会员等级ID外部系统
PriceData string // 7x24价格矩阵
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
DeletedAt string // 删除时间
}
// storeNetfeeAreaLevelColumns holds the columns for the table store_netfee_area_level.
var storeNetfeeAreaLevelColumns = StoreNetfeeAreaLevelColumns{
Id: "id",
StoreId: "store_id",
RewardId: "reward_id",
AreaId: "area_id",
AreaName: "area_name",
MemberLevelId: "member_level_id",
MemberLevelName: "member_level_name",
PriceData: "price_data",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
Id: "id",
StoreId: "store_id",
RewardId: "reward_id",
AreaId: "area_id",
MemberLevelId: "member_level_id",
PriceData: "price_data",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
DeletedAt: "deleted_at",
}
// NewStoreNetfeeAreaLevelDao creates and returns a new DAO object for table data access.

View File

@ -0,0 +1,22 @@
// =================================================================================
// This file is auto-generated by the GoFrame CLI tool. You may modify it as needed.
// =================================================================================
package dao
import (
"server/internal/dao/internal"
)
// storeClientSessionsDao is the data access object for the table store_client_sessions.
// You can define custom methods on it to extend its functionality as needed.
type storeClientSessionsDao struct {
*internal.StoreClientSessionsDao
}
var (
// StoreClientSessions is a globally accessible object for table store_client_sessions operations.
StoreClientSessions = storeClientSessionsDao{internal.NewStoreClientSessionsDao()}
)
// Add your custom methods and functionality below.