新增云平台运营中心ECS列表和租户列表添加到xlsx表
This commit is contained in:
parent
c3b814bd68
commit
2b6f2beede
@ -52,7 +52,7 @@ func Fw_event(cookieStr string) {
|
||||
sheet.Cell("N1").SetString("请求路径")
|
||||
sheet.Cell("O1").SetString("参数")
|
||||
sheet.Cell("P1").SetString("源ip地区")
|
||||
log.Println("生成表格表头标题")
|
||||
log.Println("生成表格列名完成")
|
||||
//当前时间
|
||||
EndTime := time.Unix(tool.Timestamp("second"), 0).Format("2006-01-02T15:04:05")
|
||||
//今天0点
|
||||
|
@ -1,6 +1,3 @@
|
||||
package openapi
|
||||
|
||||
var Zecs = `
|
||||
{
|
||||
"requestId": "15f04d3c-365f-4204-96e4-fa9dd28e2744",
|
||||
"code": "Success",
|
||||
@ -2722,200 +2719,4 @@ var Zecs = `
|
||||
}
|
||||
]
|
||||
}
|
||||
}`
|
||||
|
||||
var Zuser = `
|
||||
{
|
||||
"requestId": "d9111bf5-e6bb-4016-b08a-70985b165dae",
|
||||
"code": "Success",
|
||||
"message": "",
|
||||
"data": {
|
||||
"size": 10,
|
||||
"current": 1,
|
||||
"total": 22,
|
||||
"totalPage": 3,
|
||||
"list": [
|
||||
{
|
||||
"id": "1937897449892872282",
|
||||
"tenantName": "司法局督办系统",
|
||||
"remark": "",
|
||||
"createTime": "1740036884000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwsfdb",
|
||||
"userAdminId": "1937897449892872284",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1935344323763634263",
|
||||
"tenantName": "煤矿安全风险监测预警系统",
|
||||
"remark": "",
|
||||
"createTime": "1739442439000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwmkaj",
|
||||
"userAdminId": "1935344323763634265",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1933362020262871124",
|
||||
"tenantName": "李超",
|
||||
"remark": "管理员",
|
||||
"createTime": "1738980898000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "licc",
|
||||
"userAdminId": "1933362020262871126",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1909704420602413068",
|
||||
"tenantName": "行政审批服务管理局_审批辅助管理系统",
|
||||
"remark": "",
|
||||
"createTime": "1733472684000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwfzgl",
|
||||
"userAdminId": "1909704420602413070",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1909695169108639748",
|
||||
"tenantName": "行政审批服务管理局_便民系统",
|
||||
"remark": "",
|
||||
"createTime": "1733470529000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwbmxt",
|
||||
"userAdminId": "1909695169108639750",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1898489170070863881",
|
||||
"tenantName": "云州区委员会宣传部",
|
||||
"remark": "",
|
||||
"createTime": "1730861430000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwyzxc",
|
||||
"userAdminId": "1898489170070863883",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1898184326177095686",
|
||||
"tenantName": "大同市数据局",
|
||||
"remark": "",
|
||||
"createTime": "1730790453000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwsjj",
|
||||
"userAdminId": "1898184326177095688",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1896688599521296387",
|
||||
"tenantName": "大同市电子健康卡系统",
|
||||
"remark": "",
|
||||
"createTime": "1730442201000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwwjwk",
|
||||
"userAdminId": "1896688599521296389",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1893644300797870081",
|
||||
"tenantName": "大同市市场监督管理局",
|
||||
"remark": "",
|
||||
"createTime": "1729733396000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwscjd",
|
||||
"userAdminId": "1893644300797870083",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1893374890518511616",
|
||||
"tenantName": "审批局取叫号系统",
|
||||
"remark": "",
|
||||
"createTime": "1729670668000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwqjhxt",
|
||||
"userAdminId": "1893374890518511618",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
`
|
222
dtcloud/hlw.go
Normal file
222
dtcloud/hlw.go
Normal file
@ -0,0 +1,222 @@
|
||||
package dtcloud
|
||||
|
||||
import (
|
||||
"dt_automate/tool"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/Esword618/unioffice/schema/soo/sml"
|
||||
"github.com/Esword618/unioffice/spreadsheet"
|
||||
)
|
||||
|
||||
// 运营平台-获取单个ecs的cpu使用情况
|
||||
func Cpu() {
|
||||
fileData, err := ioutil.ReadFile("dtcloud/cpu.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var data map[string]interface{}
|
||||
err = json.Unmarshal(fileData, &data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Println(data)
|
||||
}
|
||||
|
||||
// 运营平台-获取单个ecs的memory使用情况
|
||||
func Memory() {
|
||||
fileData, err := ioutil.ReadFile("dtcloud/memory.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var data map[string]interface{}
|
||||
err = json.Unmarshal(fileData, &data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Println(data)
|
||||
}
|
||||
|
||||
// 运营平台-获取租户列表
|
||||
func TenantList() {
|
||||
ss := spreadsheet.New()
|
||||
sheet := ss.AddSheet()
|
||||
// sheet.SetFrozen(true, false)
|
||||
v := sheet.InitialView()
|
||||
v.SetState(sml.ST_PaneStateFrozen)
|
||||
v.SetXSplit(0) //冻结列
|
||||
v.SetYSplit(1) //冻结行
|
||||
sheet.Cell("A1").SetString("序号")
|
||||
sheet.Cell("B1").SetString("租户ID")
|
||||
sheet.Cell("C1").SetString("用户ID")
|
||||
sheet.Cell("D1").SetString("创建者")
|
||||
sheet.Cell("E1").SetString("昵称")
|
||||
sheet.Cell("F1").SetString("租户用户名")
|
||||
sheet.Cell("G1").SetString("使用状态")
|
||||
sheet.Cell("H1").SetString("创建时间")
|
||||
log.Println("生成表格列名完成")
|
||||
fileData, err := ioutil.ReadFile("dtcloud/user.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var data map[string]interface{}
|
||||
err = json.Unmarshal(fileData, &data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
// log.Println(data)
|
||||
|
||||
for _, usr := range data["data"].(map[string]interface{})["list"].([]interface{}) {
|
||||
log.Println(len(sheet.Rows()))
|
||||
con := len(sheet.Rows()) + 1
|
||||
a, _ := strconv.ParseInt(usr.(map[string]interface{})["createTime"].(string), 10, 64)
|
||||
sheet.Cell("A" + strconv.Itoa(con)).SetString(strconv.Itoa(len(sheet.Rows()) - 1))
|
||||
sheet.Cell("B" + strconv.Itoa(con)).SetString(usr.(map[string]interface{})["id"].(string))
|
||||
sheet.Cell("C" + strconv.Itoa(con)).SetString(usr.(map[string]interface{})["userAdminId"].(string))
|
||||
sheet.Cell("D" + strconv.Itoa(con)).SetString(usr.(map[string]interface{})["creator"].(string))
|
||||
sheet.Cell("E" + strconv.Itoa(con)).SetString(usr.(map[string]interface{})["tenantName"].(string))
|
||||
sheet.Cell("F" + strconv.Itoa(con)).SetString(usr.(map[string]interface{})["userAdminCode"].(string))
|
||||
if condition := usr.(map[string]interface{})["useStatus"].(float64); condition == 0 {
|
||||
sheet.Cell("G" + strconv.Itoa(con)).SetString("正常")
|
||||
} else {
|
||||
sheet.Cell("G" + strconv.Itoa(con)).SetString("禁用")
|
||||
}
|
||||
|
||||
sheet.Cell("H" + strconv.Itoa(con)).SetString(time.Unix(a/1000, 0).Format("2006-01-02 15:04:05"))
|
||||
}
|
||||
// 保存修改后的 Excel 文件
|
||||
|
||||
if err := ss.Validate(); err != nil {
|
||||
log.Fatalf("验证文件时出错: %s", err)
|
||||
}
|
||||
|
||||
if err := ss.SaveToFile("互联网区-运营平台租户列表" + time.Unix(tool.Timestamp("second"), 0).Format("20060102") + ".xlsx"); err != nil {
|
||||
log.Fatalf("保存文件时出错: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// 运营平台-获取单ecs进程使用情况
|
||||
func Process() {
|
||||
fileData, err := ioutil.ReadFile("dtcloud/pid.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var data map[string]interface{}
|
||||
err = json.Unmarshal(fileData, &data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Println(data)
|
||||
}
|
||||
|
||||
// 运营平台-获取ecs列表及其详情
|
||||
func EcsList() {
|
||||
ss := spreadsheet.New()
|
||||
sheet := ss.AddSheet()
|
||||
// sheet.SetFrozen(true, false)
|
||||
v := sheet.InitialView()
|
||||
v.SetState(sml.ST_PaneStateFrozen)
|
||||
v.SetXSplit(0) //冻结列
|
||||
v.SetYSplit(1) //冻结行
|
||||
sheet.Cell("A1").SetString("序号")
|
||||
sheet.Cell("B1").SetString("创建时间")
|
||||
sheet.Cell("C1").SetString("更新时间")
|
||||
sheet.Cell("D1").SetString("过期时间")
|
||||
sheet.Cell("E1").SetString("ECS_ID")
|
||||
sheet.Cell("F1").SetString("租住ID")
|
||||
sheet.Cell("G1").SetString("显示名称")
|
||||
sheet.Cell("H1").SetString("租户名称")
|
||||
sheet.Cell("I1").SetString("所属区域")
|
||||
sheet.Cell("J1").SetString("CPU架构")
|
||||
sheet.Cell("K1").SetString("系统类型")
|
||||
sheet.Cell("L1").SetString("运行状态")
|
||||
sheet.Cell("M1").SetString("CPU核心数")
|
||||
sheet.Cell("N1").SetString("内存/GB")
|
||||
sheet.Cell("O1").SetString("系统磁盘/GB")
|
||||
sheet.Cell("P1").SetString("存储磁盘/GB")
|
||||
sheet.Cell("Q1").SetString("宿主机IP")
|
||||
sheet.Cell("R1").SetString("MAC地址")
|
||||
sheet.Cell("S1").SetString("安全组")
|
||||
sheet.Cell("T1").SetString("网络类型")
|
||||
sheet.Cell("U1").SetString("EIP")
|
||||
sheet.Cell("V1").SetString("带宽大小(入/出)")
|
||||
sheet.Cell("W1").SetString("部门名称")
|
||||
sheet.Cell("X1").SetString("部门ID")
|
||||
sheet.Cell("Y1").SetString("主机型号")
|
||||
sheet.Cell("Z1").SetString("CPU型号")
|
||||
sheet.Cell("AA1").SetString("CPU模式")
|
||||
sheet.Cell("AB1").SetString("nodeName")
|
||||
sheet.Cell("AC1").SetString("cpu超出比率")
|
||||
log.Println("生成表格列名完成")
|
||||
//加载json文件
|
||||
fileData, err := ioutil.ReadFile("dtcloud/ecs.json")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
var data map[string]interface{}
|
||||
err = json.Unmarshal(fileData, &data)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
for _, ecs := range data["data"].(map[string]interface{})["virtualMachines"].([]interface{}) {
|
||||
log.Println(len(sheet.Rows()))
|
||||
con := len(sheet.Rows()) + 1
|
||||
sheet.Cell("A" + strconv.Itoa(con)).SetString(strconv.Itoa(len(sheet.Rows()) - 1)) //序号
|
||||
sheet.Cell("B" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["createdAt"].(string)) //创建时间
|
||||
sheet.Cell("C" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["updatedAt"].(string)) //更新时间
|
||||
sheet.Cell("D" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["expiredAt"].(string)) //过期时间
|
||||
sheet.Cell("E" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["ecsId"].(string)) //ECS_ID
|
||||
sheet.Cell("F" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["tenantId"].(string)) //租住ID
|
||||
sheet.Cell("G" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["displayName"].(string)) //显示名称
|
||||
sheet.Cell("H" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["tenantName"].(string)) //租户名称
|
||||
sheet.Cell("I" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["region"].(string) + "/" + ecs.(map[string]interface{})["az"].(string) + "/" + ecs.(map[string]interface{})["cell"].(string)) //所属区域(X/X/X)
|
||||
sheet.Cell("J" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["cpuArch"].(string)) //CPU架构
|
||||
sheet.Cell("K" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["osType"].(string)) //系统类型
|
||||
sheet.Cell("L" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["status"].(string)) //运行状态
|
||||
sheet.Cell("M" + strconv.Itoa(con)).SetString(strconv.Itoa(int(ecs.(map[string]interface{})["vCpus"].(float64))) + "核") //CPU核心数
|
||||
sheet.Cell("N" + strconv.Itoa(con)).SetString(strconv.Itoa(int(ecs.(map[string]interface{})["ram"].(float64))/1024/1024/1024) + "GB") //内存/GB
|
||||
var diskStrsys string
|
||||
var diskStrdata string
|
||||
for _, disk := range ecs.(map[string]interface{})["blockDeviceMappings"].([]interface{}) {
|
||||
if disk.(map[string]interface{})["isOSDisk"] != nil {
|
||||
if condition := disk.(map[string]interface{})["isOSDisk"].(bool); condition == true {
|
||||
diskStrsys += fmt.Sprintf("%sGB/", strconv.Itoa(int(disk.(map[string]interface{})["volumeSize"].(float64)))) //多块系统盘拼接
|
||||
} else {
|
||||
diskStrdata += fmt.Sprintf("%sGB/", strconv.Itoa(int(disk.(map[string]interface{})["volumeSize"].(float64)))) //多块存储盘拼接
|
||||
}
|
||||
} else {
|
||||
diskStrdata += fmt.Sprintf("%sGB/", strconv.Itoa(int(disk.(map[string]interface{})["volumeSize"].(float64)))) //多块存储盘拼接
|
||||
}
|
||||
}
|
||||
sheet.Cell("O" + strconv.Itoa(con)).SetString(diskStrsys) //系统磁盘/GB
|
||||
sheet.Cell("P" + strconv.Itoa(con)).SetString(diskStrdata) //存储磁盘/GB
|
||||
sheet.Cell("Q" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["networkMappings"].([]interface{})[0].(map[string]interface{})["ipv4Address"].(string)) //宿主机IP
|
||||
sheet.Cell("R" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["networkMappings"].([]interface{})[0].(map[string]interface{})["macAddress"].(string)) //MAC地址
|
||||
sheet.Cell("S" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["networkMappings"].([]interface{})[0].(map[string]interface{})["portType"].(string)) //安全组
|
||||
sheet.Cell("T" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["networkMappings"].([]interface{})[0].(map[string]interface{})["networkType"].(string)) //网络类型
|
||||
sheet.Cell("U" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["eipMappings"].([]interface{})[0].(map[string]interface{})["ipAddress"].(string)) //EIP
|
||||
sheet.Cell("V" + strconv.Itoa(con)).SetString(strconv.Itoa(int(ecs.(map[string]interface{})["eipMappings"].([]interface{})[0].(map[string]interface{})["bandwidthInSize"].(float64))) + "/" + strconv.Itoa(int(ecs.(map[string]interface{})["eipMappings"].([]interface{})[0].(map[string]interface{})["bandwidthOutSize"].(float64)))) //带宽大小(入/出)
|
||||
sheet.Cell("W" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["departmentName"].(string)) //部门名称
|
||||
sheet.Cell("X" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["departmentId"].(string)) //部门ID
|
||||
sheet.Cell("Y" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["flavor"].(map[string]interface{})["flavorType"].(map[string]interface{})["name"].(string)) //主机型号
|
||||
sheet.Cell("Z" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["flavor"].(map[string]interface{})["flavorType"].(map[string]interface{})["cpuModel"].(string)) //CPU型号
|
||||
sheet.Cell("AA" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["vcpuType"].(string)) //CPU模式
|
||||
sheet.Cell("AB" + strconv.Itoa(con)).SetString(ecs.(map[string]interface{})["nodeName"].(string))
|
||||
sheet.Cell("AC" + strconv.Itoa(con)).SetString(strconv.Itoa(int(ecs.(map[string]interface{})["cpuExceedRatio"].(float64)))) //cpu超出比率
|
||||
|
||||
}
|
||||
|
||||
// 保存修改后的 Excel 文件
|
||||
|
||||
if err := ss.Validate(); err != nil {
|
||||
log.Fatalf("验证文件时出错: %s", err)
|
||||
}
|
||||
|
||||
if err := ss.SaveToFile("互联网区-运营平台ECS列表" + time.Unix(tool.Timestamp("second"), 0).Format("20060102") + ".xlsx"); err != nil {
|
||||
log.Fatalf("保存文件时出错: %s", err)
|
||||
}
|
||||
}
|
193
dtcloud/user.json
Normal file
193
dtcloud/user.json
Normal file
@ -0,0 +1,193 @@
|
||||
{
|
||||
"requestId": "d9111bf5-e6bb-4016-b08a-70985b165dae",
|
||||
"code": "Success",
|
||||
"message": "",
|
||||
"data": {
|
||||
"size": 10,
|
||||
"current": 1,
|
||||
"total": 22,
|
||||
"totalPage": 3,
|
||||
"list": [
|
||||
{
|
||||
"id": "1937897449892872282",
|
||||
"tenantName": "司法局督办系统",
|
||||
"remark": "",
|
||||
"createTime": "1740036884000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwsfdb",
|
||||
"userAdminId": "1937897449892872284",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1935344323763634263",
|
||||
"tenantName": "煤矿安全风险监测预警系统",
|
||||
"remark": "",
|
||||
"createTime": "1739442439000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwmkaj",
|
||||
"userAdminId": "1935344323763634265",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1933362020262871124",
|
||||
"tenantName": "李超",
|
||||
"remark": "管理员",
|
||||
"createTime": "1738980898000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "licc",
|
||||
"userAdminId": "1933362020262871126",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1909704420602413068",
|
||||
"tenantName": "行政审批服务管理局_审批辅助管理系统",
|
||||
"remark": "",
|
||||
"createTime": "1733472684000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwfzgl",
|
||||
"userAdminId": "1909704420602413070",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1909695169108639748",
|
||||
"tenantName": "行政审批服务管理局_便民系统",
|
||||
"remark": "",
|
||||
"createTime": "1733470529000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwbmxt",
|
||||
"userAdminId": "1909695169108639750",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1898489170070863881",
|
||||
"tenantName": "云州区委员会宣传部",
|
||||
"remark": "",
|
||||
"createTime": "1730861430000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwyzxc",
|
||||
"userAdminId": "1898489170070863883",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1898184326177095686",
|
||||
"tenantName": "大同市数据局",
|
||||
"remark": "",
|
||||
"createTime": "1730790453000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwsjj",
|
||||
"userAdminId": "1898184326177095688",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1896688599521296387",
|
||||
"tenantName": "大同市电子健康卡系统",
|
||||
"remark": "",
|
||||
"createTime": "1730442201000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwwjwk",
|
||||
"userAdminId": "1896688599521296389",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1893644300797870081",
|
||||
"tenantName": "大同市市场监督管理局",
|
||||
"remark": "",
|
||||
"createTime": "1729733396000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwscjd",
|
||||
"userAdminId": "1893644300797870083",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
},
|
||||
{
|
||||
"id": "1893374890518511616",
|
||||
"tenantName": "审批局取叫号系统",
|
||||
"remark": "",
|
||||
"createTime": "1729670668000",
|
||||
"creator": "useradmin",
|
||||
"useStatus": 0,
|
||||
"isParentTenant": 0,
|
||||
"isIdentity": 0,
|
||||
"enterpriseName": "",
|
||||
"creditCode": "",
|
||||
"isEnterpriseOn": 0,
|
||||
"userAdminCode": "zwwqjhxt",
|
||||
"userAdminId": "1893374890518511618",
|
||||
"isEnterpriseHaveMain": "0",
|
||||
"dedicatePlatformCode": "",
|
||||
"dedicatePlatformName": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
1
dtcloud/zww.go
Normal file
1
dtcloud/zww.go
Normal file
@ -0,0 +1 @@
|
||||
package dtcloud
|
9
main.go
9
main.go
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dt_automate/openapi"
|
||||
"dt_automate/dtcloud"
|
||||
"dt_automate/tool"
|
||||
"flag"
|
||||
"fmt"
|
||||
@ -93,7 +93,12 @@ func main() {
|
||||
// log.Println(wps.Translate("hello"))
|
||||
// wps.Weekly_word()
|
||||
//调用云平台接口
|
||||
openapi.Git_sign()
|
||||
dtcloud.EcsList() //获取ecs列表及其详情(完成)
|
||||
// dtcloud.Process() //获取单ecs进程使用情况
|
||||
// dtcloud.Memory() //获取单个ecs的memory使用情况
|
||||
// dtcloud.Cpu() ///获取单个ecs的cpu使用情况
|
||||
// dtcloud.TenantList() //获取租户列表(完成)
|
||||
|
||||
}
|
||||
} else {
|
||||
log.Println("没有授权")
|
||||
|
BIN
互联网区-运营平台ECS列表20250306.xlsx
Normal file
BIN
互联网区-运营平台ECS列表20250306.xlsx
Normal file
Binary file not shown.
BIN
互联网区-运营平台租户列表20250306.xlsx
Normal file
BIN
互联网区-运营平台租户列表20250306.xlsx
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user