main.go 560 B

1234567891011121314151617181920212223242526272829
  1. package main
  2. import (
  3. "gorm.io/gorm"
  4. "jygit.jydev.jianyu360.cn/data_processing/common_utils/mongodb"
  5. )
  6. var (
  7. Mgo *mongodb.MongodbSim //87 环境,采集 存储的MongoDB
  8. MysqlDB *gorm.DB
  9. )
  10. func main() {
  11. Init()
  12. getDifferent()
  13. }
  14. // getDifferent 获取省市区信息和最新MySQL数据的不同
  15. func getDifferent() {
  16. sess := Mgo.GetMgoConn()
  17. defer Mgo.DestoryMongoConn(sess)
  18. query := sess.DB("mixdata").C("address_new_2020").Find(nil).Select(nil).Iter()
  19. count := 0
  20. for tmp := make(map[string]interface{}); query.Next(tmp); count++ {
  21. }
  22. }