|
@@ -158,7 +158,6 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
|
|
userId := ObjToString(n.GetSession("userId"))
|
|
userId := ObjToString(n.GetSession("userId"))
|
|
if len(userId) > 0 {
|
|
if len(userId) > 0 {
|
|
credit_a := IntAll(n.GetSession("credit_a"))
|
|
credit_a := IntAll(n.GetSession("credit_a"))
|
|
- log.Println(credit.AIsHasDo(credit.A_QYCX, credit_a))
|
|
|
|
if credit.AIsHasDo(credit.A_QYCX, credit_a) {
|
|
if credit.AIsHasDo(credit.A_QYCX, credit_a) {
|
|
credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
|
|
credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
|
|
} else {
|
|
} else {
|
|
@@ -188,6 +187,18 @@ func (n *Search) GetEnterpriseList(reqType, param /*参数*/ string) error {
|
|
//即时搜索
|
|
//即时搜索
|
|
func (n *Search) Sim() error {
|
|
func (n *Search) Sim() error {
|
|
keyword := n.GetString("words")
|
|
keyword := n.GetString("words")
|
|
|
|
+ //查询送积分
|
|
|
|
+ userId := ObjToString(n.GetSession("userId"))
|
|
|
|
+ if len(userId) > 0 && len(keyword) > 0 {
|
|
|
|
+ credit_a := IntAll(n.GetSession("credit_a"))
|
|
|
|
+ if credit.AIsHasDo(credit.A_QYCX, credit_a) {
|
|
|
|
+ credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
|
|
|
|
+ } else {
|
|
|
|
+ credit.UpuserCreditSession(userId, credit.A_QYCX, "A", nil, n.Action)
|
|
|
|
+ credit.UpuserCreditSession(userId, credit.B_QYCX, "B", nil, n.Action)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
str := `{
|
|
str := `{
|
|
"match": {
|
|
"match": {
|
|
"enterprise.EntName": {
|
|
"enterprise.EntName": {
|
|
@@ -325,7 +336,7 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- ,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict"]
|
|
|
|
|
|
+ ,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict"]
|
|
,"from":0,
|
|
,"from":0,
|
|
"size":` + fmt.Sprintf("%v", perPage) + `,
|
|
"size":` + fmt.Sprintf("%v", perPage) + `,
|
|
"sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
|
|
"sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
|
|
@@ -470,7 +481,7 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
|
|
"s_synopsis":{"force_source": true},
|
|
"s_synopsis":{"force_source": true},
|
|
"stock":{"force_source": true}
|
|
"stock":{"force_source": true}
|
|
}
|
|
}
|
|
- },"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid"]
|
|
|
|
|
|
+ },"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid"]
|
|
,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
|
|
,"from":` + fmt.Sprintf("%v", ((currentPage-1)*perPage)) + `,
|
|
"size":` + fmt.Sprintf("%v", perPage) +
|
|
"size":` + fmt.Sprintf("%v", perPage) +
|
|
`,"sort":[` + sort + `] }`
|
|
`,"sort":[` + sort + `] }`
|