Sfoglia il codice sorgente

地区搜索不管用处理

WH01243 9 mesi fa
parent
commit
88dee187f0
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      api/internal/service/owner.go

+ 3 - 3
api/internal/service/owner.go

@@ -700,14 +700,14 @@ func ProjectHandle(buyerArr []string, area, businessStr string, dataMap *map[str
 	projectMap := &map[string]map[string]interface{}{}
 	count := int64(0)
 	tscSql := `'` + strings.ReplaceAll(businessStr, ",", `','`) + `'`
-	sqlStr := `select buyer,buyer_id,groupUniqArray(area) as area,count(if(hasAny(topscopeclass,[`
+	sqlStr := `select buyer,buyer_id,groupUniqArray(area) as areaStr,count(if(hasAny(topscopeclass,[`
 	sqlStr += tscSql + `])=1 and project_bidstatus>1,1,null)) as ocount,SUM(if(hasAny(topscopeclass,[`
 	sqlStr += tscSql + `])=1 and project_bidstatus>1,project_money,0)) as project_money ,MAX(zbtime) as zbtime from transaction_info_all where`
 	buyer, buyerArgs := ConditionHandle(buyerArr)
 	sqlStr += fmt.Sprintf(fmt.Sprintf(" buyer_id in (%s)", buyer), buyerArgs...)
 	if len(area) > 0 && area != "" {
 		areaStr, areaArgs := ConditionHandle(strings.Split(area, ","))
-		sqlStr += fmt.Sprintf(fmt.Sprintf(" area in (%s)", areaStr), areaArgs...)
+		sqlStr += fmt.Sprintf(fmt.Sprintf(" and  area in (%s)", areaStr), areaArgs...)
 	}
 	sqlStr += " GROUP by buyer,buyer_id "
 	if sourceType == "1" {
@@ -753,7 +753,7 @@ func ProjectHandle(buyerArr []string, area, businessStr string, dataMap *map[str
 type BuyerAggStruct struct {
 	Buyer        string          `ch:"buyer"`
 	BuyerId      string          `ch:"buyer_id"`
-	Area         []string        `ch:"area"`
+	Area         []string        `ch:"areaStr"`
 	ProjectMoney decimal.Decimal `ch:"project_money"`
 	Zbtime       int64           `ch:"zbtime"`
 	Ocount       uint64          `ch:"ocount"`