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 已说明。
This commit is contained in:
MiFaZhan
2026-10-23 14:46:05 +08:00
commit 59eb34976a
1132 changed files with 138197 additions and 0 deletions
@@ -0,0 +1,86 @@
package model
import (
"git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/model/request"
"github.com/gogf/gf/v2/os/gtime"
)
type SimWarningConfigListParam struct {
request.PageInfo
Id int64 `json:"id" form:"id" dc:"主键ID"`
ItemType int `json:"itemType" form:"itemType" dc:"对象类型:1单卡,2流量池"`
ItemId int64 `json:"itemId" form:"itemId" dc:"对象ID"`
ItemCode string `json:"itemCode" form:"itemCode" dc:"对象编码快照"`
WarnType int `json:"warnType" form:"warnType" dc:"兼容旧参数,优先使用warnUnit"`
WarnUnit int `json:"warnUnit" form:"warnUnit" dc:"预警单位/维度:1MB,2百分比,3天数,4月数"`
IsEnabled *int `json:"isEnabled" form:"isEnabled" dc:"是否启用:1启用,0停用"`
}
type SimWarningConfigViewParam struct {
Id int64 `json:"id" form:"id" dc:"主键ID"`
ItemType int `json:"itemType" form:"itemType" dc:"对象类型:1单卡,2流量池"`
ItemId int64 `json:"itemId" form:"itemId" dc:"对象ID"`
WarnType int `json:"warnType" form:"warnType" dc:"兼容旧参数,优先使用warnUnit"`
WarnUnit int `json:"warnUnit" form:"warnUnit" dc:"预警单位/维度"`
}
type SimWarningConfigSaveParam struct {
Id int64 `json:"id" dc:"主键ID"`
ItemType int `json:"itemType" dc:"对象类型:1单卡,2流量池;默认1"`
ItemId int64 `json:"itemId" dc:"单卡ID"`
ItemCode string `json:"itemCode" dc:"ICCID/MSISDN/IMSI或对象编码快照"`
BatchNo string `json:"batchNo" dc:"配置批次号"`
WarnType int `json:"warnType" dc:"兼容旧参数,保存时由itemType+warnUnit推导"`
WarnUnit int `json:"warnUnit" v:"required#预警类型不能为空" dc:"预警单位/维度:1MB,2百分比,3天数,4月数"`
FirstWarn float64 `json:"firstWarn" v:"required#第一档阈值不能为空" dc:"第一档预警阈值"`
SecondWarn float64 `json:"secondWarn" dc:"第二档预警阈值"`
ThirdWarn float64 `json:"thirdWarn" dc:"第三档预警阈值"`
WarnMethods string `json:"warnMethods" dc:"预警方式:默认3平台消息;多选逗号分隔"`
WarnPhones string `json:"warnPhones" dc:"预警手机号,多个逗号分隔"`
WarnEmails string `json:"warnEmails" dc:"预警邮箱,多个逗号分隔"`
AutoAction int `json:"autoAction" dc:"第三次是否断网:0否,3是"`
AppNotifyEnabled *int `json:"appNotifyEnabled" dc:"是否开启小程序订阅通知:1开启,0关闭"`
IsEnabled *int `json:"isEnabled" dc:"是否启用:1启用,0停用"`
Remark string `json:"remark" dc:"备注"`
}
type SimWarningConfigDeleteParam struct {
Id int64 `json:"id" v:"required#配置ID不能为空" dc:"主键ID"`
}
type SimWarningConfigStatusParam struct {
Id int64 `json:"id" v:"required#配置ID不能为空" dc:"主键ID"`
IsEnabled int `json:"isEnabled" v:"in:0,1#启停状态无效" dc:"是否启用:1启用,0停用"`
}
type SimWarningConfigModel struct {
Id int64 `json:"id" orm:"id" dc:"主键ID"`
TenantId string `json:"tenantId" orm:"tenant_id" dc:"租户ID"`
ItemType int `json:"itemType" orm:"item_type" dc:"对象类型:1单卡,2流量池"`
ItemId int64 `json:"itemId" orm:"item_id" dc:"对象ID"`
ItemCode string `json:"itemCode" orm:"item_code" dc:"对象编码快照"`
BatchNo string `json:"batchNo" orm:"batch_no" dc:"配置批次号"`
WarnType int `json:"warnType" dc:"运行时推导预警类型"`
WarnUnit int `json:"warnUnit" orm:"warn_unit" dc:"预警单位/维度:1MB,2百分比,3天数,4月数"`
FirstWarn float64 `json:"firstWarn" orm:"first_warn" dc:"第一档预警阈值"`
SecondWarn float64 `json:"secondWarn" orm:"second_warn" dc:"第二档预警阈值"`
ThirdWarn float64 `json:"thirdWarn" orm:"third_warn" dc:"第三档预警阈值"`
WarnMethods string `json:"warnMethods" orm:"warn_methods" dc:"预警方式"`
WarnPhones string `json:"warnPhones" orm:"warn_phones" dc:"预警手机号"`
WarnEmails string `json:"warnEmails" orm:"warn_emails" dc:"预警邮箱"`
AutoAction int `json:"autoAction" orm:"auto_action" dc:"第三次是否断网"`
AppNotifyEnabled int `json:"appNotifyEnabled" orm:"app_notify_enabled" dc:"是否开启小程序订阅通知"`
IsEnabled int `json:"isEnabled" orm:"is_enabled" dc:"是否启用"`
WxTemplateId string `json:"wxTemplateId" orm:"wx_template_id" dc:"微信订阅消息模板ID"`
Remark string `json:"remark" orm:"remark" dc:"备注"`
CreatedDept int64 `json:"createdDept" orm:"created_dept" dc:"创建部门"`
CreatedBy int64 `json:"createdBy" orm:"created_by" dc:"创建者"`
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" dc:"创建时间"`
UpdatedBy int64 `json:"updatedBy" orm:"updated_by" dc:"更新者"`
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" dc:"更新时间"`
}
type SimWarningConfigSaveModel struct {
Id int64 `json:"id" dc:"配置ID"`
}