|
@@ -47,6 +47,7 @@ type SieveCondition struct {
|
|
|
SelectType string `json:"selectType"` //筛选(正文 or 标题)
|
|
|
Subtype string `json:"subtype"` //信息类型
|
|
|
SelectIds []string `json:"selectId"` //选择信息导出
|
|
|
+ PushKeyWords []string `json:"pushKeyWords"` //推送历史匹配词
|
|
|
Comeinfrom string `json:"comeinfrom"` //查询来源
|
|
|
FileExists string `json:"fileExists"` //是否有附件
|
|
|
SearchTypeSwitch bool `json:"searchTypeSwitch"` //是否开启 正文 标题同时搜索只搜正文的开关
|
|
@@ -408,6 +409,7 @@ func GetSqlObjFromId(mongo mg.MongodbSim, _id string) *SieveCondition {
|
|
|
ComeInTime: qutil.Int64All((*query)["comeintime"]),
|
|
|
Comeinfrom: qutil.ObjToString((*query)["comeinfrom"]),
|
|
|
SelectIds: getStringArrFromDbResult((*query)["selectIds"]),
|
|
|
+ PushKeyWords: getStringArrFromDbResult((*query)["pushKeyWords"]),
|
|
|
FileExists: qutil.ObjToString((*query)["fileExists"]),
|
|
|
SearchTypeSwitch: searchTypeSwitch,
|
|
|
BidField: qutil.ObjToString((*query)["bid_field"]), // 领域化数据
|
|
@@ -506,7 +508,6 @@ func GetDataExportSearchResultByScdId(sim, bid mg.MongodbSim, bidMgoDBName, elas
|
|
|
if list == nil || err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
- GetMatchKey(scd, list)
|
|
|
return list, nil
|
|
|
}
|
|
|
|
|
@@ -561,6 +562,7 @@ func GetDataExportSelectResult(bidding mg.MongodbSim, biddingName string, scd *S
|
|
|
for _, idStr := range scd.SelectIds {
|
|
|
queryIds = append(queryIds, mg.StringTOBsonId(idStr))
|
|
|
}
|
|
|
+
|
|
|
selectMap := map[string]interface{}{
|
|
|
"_id": 1, "title": 1, "detail": 1, "area": 1, "city": 1, "publishtime": 1, "projectname": 1, "buyer": 1, "s_winner": 1, "bidamount": 1, "subtype": 1, "toptype": 1, "filetext": 1, "purchasing": 1,
|
|
|
}
|
|
@@ -664,7 +666,12 @@ func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress s
|
|
|
return nil, errors.New("GetDataExportSearchResult-未获取到查询信息")
|
|
|
}
|
|
|
if scd.SelectIds != nil {
|
|
|
- return GetDataExportSelectResult(bid, bidMgoDBName, scd, dataType, checkCount)
|
|
|
+ idSelectDates, idSelectErr := GetDataExportSelectResult(bid, bidMgoDBName, scd, dataType, checkCount)
|
|
|
+ if idSelectErr != nil {
|
|
|
+ return nil, idSelectErr
|
|
|
+ }
|
|
|
+ GetDataExportMatchKey(scd, idSelectDates)
|
|
|
+ return idSelectDates, idSelectErr
|
|
|
}
|
|
|
//获取查询语句
|
|
|
qstr := getDataExportSql(scd)
|
|
@@ -701,6 +708,7 @@ func GetDataExportSearchResult(bid mg.MongodbSim, bidMgoDBName, elasticAddress s
|
|
|
if checkCount != len(res) && checkCount != -1 {
|
|
|
return nil, fmt.Errorf("GetDataExportSearchResult-%s-数据总量校验异常,期望:%d,实际:%d", scd.Id, checkCount, len(res))
|
|
|
}
|
|
|
+ GetDataExportMatchKey(scd, &res)
|
|
|
return &res, nil
|
|
|
}
|
|
|
|