package upstreamimpl import ( "git.5iot.com/iotlcm-public/iotlcm-upstream-chan/internal/model" "strings" ) func dxSessionAccessMode(netModel string, accessType string) string { switch strings.TrimSpace(netModel) { case "1": return "4G" case "2": return "5G" default: return strings.TrimSpace(accessType) } } func dxNetworkBlockStatus(name string, types []model.SimNetBlockType) *string { var status string switch strings.TrimSpace(name) { case "未断网": status = "0" case "已断网": status = "1" default: return nil } for _, item := range types { blockType := strings.TrimSpace(item.BlockType) if (status == "0" && blockType != "" && blockType != "0") || (status == "1" && blockType == "0") { return nil } } return &status }