Files
iotlcm/server/internal/model/batch_execution_log.go
T
MiFaZhan 59eb34976a chore: 初始开源发布
iotlcm-admin-svr:管理后台服务。

- Go module:iotlcm → git.5iot.com/iotlcm-public/iotlcm-admin-svr(729 文件)
- 凭据与地址脱敏:JWT signingKey(含代码里的 MustGet 默认值)、
  MySQL DSN、Redis 口令、告警邮件发件人邮箱全部改为占位;
  私网 IP → 文档地址段;库名 xiujie_admin → iotlcm
- 真实手机号/邮箱 → 合法 11 位编造号 / example.com
- 移除内部资产:CI 触发器、过时 DDL(sql/db_iotlcm.sql)、
  私有依赖 go get 行、明文 registry 登录口令
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- Dockerfile 改用公共基础镜像
- 拼错的 RADEME.md → README.md,README 重写
- 需要真实数据库的用例改为可用 IOTLCM_TEST_WITH_DB=1 显式启用
- 补 Apache-2.0 LICENSE,LF 行尾 + .gitattributes

数据库 schema 不随本仓发布(生产 DDL 已过时),README 已说明。
2026-10-23 14:48:30 +08:00

88 lines
4.6 KiB
Go

package model
import (
"context"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/allocationunits"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/xgorm/hook"
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"github.com/gogf/gf/v2/encoding/gjson"
"github.com/gogf/gf/v2/os/gtime"
)
type BatchExecutionLogListParam struct {
request.PageInfo
SourceChannel string `json:"sourceChannel" v:"in:console,mini_program,api,system,legacy#发起渠道不正确" dc:"发起渠道"`
ExecutionMode *int `json:"executionMode" v:"in:0,1,2#操作规模不正确" dc:"操作规模"`
SourceType *int `json:"sourceType" v:"in:0,1,2,3,4#输入方式不正确" dc:"输入方式"`
Keyword string `json:"keyword" dc:"关键字"`
BatchNo string `json:"batchNo" dc:"批次编号"`
BatchType *int `json:"batchType" dc:"批次类型"`
BatchAsyncStatus *int `json:"batchAsyncStatus" dc:"异步处理状态"`
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
}
func (in *BatchExecutionLogListParam) Filter(ctx context.Context) (err error) {
return
}
type BatchExecutionLogListModel struct {
allocationunits.Fields
UnitInfo *gjson.Json `json:"-" orm:"batch_info"`
StoredTargetDeptId int64 `json:"-" orm:"target_dept_id"`
SourceChannel string `json:"sourceChannel" dc:"发起渠道"`
ExecutionMode int `json:"executionMode" dc:"操作规模"`
Id int64 `json:"id" dc:"主键ID"`
BatchNo string `json:"batchNo" dc:"批次编号"`
BatchType int `json:"batchType" dc:"批次类型"`
SourceType *int `json:"sourceType" dc:"来源方式 枚举"`
BatchAsyncStatus int `json:"batchAsyncStatus" dc:"异步处理状态"`
TotalCount int `json:"totalCount" dc:"总数量"`
RunResult int `json:"runResult" dc:"运行结果"`
FailReason string `json:"failReason" dc:"失败原因"`
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
}
type BatchExecutionLogDetailParam struct {
BatchNo string `json:"batchNo" v:"required#批次号不能为空" dc:"批次编号"`
}
func (in *BatchExecutionLogDetailParam) Filter(ctx context.Context) (err error) {
return
}
type BatchExecutionLogFileModel struct {
OssId int64 `json:"ossId" dc:"OSS文件ID"`
Url string `json:"url" dc:"文件URL"`
}
type BatchExecutionLogResultFileModel struct {
DownloadId int64 `json:"downloadId" dc:"下载任务ID"`
OssId int64 `json:"ossId" dc:"OSS文件ID"`
Url string `json:"url" dc:"文件URL"`
DownloadStatus int `json:"downloadStatus" dc:"下载状态"`
}
type BatchExecutionLogDetailModel struct {
allocationunits.Fields
SourceChannel string `json:"sourceChannel" dc:"发起渠道"`
ExecutionMode int `json:"executionMode" dc:"操作规模"`
Id int64 `json:"id" dc:"主键ID"`
BatchNo string `json:"batchNo" dc:"批次编号"`
BatchType int `json:"batchType" dc:"批次类型"`
SourceType *int `json:"sourceType" dc:"来源方式 枚举"`
BatchAsyncStatus int `json:"batchAsyncStatus" dc:"异步处理状态 0=已创建 1=待处理 2=处理中 3=成功 4=失败 5=部分成功"`
RunResult int `json:"runResult" dc:"运行结果"`
FailReason string `json:"failReason" dc:"失败原因"`
TotalCount int `json:"totalCount" dc:"总数量"`
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
SourceFile *BatchExecutionLogFileModel `json:"sourceFile" dc:"源文件"`
ResultFile *BatchExecutionLogResultFileModel `json:"resultFile" dc:"结果文件"`
}