|
@@ -76,6 +76,33 @@ func getGetCriteriaType(entId, positionId, tag int64) []map[string]interface{} {
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
+ //发布时间
|
|
|
+ data = append(data, map[string]interface{}{
|
|
|
+ "key": "publishTime",
|
|
|
+ "type": "dateTimeList",
|
|
|
+ "label": "发布时间",
|
|
|
+ "defaultVal": []string{},
|
|
|
+ "props": map[string]interface{}{
|
|
|
+ "multiple": false,
|
|
|
+ },
|
|
|
+ "options": []map[string]interface{}{
|
|
|
+ {
|
|
|
+ "label": "全部", "value": "",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "昨天", "value": "yesterday",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "上周", "value": "lastWeek",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "上一个月", "value": "lastMonth",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "label": "自定义", "value": "exact",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ })
|
|
|
//私有标签处理
|
|
|
getlalArr := getLabel(entId)
|
|
|
if len(getlalArr) > 0 {
|
|
@@ -484,9 +511,9 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}) {
|
|
|
if start < 0 {
|
|
|
start = 0
|
|
|
}
|
|
|
- var query = `{"query":{"bool":{"must":[%s],"filter":[%s]}},"from":"%d","size":"%d","sort":[{"publishtime":{"order":"desc"}}],
|
|
|
- "minimum_should_match":1,
|
|
|
- "should":[{"exists":{"field":"bidamount"}},{"bool":{"should":[{"exists":{"field":"budget"}},{"bool":{"must_not":[{"exists":{"field":"budget"}}]}}],"must_not":[{"exists":{"field":"bidamount"}}]}}]}`
|
|
|
+ var query = `{"query":{"bool":{"must":[%s],"filter":[%s],"minimum_should_match":1,
|
|
|
+ "should":[{"exists":{"field":"bidamount"}},{"bool":{"should":[{"exists":{"field":"budget"}},{"bool":{"must_not":[{"exists":{"field":"budget"}}]}}],"must_not":[{"exists":{"field":"bidamount"}}]}}]}},"from":"%d","size":"%d","sort":[{"publishtime":{"order":"desc"}}]
|
|
|
+ }`
|
|
|
shouldStr := `{"bool":{"should":[%s]}}`
|
|
|
mustArr := []string{}
|
|
|
filterArr := []string{
|
|
@@ -495,7 +522,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}) {
|
|
|
//must处理
|
|
|
//filter处理
|
|
|
if operator.Tag == 1 {
|
|
|
- mustArr = append(mustArr, `{"match":{"subtype":["采购意向"]}}`)
|
|
|
+ mustArr = append(mustArr, `{"match":{"subtype":"采购意向"}}`)
|
|
|
operator.Subtype = ""
|
|
|
operator.TopType = ""
|
|
|
} else if operator.Tag == 2 {
|