59eb34976a
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 已说明。
229 lines
7.2 KiB
Go
229 lines
7.2 KiB
Go
package consts
|
|
|
|
const (
|
|
BatchAsyncStatusCreated = 0
|
|
BatchAsyncStatusPending = 1
|
|
BatchAsyncStatusProcessing = 2
|
|
BatchAsyncStatusSuccess = 3
|
|
BatchAsyncStatusFailed = 4
|
|
BatchAsyncStatusPartialSuccess = 5
|
|
)
|
|
|
|
const (
|
|
BatchRunResultPending = 0
|
|
BatchRunResultRunning = 1
|
|
BatchRunResultSuccess = 2
|
|
BatchRunResultFailed = 3
|
|
BatchRunResultPartialSuccess = 4
|
|
)
|
|
|
|
const (
|
|
BatchStatusNormal = 0
|
|
BatchStatusAbandoned = 1
|
|
)
|
|
|
|
const (
|
|
BatchDetailStatusPending = 0
|
|
BatchDetailStatusRunning = 1
|
|
BatchDetailStatusSuccess = 2
|
|
BatchDetailStatusFailed = 3
|
|
)
|
|
|
|
const (
|
|
BatchSourceTypeBatchSelect = 0
|
|
BatchSourceTypeRange = 1
|
|
BatchSourceTypeBatchInput = 2
|
|
BatchSourceTypeFile = 3
|
|
BatchSourceTypeScheduled = 4
|
|
)
|
|
|
|
const (
|
|
BatchTypeInbound = 1
|
|
BatchTypeOutbound = 2
|
|
BatchTypeAllocate = 3
|
|
BatchTypePrepare = 4
|
|
BatchTypeCardAddPackage = 11
|
|
BatchTypePoolAddPackage = 12
|
|
BatchTypeSimWarningConfig = 40
|
|
BatchTypeTrafficCutoffConfig = 41
|
|
|
|
BatchTypeRenew = 101
|
|
BatchTypeChange = 102
|
|
BatchTypeStart = 103
|
|
BatchTypeStop = 104
|
|
BatchTypeRestart = 105
|
|
BatchTypeCancel = 106
|
|
BatchTypeDataCut = 107
|
|
BatchTypeUnsub = 108
|
|
BatchTypeDataStart = 109
|
|
BatchTypeDataStop = 110
|
|
)
|
|
|
|
const (
|
|
BatchNoPrefixInbound = "INB"
|
|
BatchNoPrefixOutbound = "OUT"
|
|
BatchNoPrefixAllocate = "ALC"
|
|
BatchNoPrefixCardAddPackage = "ADP"
|
|
BatchNoPrefixPoolAddPackage = "PAP"
|
|
BatchNoPrefixSimWarningConfig = "SWC"
|
|
BatchNoPrefixTrafficCutoffConfig = "TCC"
|
|
|
|
BatchNoPrefixRenew = "REN"
|
|
BatchNoPrefixChange = "CHG"
|
|
BatchNoPrefixStart = "STR"
|
|
BatchNoPrefixStop = "STP"
|
|
BatchNoPrefixRestart = "RST"
|
|
BatchNoPrefixCancel = "CAN"
|
|
BatchNoPrefixDataCut = "DCT"
|
|
BatchNoPrefixUnsub = "UNS"
|
|
BatchNoPrefixDataStart = "DOP"
|
|
BatchNoPrefixDataStop = "DST"
|
|
)
|
|
|
|
const (
|
|
BlankOutStatusYes = 0
|
|
BlankOutStatusNo = 1
|
|
)
|
|
|
|
const (
|
|
DownloadStatusPending = 0
|
|
DownloadStatusGenerated = 1
|
|
DownloadStatusRunning = 2
|
|
DownloadStatusFailed = 3
|
|
)
|
|
|
|
const (
|
|
ResourceTypeExcel = 1
|
|
ResourceExportSceneInbound = 1
|
|
ResourceExportSceneOutbound = 2
|
|
ResourceExportSceneAllocate = 3
|
|
ResourceExportSceneCardAddPackage = 11
|
|
ResourceExportScenePoolAddPackage = 12
|
|
ResourceExportSceneSimWarningConfig = 40
|
|
ResourceExportSceneTrafficCutoffConfig = 41
|
|
ResourceExportSceneRenew = 101
|
|
ResourceExportSceneChange = 102
|
|
ResourceExportSceneCancel = 106
|
|
ResourceExportSceneDataCut = 107
|
|
ResourceExportSceneUnsub = 108
|
|
ResourceExportSceneDataStart = 109
|
|
ResourceExportSceneDataStop = 110
|
|
)
|
|
|
|
const (
|
|
ImportStatusSuccess = "success"
|
|
ImportStatusFailed = "failed"
|
|
)
|
|
|
|
const (
|
|
ResourceBatchDownloadTaskSimCardInbound = "卡入库结果"
|
|
ResourceBatchDownloadTaskSimCardOutbound = "卡出库结果"
|
|
ResourceBatchDownloadTaskSimCardRenew = "卡续费结果"
|
|
ResourceBatchDownloadTaskSimCardChange = "卡变更套餐结果"
|
|
ResourceBatchDownloadTaskSimCardCancel = "卡销户结果"
|
|
ResourceBatchDownloadTaskSimCardUnsub = "卡退订结果"
|
|
ResourceBatchDownloadTaskSimCardAddPackage = "单卡加油包结果"
|
|
ResourceBatchDownloadTaskSimPoolAddPackage = "流量池加油包结果"
|
|
ResourceBatchDownloadTaskSimWarningConfig = "预警配置结果"
|
|
ResourceBatchDownloadTaskTrafficCutoffConfig = "达量断网配置结果"
|
|
ResourceBatchDownloadTaskSimCardDataCut = "SIM卡达量断网结果"
|
|
|
|
SimCardInboundMaxFileSize = 50 << 20
|
|
SimCardInboundSubDirImportInput = "sim-card-inbound/import-input"
|
|
SimCardInboundDefaultInputInlineMaxRows = 1000
|
|
SimCardOutboundMaxFileSize = 50 << 20
|
|
SimCardRenewMaxFileSize = 50 << 20
|
|
SimCardChangeMaxFileSize = 50 << 20
|
|
SimCardCancelMaxFileSize = 50 << 20
|
|
SimCardUnsubMaxFileSize = 50 << 20
|
|
SimCardAddPackageMaxFileSize = 50 << 20
|
|
SimPoolAddPackageMaxFileSize = 50 << 20
|
|
|
|
SimCardInboundSubDirImportExcel = "sim-card-inbound/import"
|
|
SimCardInboundSubDirResultExcel = "sim-card-inbound/result"
|
|
SimCardOutboundSubDirImportExcel = "sim-card-outbound/import"
|
|
SimCardOutboundSubDirResultExcel = "sim-card-outbound/result"
|
|
SimCardRenewSubDirImportExcel = "sim-card-renew/import"
|
|
SimCardRenewSubDirResultExcel = "sim-card-renew/result"
|
|
SimCardChangeSubDirImportExcel = "sim-card-change/import"
|
|
SimCardChangeSubDirResultExcel = "sim-card-change/result"
|
|
SimCardCancelSubDirImportExcel = "sim-card-cancel/import"
|
|
SimCardCancelSubDirResultExcel = "sim-card-cancel/result"
|
|
SimCardUnsubSubDirImportExcel = "sim-card-unsub/import"
|
|
SimCardUnsubSubDirResultExcel = "sim-card-unsub/result"
|
|
SimCardAddPackageSubDirImportExcel = "sim-card-add-package/import"
|
|
SimCardAddPackageSubDirResultExcel = "sim-card-add-package/result"
|
|
SimPoolAddPackageSubDirImportExcel = "sim-pool-add-package/import"
|
|
SimPoolAddPackageSubDirResultExcel = "sim-pool-add-package/result"
|
|
|
|
SimCardDataStartMaxFileSize = 50 << 20
|
|
SimCardDataStopMaxFileSize = 50 << 20
|
|
|
|
// 业务受理-开停数据 / 停复机(自主复机、重启)单次导入的条数上限,Excel 与批量输入统一生效
|
|
SimCardBatchMaxRows = 20000
|
|
SimCardDataStartSubDirImportExcel = "sim-card-data-start/import"
|
|
SimCardDataStartSubDirResultExcel = "sim-card-data-start/result"
|
|
SimCardDataStopSubDirImportExcel = "sim-card-data-stop/import"
|
|
SimCardDataStopSubDirResultExcel = "sim-card-data-stop/result"
|
|
|
|
SimWarningConfigMaxFileSize = 50 << 20
|
|
SimWarningConfigSubDirImportExcel = "sim-warning-config/import"
|
|
SimWarningConfigSubDirResultExcel = "sim-warning-config/result"
|
|
SimCardTrafficCutoffConfigMaxFileSize = 50 << 20
|
|
SimCardTrafficCutoffConfigSubDirImportExcel = "sim-card-traffic-cutoff-config/import"
|
|
SimCardTrafficCutoffConfigSubDirResultExcel = "sim-card-traffic-cutoff-config/result"
|
|
SimCardDataCutMaxFileSize = 50 << 20
|
|
SimCardDataCutSubDirImportExcel = "sim-card-data-cut/import"
|
|
SimCardDataCutSubDirResultExcel = "sim-card-data-cut/result"
|
|
)
|
|
|
|
const (
|
|
OrderTypeCardSubscribe = 1
|
|
OrderTypeCardRenew = 2
|
|
OrderTypeCardChange = 3
|
|
|
|
OrderStatusCompleted = 5
|
|
|
|
CustomerTypeAgent = 1
|
|
|
|
PayTypeOffline = 3
|
|
PayTypeBalance = 4
|
|
|
|
PayStatusPaid = 2
|
|
|
|
ProductTypeCard = 1
|
|
|
|
PayModeYearMonth = 1
|
|
|
|
PackageBusinessTypeSubscribe = 0
|
|
PackageBusinessTypeChange = 1
|
|
PackageBusinessTypeRenew = 2
|
|
|
|
// Package types: formal card/pool packages and their add-on packages.
|
|
PackageTypeCard = 101
|
|
PackageTypePool = 102
|
|
PackageTypeCardAddPackage = 103
|
|
PackageTypePoolAddPackage = 104
|
|
|
|
OrderReturnStatusNone = 0
|
|
OrderReturnStatusPending = 1
|
|
OrderReturnStatusRunning = 2
|
|
OrderReturnStatusPartial = 3
|
|
OrderReturnStatusSuccess = 4
|
|
)
|
|
|
|
const (
|
|
PackageStatusNone = 0
|
|
PackageStatusPending = 1
|
|
PackageStatusEffective = 2
|
|
PackageStatusExpired = 3
|
|
)
|
|
|
|
const (
|
|
EffectiveStatusPending = 0
|
|
EffectiveStatusEffective = 1
|
|
EffectiveStatusExpired = 2
|
|
EffectiveStatusTerminated = 3
|
|
EffectiveStatusVoided = 4
|
|
)
|