go语言mongdb管道使用(一)

时间:2022-05-05
本文章向大家介绍go语言mongdb管道使用(一),主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

原始json:

{
  "listsn": "",
  "code": "fwq_add",
  "detail": {
    "appdate": "2016-06-28",
    "expectdate": "2016-06-30",
    "service_text": {
      "text": "NAT管理(乐视云计算有限公司产品研发中心_基础架构_网络服务_NAT管理)",
      "id": "343"
    },
    "projectname_text": {
      "id": "575789b9f0a2d7e179ac750b",
      "text": "采购项目"
    },
    "note": "test",
    "totalmoney": 132500,
    "detail": [
      {
        "buss": "",
        "alamLinks_text": [
          {
            "text": "张三1",
            "id": "zhangsan1@qq.com"
          }
        ],
        "opSystem_text": {
          "id": "CentOS 6.6",
          "text": "CentOS 6.6"
        },
        "buss_text": {
          "id": "",
          "text": ""
        },
        "template": "569f89b02ae6ff1d0043ed7b",
        "use_type_text": {
          "id": "1",
          "text": "生产环境"
        },
        "fpData": [],
        "follow_idc_text": {
          "id": "1",
          "text": "否"
        },
        "alamLinks": "zhangsan1@qq.com",
        "num": 2,
        "modular": "test",
        "follow_idc": "1",
        "netReq_text": {
          "text": "美国机房",
          "id": "569f9ae72ae6ff1d0043edc1"
        },
        "opSystem": "CentOS 6.6",
        "netReq": "569f9ae72ae6ff1d0043edc1",
        "use_type": "1",
        "template_text": {
          "id": "569f89b02ae6ff1d0043ed7b",
          "text": "A1-1  [CPU:24C(E5-2620V3*2)          内存:128G(16G*8)          硬盘:600G(系统 raid1)          ||标配实体机(普通应用)||26500 ]"
        }
      },
      {
        "buss_text": {
          "id": "",
          "text": ""
        },
        "num": 3,
        "use_type": "2",
        "follow_idc_text": {
          "id": "1",
          "text": "否"
        },
        "netReq": "568a7d67b9687e31c81d8379",
        "opSystem_text": {
          "id": "CentOS 6.6",
          "text": "CentOS 6.6"
        },
        "modular": "test2",
        "use_type_text": {
          "text": "测试环境",
          "id": "2"
        },
        "template": "569f89c32ae6ff1d0043ed7c",
        "alamLinks_text": [
          {
            "id": "zhangsan1@letv.com",
            "text": "张三1"
          }
        ],
        "follow_idc": "1",
        "alamLinks": "zhangsan1@letv.com",
        "opSystem": "CentOS 6.6",
        "buss": "",
        "template_text": {
          "id": "569f89c32ae6ff1d0043ed7c",
          "text": "A1-2  [CPU:24C(E5-2620V3*2)          内存:128G(16G*8)          硬盘:600G(系统 raid1),3T(数据 raid5)          ||标配实体机(普通应用)||26500 ]"
        },
        "netReq_text": {
          "id": "568a7d67b9687e31c81d8379",
          "text": "核心纯内网"
        },
        "fpData": []
      }
    ],
    "marate": "必要性说明test",
    "projectname": "575789b9f0a2d7e179ac750b",
    "service": "343",
    "explain": "必要性说明test",
    "purchase_type": "1",
    "purchase_type_text": {
      "id": "1",
      "text": "重点项目"
    }
  },
  "desc": "测试单据",
  "reader": "",
  "createtime": "2016-06-28 09:54:15",
  "type": "",
  "uuid": "cecaf698-a2d7-41fa-94b1-d157f38b3cfc",
  "status": 593,
  "updatetime": "2016-06-28 09:54:15",
  "orderid": 7437,
  "title": "测试单据",
  "owner": "zhangsan1@qq.com",
  "qq": "187287822",
  "leader": "李四 - ",
  "owner_name": "zhangsan1(zhangsan1@qq.com)",
  "telphone": "13718899792"
}