|
@@ -195,7 +195,7 @@ func GetWinnerData(scopeClass string, bid string) []AggStruct {
|
|
|
wh, newArgs := common.WhArgs(strings.Split(scopeClass, ","))
|
|
|
args = append(args, newArgs...)
|
|
|
rows, err1 := T.ClickhouseConn.Query(context.TODO(), `select distinct wr as name,wr_id as id from information.transaction_info_all ARRAY JOIN winner_id as wr_id,winner as wr
|
|
|
- prewhere buyer_id IN (SELECT buyer_id from information.transaction_info_all prewhere has(winner_id,?) and buyer_id<>'') and wr_id<>? and LENGTH(winner)=LENGTH(winner_id) AND hasAny(topscopeclass,[`+wh+`])=0`, args...)
|
|
|
+ where buyer_id IN (SELECT buyer_id from information.transaction_info_all prewhere has(winner_id,?) and buyer_id<>'') and wr_id<>? and LENGTH(winner)=LENGTH(winner_id) AND hasAny(topscopeclass,[`+wh+`])=0`, args...)
|
|
|
if err1 != nil {
|
|
|
logx.Error(err1)
|
|
|
return ass
|
|
@@ -236,7 +236,7 @@ func GetWinnerDataHz(buyerId string, winnerIds []string) map[string]AggStruct {
|
|
|
wh, newArgs := common.WhArgs(winnerIds)
|
|
|
args = append(args, newArgs...)
|
|
|
rows, err1 := T.ClickhouseConn.Query(context.TODO(), `select winner_id as id,sum(1) as sum,sum(project_money) as project_money,max(zbtime) as zbtime from information.transaction_info_all ARRAY JOIN winner_id
|
|
|
- prewhere winner_id in(`+wh+`) and buyer_id=? group by winner_id`, args...)
|
|
|
+ where winner_id in(`+wh+`) and buyer_id=? group by winner_id`, args...)
|
|
|
if err1 != nil {
|
|
|
logx.Error(err1)
|
|
|
return res
|
|
@@ -375,7 +375,7 @@ func LastTimeCoopBath(positionId int64, buyerId string, winners, agencys []strin
|
|
|
if err == nil {
|
|
|
json.Unmarshal(*wb, &adiffb)
|
|
|
} else {
|
|
|
- sql := `SELECT winner_one,max(zbtime) FROM information.transaction_info_all ARRAY JOIN winner AS winner_one prewhere buyer_id=? AND hasAny(winner,[%s])) group by winner_one`
|
|
|
+ sql := `SELECT winner_one,max(zbtime) FROM information.transaction_info_all ARRAY JOIN winner AS winner_one where buyer_id=? AND hasAny(winner,[%s])) group by winner_one`
|
|
|
wns := []string{}
|
|
|
for _, v := range winners {
|
|
|
wns = append(wns, v)
|