|
@@ -176,8 +176,7 @@ func (n *network) Associate(in *types.AssociateReq) (reply *types.Reply) {
|
|
args := []interface{}{in.EntName}
|
|
args := []interface{}{in.EntName}
|
|
wh, newArgs := NetworkCom.WhArgs(probusfors)
|
|
wh, newArgs := NetworkCom.WhArgs(probusfors)
|
|
args = append(args, newArgs...)
|
|
args = append(args, newArgs...)
|
|
- q := `select DISTINCT b.winner_id,b.winner from information.transaction_info a
|
|
|
|
- inner join information.transaction_info b on (has(a.winner, ?) and a.buyer_id<>'' and a.buyer_id=b.buyer_id and hasAny(b.property_form,[` + wh + `])=0) ORDER BY b.project_id`
|
|
|
|
|
|
+ q := `select DISTINCT winner_id,winner from information.transaction_info where buyer_id in (select buyer_id from information.transaction_info where has(winner, ?) and buyer_id<>'') and hasAny(property_form,[` + wh + `])=0 ORDER BY project_id`
|
|
rows, err := ClickhouseConn.Query(context.Background(), q, args...)
|
|
rows, err := ClickhouseConn.Query(context.Background(), q, args...)
|
|
if err != nil {
|
|
if err != nil {
|
|
logx.Error(err)
|
|
logx.Error(err)
|