实现长效套餐创建逻辑,并整合不同套餐类型的创建流程

This commit is contained in:
2025-05-17 18:59:43 +08:00
parent d9613a19fb
commit 3f8e48ec68
9 changed files with 391 additions and 297 deletions

View File

@@ -1,5 +1,7 @@
package edge
import "strings"
type ISP int32
const (
@@ -9,6 +11,18 @@ const (
IspChinaMobile // 中国移动
)
func ISPFromStr(str string) ISP {
switch {
case strings.Contains(str, "电信"):
return IspChinaTelecom
case strings.Contains(str, "联通"):
return IspChinaUnicom
case strings.Contains(str, "移动"):
return IspChinaMobile
}
return IspUnknown
}
type Type int32
const (