|
@@ -40,7 +40,7 @@ const (
|
|
|
entSearchCacheKey = "entSearchIndexCache_%v"
|
|
|
|
|
|
index, itype = "qyxy", "qyxy"
|
|
|
- entQuery = `{"query":{"bool":{"must":[%s],"must_not":[%s]}},"_source":["_id","company_name","company_status","legal_person","capital","company_address","company_shortname","company_phone","establish_date","nseo_id"],"sort":[{"capital":{"order":"desc"}}]}`
|
|
|
+ entQuery = `{"query":{"bool":{"must":[%s],"must_not":[%s]}},"_source":["_id","company_name","company_status","legal_person","capital","company_address","company_shortname","company_phone","establish_date","nseo_id","currency"],"sort":[{"capital":{"order":"desc"}}]}`
|
|
|
entQueryCount = `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
|
|
|
)
|
|
|
|
|
@@ -311,7 +311,16 @@ func formatData(list *[]map[string]interface{}, isFree bool) *[]map[string]inter
|
|
|
if establish_date := qutil.Int64All((*list)[index]["establish_date"]); establish_date > 0 {
|
|
|
(*list)[index]["establishStamp"] = establish_date
|
|
|
}
|
|
|
-
|
|
|
+ //注册资本 币种
|
|
|
+ unit := "万元"
|
|
|
+ if qutil.InterfaceToStr((*list)[index]["currency"]) != "人民币" {
|
|
|
+ unit = fmt.Sprintf("%s%s", "万", qutil.InterfaceToStr((*list)[index]["currency"]))
|
|
|
+ }
|
|
|
+ capital := ""
|
|
|
+ if qutil.Float64All((*list)[index]["capital"]) > 0 {
|
|
|
+ capital = fmt.Sprintf("%d%s", int64(qutil.Float64All((*list)[index]["capital"])), unit)
|
|
|
+ }
|
|
|
+ (*list)[index]["capital"] = capital
|
|
|
//清除多余字段
|
|
|
for _, key := range delStr {
|
|
|
delete((*list)[index], key)
|