|
@@ -52,7 +52,7 @@ func (p *PayUser) Match(poolSize int, datas *[]map[string]interface{}) (*map[*Us
|
|
|
matchWaitGroup.Done()
|
|
|
<-matchPool
|
|
|
}()
|
|
|
- users, projectUsers := p.ToMatch(&info)
|
|
|
+ users, projectUsers := p.ToMatch(info)
|
|
|
lock.Lock()
|
|
|
defer lock.Unlock()
|
|
|
if users != nil && len(*users) > 0 {
|
|
@@ -62,7 +62,7 @@ func (p *PayUser) Match(poolSize int, datas *[]map[string]interface{}) (*map[*Us
|
|
|
l = &SortList{}
|
|
|
}
|
|
|
*l = append(*l, &MatchInfo{
|
|
|
- Info: &info,
|
|
|
+ Info: info,
|
|
|
Keys: v.Keys,
|
|
|
Items: v.Items,
|
|
|
MatchWays: v.MatchWays,
|
|
@@ -92,15 +92,15 @@ func (p *PayUser) Match(poolSize int, datas *[]map[string]interface{}) (*map[*Us
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-func (p *PayUser) ToMatch(info *map[string]interface{}) (*map[*UserInfo]*MatchUser, *[]*UserInfo) {
|
|
|
- buyerclass, _ := (*info)["buyerclass"].(string)
|
|
|
- area, _ := (*info)["area"].(string)
|
|
|
+func (p *PayUser) ToMatch(info map[string]interface{}) (*map[*UserInfo]*MatchUser, *[]*UserInfo) {
|
|
|
+ buyerclass, _ := info["buyerclass"].(string)
|
|
|
+ area, _ := info["area"].(string)
|
|
|
if area == "全国" {
|
|
|
area = ""
|
|
|
}
|
|
|
- city, _ := (*info)["city"].(string)
|
|
|
- district, _ := (*info)["district"].(string)
|
|
|
- subtype, _ := (*info)["subtype"].(string)
|
|
|
+ city, _ := info["city"].(string)
|
|
|
+ district, _ := info["district"].(string)
|
|
|
+ subtype, _ := info["subtype"].(string)
|
|
|
title := GetInfoTitle(info)
|
|
|
//订阅词
|
|
|
keys := p.Title_KeyDfa.Key.Analy(title)
|
|
@@ -113,7 +113,7 @@ func (p *PayUser) ToMatch(info *map[string]interface{}) (*map[*UserInfo]*MatchUs
|
|
|
if p.Detail_KeyDfa != nil {
|
|
|
//detail, _ := (*info)["projectscope"].(string)
|
|
|
//if detail == "" {
|
|
|
- detail, _ := (*info)["detail"].(string)
|
|
|
+ detail, _ := info["detail"].(string)
|
|
|
//}
|
|
|
if detail != "" {
|
|
|
detail = strings.ToUpper(detail)
|