|
@@ -2,6 +2,7 @@ package model
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
+ "log"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
@@ -113,6 +114,7 @@ func GetSearchQuery(in *consumerinfo.SupplyInfoSearchReq) (qstr string) {
|
|
|
|
|
|
//保存供应信息
|
|
|
func SaveSupplyInfo(ent_name string, supplyInfo map[string]interface{}) bool {
|
|
|
+ log.Println("es保存接收字段:", ent_name, supplyInfo)
|
|
|
now := time.Now().Unix()
|
|
|
return elastic.Save(INDEX, TYPE, &map[string]interface{}{
|
|
|
"_id": supplyInfo["id"],
|
|
@@ -120,7 +122,8 @@ func SaveSupplyInfo(ent_name string, supplyInfo map[string]interface{}) bool {
|
|
|
"msg_type": "1",
|
|
|
"title": supplyInfo["title"],
|
|
|
"detail": supplyInfo["detail"],
|
|
|
- "ent_name": ent_name, //机构名称
|
|
|
+ "ent_name": ent_name, //机构名称
|
|
|
+ "ent_id": supplyInfo["ent_id"], //机构id
|
|
|
"province": supplyInfo["province"],
|
|
|
"city": supplyInfo["city"],
|
|
|
"validity_time": supplyInfo["validity_time"],
|