chore: 初始开源发布
iotlcm-openapi:对外 OpenAPI 网关(V3 接口 + 旧版兼容接口)。
- Go module:iotlcm-openapi → git.5iot.com/iotlcm-public/iotlcm-openapi(178 文件)
- 凭据与地址脱敏:JWT signingKey、MySQL DSN、Redis 口令、
RabbitMQ DSN 全部改为 ${*} 占位;私网 IP → 文档地址段
- 7 处真实手机号 → 合法 11 位编造号
- 启动 banner 统一 IOTLCM 方块字 + 社区惯例署名
- 移除内部资产:CI 触发器
- Dockerfile 改用公共基础镜像,移除 GOPRIVATE 内网设置
- README 重写(原为 GoFrame 模板占位文案),补 Apache-2.0 LICENSE,
LF 行尾 + .gitattributes
This commit is contained in:
@@ -0,0 +1,241 @@
|
||||
// Package genin
|
||||
// @Link https://github.com/xiujiecn/xiu-admin
|
||||
// @Copyright Copyright (c) 2026 LiXiujie
|
||||
// @Author Lxj <li@xiujie.cn>
|
||||
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
|
||||
// @AutoGenerate Version
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/library/xgorm/hook"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/model/entity"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/model/request"
|
||||
|
||||
"github.com/gogf/gf/v2/encoding/gjson"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// BatchMainUpdateFields 修改批次主表字段过滤
|
||||
type BatchMainUpdateFields struct {
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
OrderSn string `json:"orderSn" dc:"订单编号"`
|
||||
BatchType int `json:"batchType" dc:"批次类型 枚举"`
|
||||
BatchStatus int `json:"batchStatus" dc:"批次状态 枚举"`
|
||||
SourceType int `json:"sourceType" dc:"来源方式 枚举"`
|
||||
SourceBatchNo string `json:"sourceBatchNo" dc:"来源批次编号"`
|
||||
IsCrossDept int `json:"isCrossDept" dc:"是否跨级操作机构 0-否 1-是"`
|
||||
TargetDeptId int64 `json:"targetDeptId" dc:"目标机构编号"`
|
||||
DeptId int64 `json:"deptId" dc:"机构编号"`
|
||||
TotalCount int `json:"totalCount" dc:"总数量"`
|
||||
ValidCount int `json:"validCount" dc:"有效数量"`
|
||||
SuccessCount int `json:"successCount" dc:"成功数量"`
|
||||
FailCount int `json:"failCount" dc:"失败数量"`
|
||||
RunResult int `json:"runResult" dc:"运行结果:0-待运行 1-运行中 2-成功 3-失败"`
|
||||
FailReason string `json:"failReason" dc:"失败原因"`
|
||||
BatchInfo *gjson.Json `json:"batchInfo" dc:"批次信息:入库/出库展示字段"`
|
||||
Remark *gjson.Json `json:"remark" dc:"备注扩展字段"`
|
||||
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
|
||||
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者ID"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// BatchMainInsertFields 新增批次主表字段过滤
|
||||
type BatchMainInsertFields struct {
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
OrderSn string `json:"orderSn" dc:"订单编号"`
|
||||
BatchType int `json:"batchType" dc:"批次类型 枚举"`
|
||||
BatchStatus int `json:"batchStatus" dc:"批次状态 枚举"`
|
||||
SourceType int `json:"sourceType" dc:"来源方式 枚举"`
|
||||
SourceBatchNo string `json:"sourceBatchNo" dc:"来源批次编号"`
|
||||
IsCrossDept int `json:"isCrossDept" dc:"是否跨级操作机构 0-否 1-是"`
|
||||
TargetDeptId int64 `json:"targetDeptId" dc:"目标机构编号"`
|
||||
DeptId int64 `json:"deptId" dc:"机构编号"`
|
||||
TotalCount int `json:"totalCount" dc:"总数量"`
|
||||
ValidCount int `json:"validCount" dc:"有效数量"`
|
||||
SuccessCount int `json:"successCount" dc:"成功数量"`
|
||||
FailCount int `json:"failCount" dc:"失败数量"`
|
||||
RunResult int `json:"runResult" dc:"运行结果:0-待运行 1-运行中 2-成功 3-失败"`
|
||||
FailReason string `json:"failReason" dc:"失败原因"`
|
||||
BatchInfo *gjson.Json `json:"batchInfo" dc:"批次信息:入库/出库展示字段"`
|
||||
Remark *gjson.Json `json:"remark" dc:"备注扩展字段"`
|
||||
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
|
||||
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
// BatchMainEditParam 修改/新增批次主表
|
||||
type BatchMainEditParam struct {
|
||||
//entity.BatchMain
|
||||
Id int64 `json:"id" dc:"主键ID"`
|
||||
BatchNo *string `json:"batchNo" dc:"批次编号"`
|
||||
OrderSn *string `json:"orderSn" dc:"订单编号"`
|
||||
BatchType *int `json:"batchType" dc:"批次类型 枚举"`
|
||||
BatchStatus *int `json:"batchStatus" dc:"批次状态 枚举"`
|
||||
SourceType *int `json:"sourceType" dc:"来源方式 枚举"`
|
||||
SourceBatchNo *string `json:"sourceBatchNo" dc:"来源批次编号"`
|
||||
IsCrossDept *int `json:"isCrossDept" dc:"是否跨级操作机构 0-否 1-是"`
|
||||
TargetDeptId *int64 `json:"targetDeptId" dc:"目标机构编号"`
|
||||
DeptId *int64 `json:"deptId" dc:"机构编号"`
|
||||
TotalCount *int `json:"totalCount" dc:"总数量"`
|
||||
ValidCount *int `json:"validCount" dc:"有效数量"`
|
||||
SuccessCount *int `json:"successCount" dc:"成功数量"`
|
||||
FailCount *int `json:"failCount" dc:"失败数量"`
|
||||
RunResult *int `json:"runResult" dc:"运行结果:0-待运行 1-运行中 2-成功 3-失败"`
|
||||
FailReason *string `json:"failReason" dc:"失败原因"`
|
||||
BatchInfo *gjson.Json `json:"batchInfo" dc:"批次信息:入库/出库展示字段"`
|
||||
Remark *gjson.Json `json:"remark" dc:"备注扩展字段"`
|
||||
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
|
||||
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
|
||||
TenantId *string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept *int64 `json:"createdDept" dc:"创建部门ID"`
|
||||
CreatedBy *int64 `json:"createdBy" dc:"创建者ID"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy *int64 `json:"updatedBy" dc:"更新者ID"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
func (in *BatchMainEditParam) Filter(ctx context.Context) (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
type BatchMainEditModel struct{}
|
||||
|
||||
// BatchMainDeleteParam 删除批次主表
|
||||
type BatchMainDeleteParam struct {
|
||||
Id interface{} `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
|
||||
}
|
||||
|
||||
func (in *BatchMainDeleteParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type BatchMainDeleteModel struct{}
|
||||
|
||||
type BatchMainRequeueParam struct {
|
||||
BatchNo string `json:"batchNo" v:"required#批次编号不能为空" dc:"批次编号"`
|
||||
Reason string `json:"reason" v:"required#重投原因不能为空" dc:"重投原因"`
|
||||
}
|
||||
|
||||
func (in *BatchMainRequeueParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type BatchMainRequeueModel struct {
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
BatchType int `json:"batchType" dc:"批次类型"`
|
||||
BatchAsyncStatus int `json:"batchAsyncStatus" dc:"异步处理状态"`
|
||||
RunResult int `json:"runResult" dc:"运行结果"`
|
||||
Requeued bool `json:"requeued" dc:"是否已重投"`
|
||||
}
|
||||
|
||||
// BatchMainViewParam 获取指定批次主表信息
|
||||
type BatchMainViewParam struct {
|
||||
Id int64 `json:"id" v:"required#主键ID不能为空" dc:"主键ID"`
|
||||
}
|
||||
|
||||
func (in *BatchMainViewParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type BatchMainViewModel struct {
|
||||
entity.BatchMain
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者ID摘要信息"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者ID摘要信息"`
|
||||
}
|
||||
|
||||
// BatchMainListParam 获取批次主表列表
|
||||
type BatchMainListParam struct {
|
||||
request.PageInfo
|
||||
Id int64 `json:"id" dc:"主键ID"`
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
OrderSn string `json:"orderSn" dc:"订单编号"`
|
||||
BatchType *int `json:"batchType" dc:"批次类型 枚举"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
func (in *BatchMainListParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type BatchMainListModel struct {
|
||||
BatchInfo *gjson.Json `json:"batchInfo" dc:"批次信息:入库/出库展示字段"`
|
||||
Id int64 `json:"id" dc:"主键ID"`
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
OrderSn string `json:"orderSn" dc:"订单编号"`
|
||||
BatchType int `json:"batchType" dc:"批次类型 枚举"`
|
||||
BatchAsyncStatus int `json:"batchAsyncStatus" dc:"异步处理状态 0=已创建 1=待处理 2=处理中 3=成功 4=失败 5=部分成功"`
|
||||
SourceType int `json:"sourceType" dc:"来源方式 枚举"`
|
||||
SourceBatchNo string `json:"sourceBatchNo" dc:"来源批次编号"`
|
||||
IsCrossDept int `json:"isCrossDept" dc:"是否跨级操作机构 0-否 1-是"`
|
||||
TargetDeptId int64 `json:"targetDeptId" dc:"目标机构编号"`
|
||||
DeptId int64 `json:"deptId" dc:"机构编号"`
|
||||
TotalCount int `json:"totalCount" dc:"总数量"`
|
||||
ValidCount int `json:"validCount" dc:"有效数量"`
|
||||
SuccessCount int `json:"successCount" dc:"成功数量"`
|
||||
FailCount int `json:"failCount" dc:"失败数量"`
|
||||
RunResult int `json:"runResult" dc:"运行结果:0-待运行 1-运行中 2-成功 3-失败"`
|
||||
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
|
||||
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者ID摘要信息"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者ID"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者ID摘要信息"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// BatchMainSuccessListParam 获取指定类型成功批次列表
|
||||
type BatchMainSuccessListParam struct {
|
||||
request.PageInfo
|
||||
BatchType int `json:"batchType" dc:"批次类型(不传则查询所有成功批次)"`
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
Time []*gtime.Time `json:"time" dc:"批次执行时间"`
|
||||
}
|
||||
|
||||
func (in *BatchMainSuccessListParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type BatchMainSuccessListModel struct {
|
||||
BatchInfo *gjson.Json `json:"batchInfo" dc:"批次业务参数"`
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
BatchType int `json:"batchType" dc:"批次类型"`
|
||||
BatchTime *gtime.Time `json:"batchTime" orm:"start_time" dc:"批次执行时间"`
|
||||
TotalCount int `json:"totalCount" dc:"总数量"`
|
||||
}
|
||||
|
||||
// BatchMainExportModel 导出批次主表
|
||||
type BatchMainExportModel struct {
|
||||
Id int64 `json:"id" dc:"主键ID"`
|
||||
BatchNo string `json:"batchNo" dc:"批次编号"`
|
||||
OrderSn string `json:"orderSn" dc:"订单编号"`
|
||||
BatchType int `json:"batchType" dc:"批次类型 枚举"`
|
||||
BatchAsyncStatus int `json:"batchAsyncStatus" dc:"异步处理状态 0=已创建 1=待处理 2=处理中 3=成功 4=失败 5=部分成功"`
|
||||
SourceType int `json:"sourceType" dc:"来源方式 枚举"`
|
||||
SourceBatchNo string `json:"sourceBatchNo" dc:"来源批次编号"`
|
||||
IsCrossDept int `json:"isCrossDept" dc:"是否跨级操作机构 0-否 1-是"`
|
||||
TargetDeptId int64 `json:"targetDeptId" dc:"目标机构编号"`
|
||||
DeptId int64 `json:"deptId" dc:"机构编号"`
|
||||
TotalCount int `json:"totalCount" dc:"总数量"`
|
||||
ValidCount int `json:"validCount" dc:"有效数量"`
|
||||
SuccessCount int `json:"successCount" dc:"成功数量"`
|
||||
FailCount int `json:"failCount" dc:"失败数量"`
|
||||
RunResult int `json:"runResult" dc:"运行结果:0-待运行 1-运行中 2-成功 3-失败"`
|
||||
StartTime *gtime.Time `json:"startTime" dc:"开始时间"`
|
||||
EndTime *gtime.Time `json:"endTime" dc:"结束时间"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门ID"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者ID"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者ID"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
Reference in New Issue
Block a user