package consts func FormalPackageTypes() []int { return []int{PackageTypeCard, PackageTypePool} } func IsAddPackageType(packageType int) bool { return packageType == PackageTypeCardAddPackage || packageType == PackageTypePoolAddPackage } const ( BatchTypeInbound = 1 BatchTypeAllocate = 3 BatchTypeCardAddPackage = 11 BatchTypePoolAddPackage = 12 BatchTypeSimCardStart = 103 BatchTypeSimCardStop = 104 BatchTypeSimCardRestart = 105 BatchTypeSimCardCancel = 106 BatchTypeSimCardUnsub = 108 BatchTypeDataCut = 107 BatchTypeDataStart = 109 BatchTypeDataStop = 110 BatchTypeSimWarningConfig = 40 BatchTypeTrafficCutoffConfig = 41 BatchTypeTrafficCutoff = BatchTypeTrafficCutoffConfig // Deprecated: use BatchTypeTrafficCutoffConfig. // 异步续费/变更扩展 BatchTypePrepare = 4 // 预处理(renew/change 共用 prepare) BatchTypeRenew = 101 // 卡续费 BatchTypeChange = 102 // 卡变更套餐 // t_sim_card_bind_pkg.package_type 中,只有正式卡套餐和池套餐参与续费/变更判断。 PackageTypeCard = 101 PackageTypePool = 102 PackageTypeCardAddPackage = 103 PackageTypePoolAddPackage = 104 BatchSourceTypeBatchSelect = 0 BatchSourceTypeRange = 1 BatchSourceTypeBatchInput = 2 BatchSourceTypeFile = 3 BatchSourceTypeScheduled = 4 BatchSourceTypeExcel = BatchSourceTypeFile BatchSourceTypeInput = BatchSourceTypeBatchInput BatchNoPrefixCardAddPackage = "ADP" BatchNoPrefixPoolAddPackage = "PAP" SimCardStatusOperTypeStop = "0" SimCardStatusOperTypeStart = "1" RestartPhaseCreated = "created" RestartPhaseWaitingResume = "waiting_resume" RestartPhaseResuming = "resuming" RestartPhaseFinished = "finished" SimBossCardStatusActivated = 2 SimBossCardStatusStopped = 4 SimBossCardStatusCanceled = 9 SimApnOperTypeOpen = "0" SimApnOperTypeStop = "1" SimApnNameDefault = "CMIOT" SimDataServiceStatusEnabled = 1 SimDataServiceStatusDisabled = 0 BatchAsyncStatusPending = 1 BatchAsyncStatusProcessing = 2 BatchAsyncStatusSuccess = 3 BatchAsyncStatusFailed = 4 BatchAsyncStatusPartialSuccess = 5 BatchRunResultPending = 0 BatchRunResultRunning = 1 BatchRunResultSuccess = 2 BatchRunResultFailed = 3 BatchRunResultPartialSuccess = 4 BatchDetailStatusPending = 0 BatchDetailStatusRunning = 1 BatchDetailStatusSuccess = 2 BatchDetailStatusFailed = 3 ResourceTypeExcel = 1 DownloadStatusGenerated = 1 ResourceExportSceneCardAddPackage = 11 ResourceExportScenePoolAddPackage = 12 // 卡套餐有效状态 PackageStatusNone = 0 PackageStatusPending = 1 PackageStatusEffective = 2 PackageStatusExpired = 3 // 订购记录有效状态(t_sim_card_bind_pkg.effective_status) EffectiveStatusPending = 0 EffectiveStatusEffective = 1 EffectiveStatusExpired = 2 EffectiveStatusTerminated = 3 EffectiveStatusVoided = 4 // 退订状态(t_order.return_status) OrderReturnStatusNone = 0 OrderReturnStatusSuccess = 4 OrderReturnStatusPartial = 3 // Renew/change order contract. These values mirror the Admin cardpackage // domain and the production t_order/t_order_item enum contract. OrderTypeCardSubscribe = 1 OrderTypeCardRenew = 2 OrderTypeCardChange = 3 OrderStatusCompleted = 5 CustomerTypeAgent = 1 PayTypeOffline = 3 PayTypeBalance = 4 PayStatusPaid = 2 ProductTypeCard = 1 PayModeYearMonth = 1 ShippingMethodNone = 3 PackageBusinessTypeSubscribe = 0 PackageBusinessTypeChange = 1 PackageBusinessTypeRenew = 2 ResourceBatchDownloadTaskSimCardAddPackage = "单卡加油包结果" ResourceBatchDownloadTaskSimPoolAddPackage = "流量池加油包结果" SimCardAddPackageMaxFileSize = 50 << 20 SimPoolAddPackageMaxFileSize = 50 << 20 SimCardAddPackageSubDirImportExcel = "sim-card-add-package/import" SimCardAddPackageSubDirResultExcel = "sim-card-add-package/result" SimPoolAddPackageSubDirImportExcel = "sim-pool-add-package/import" SimPoolAddPackageSubDirResultExcel = "sim-pool-add-package/result" // 续费/变更结果目录 SimCardRenewResultSubDir = "sim-card-renew/result" SimCardChangeResultSubDir = "sim-card-change/result" // 续费/变更结果任务名(沿用 Admin 约定) ResultTaskSimCardRenew = "卡续费结果" ResultTaskSimCardChange = "卡变更套餐结果" ResultTaskSimCardPrepare = "卡续费/变更预处理结果" ) // RenewPriceSource 续费/变更价格来源 const ( RenewPriceSourceSystem = "system" RenewPriceSourceAgentDefault = "agentDefault" RenewPriceSourceTarget = "target" )