|
@@ -28,7 +28,11 @@ func GetRelatesInfo(in *bxbuyer.RelatesInformationReq) *bxbuyer.RelatesInformati
|
|
if in.Area != "" {
|
|
if in.Area != "" {
|
|
in.Area = fmt.Sprintf(`,{"term": {"province": "%s"}`, in.Area)
|
|
in.Area = fmt.Sprintf(`,{"term": {"province": "%s"}`, in.Area)
|
|
}
|
|
}
|
|
- buyerQuery := fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "name"}}%s}]}},"from": %d,"size": %d}`, in.Area, start, in.BuyerCount)
|
|
|
|
|
|
+ //
|
|
|
|
+ if in.City != "" {
|
|
|
|
+ in.City = fmt.Sprintf(`,{"term": {"city": "%s"}}`, in.City)
|
|
|
|
+ }
|
|
|
|
+ buyerQuery := fmt.Sprintf(`{"query": {"bool": {"must": [{"exists": {"field": "name"}}%s%s}]}},"from": %d,"size": %d}`, in.Area, in.City, start, in.BuyerCount)
|
|
log.Println("buyerQuery:", buyerQuery)
|
|
log.Println("buyerQuery:", buyerQuery)
|
|
buyerList := elastic.Get("buyer", "buyer", buyerQuery)
|
|
buyerList := elastic.Get("buyer", "buyer", buyerQuery)
|
|
if len(*buyerList) > 0 {
|
|
if len(*buyerList) > 0 {
|