|
@@ -37,7 +37,7 @@ const (
|
|
|
searchMaxLimit = 100 //最大查询数量限制
|
|
|
freeSearchNum = 4 //免费查询数量限制
|
|
|
entSearchCacheDB = "other"
|
|
|
- entSearchCacheKey = "entSearchIndexCache"
|
|
|
+ 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"],"sort":[{"capital":{"order":"desc"}}]}`
|
|
@@ -341,7 +341,7 @@ type entIds struct {
|
|
|
}
|
|
|
|
|
|
func GetEntIndexShow(isFree bool) (list *[]map[string]interface{}) {
|
|
|
- bytes, err := redis.GetBytes(entSearchCacheDB, entSearchCacheKey)
|
|
|
+ bytes, err := redis.GetBytes(entSearchCacheDB, fmt.Sprintf(entSearchCacheKey, isFree))
|
|
|
if err == nil {
|
|
|
if err = json.Unmarshal(*bytes, &list); err == nil && list != nil && len(*list) > 0 {
|
|
|
return
|