Closed fuckqqcom closed 6 years ago
Hi @xhochipe
Your ReFeedback
struct must have the same names, or bson tags:
type ReFeedback struct {
Field1 string `bson:"field_name_1"`
Field2 string `bson:"field_name_2"`
}
Where field_name_1
is the name in mongo.
If this doesn't work, please post a runnable example - good luck!
Dom
@domodwyer
{ "_id" : "788ec5fc913946d0f5f124d8f204af65", "author" : "符旸,宋进朝", "change" : "维持", "hashId" : "788ec5fc913946d0f5f124d8f204af65", "created_time" : "2018-06-13 17:25:30", "companyCode" : "10000590", "timeDate" : "2018-05-03 09:06:06", "insName" : "中航证券", "rate" : "买入", "secuName" : "平安银行", "sratingName" : "买入", "title" : "一季报点评:", "url" : "http://dat", "SecuCode" : "000001", "source" : "eastmoney", "show_url" : "https://g", "pdfUrl" : "http://pd", "flag" : 2 }
dddd 那个文档集合和现在看到的mongo的数据集合是同一份数据,字段(field) 是相同的
Hi @xhochipe
It is very strange - do you have a test function I can run to reproduce? I tried something similar and it works OK for me.
Dom
你好:
同样都是用的outs这个结果,count可以查出来,但是下面的result1 查不出来,不是很理解,请教下博主