|
@@ -10,8 +10,10 @@ import (
|
|
func ProjectDetailData(id string) map[string]interface{} {
|
|
func ProjectDetailData(id string) map[string]interface{} {
|
|
global.Logger.Info("id " + id)
|
|
global.Logger.Info("id " + id)
|
|
data := map[string]interface{}{}
|
|
data := map[string]interface{}{}
|
|
- _query := `{"query":{"bool":{"must":[{"term":{"id":"%s"}}],"must_not":[],"should":[]}}}`
|
|
|
|
- query := fmt.Sprintf(_query, id)
|
|
|
|
|
|
+ _query := `{"query":{"bool":{"must":[{"term":{"id":"%s"}}],"must_not":[],"should":[]}},"_source":[%s]}`
|
|
|
|
+ fields := `"s_winner","projectname","projectcode","buyer","buyertel","buyerperson","jgtime","zbtime","bidamount","budget","buyerclass","area","city","list"`
|
|
|
|
+ query := fmt.Sprintf(_query, id, fields)
|
|
|
|
+ global.Logger.Info("query " + query)
|
|
INDEX := core.GetStringConf("es.project.index")
|
|
INDEX := core.GetStringConf("es.project.index")
|
|
TYPE := core.GetStringConf("es.project.itype")
|
|
TYPE := core.GetStringConf("es.project.itype")
|
|
infos := db.Es.Get(INDEX, TYPE, query)
|
|
infos := db.Es.Get(INDEX, TYPE, query)
|