|
@@ -244,7 +244,7 @@ func (n *network) Associate(in *types.AssociateReq) (reply *types.Reply) {
|
|
args := []interface{}{in.EntName}
|
|
args := []interface{}{in.EntName}
|
|
wh, newArgs := NetworkCom.WhArgs(businessType)
|
|
wh, newArgs := NetworkCom.WhArgs(businessType)
|
|
args = append(args, newArgs...)
|
|
args = append(args, newArgs...)
|
|
- 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(topscopeclass,[` + wh + `])=0 ORDER BY project_id`
|
|
|
|
|
|
+ q := `select DISTINCT winner_id,winner from information.transaction_info_all where buyer_id in (select buyer_id from information.transaction_info_all where has(winner, ?) and buyer_id<>'') and hasAny(topscopeclass,[` + 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)
|
|
@@ -896,7 +896,7 @@ func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, entM
|
|
return result
|
|
return result
|
|
}
|
|
}
|
|
wh, args := NetworkCom.WhArgs(values)
|
|
wh, args := NetworkCom.WhArgs(values)
|
|
- q := `select buyer_id,count(project_id) AS project_count,sum(project_money) AS project_amount,groupUniqArray(project_id) from information.transaction_info where buyer_id in (` + wh + `)`
|
|
|
|
|
|
+ q := `select buyer_id,count(project_id) AS project_count,sum(project_money) AS project_amount,groupUniqArray(project_id) from information.transaction_info_all where buyer_id in (` + wh + `)`
|
|
if len(businessType) > 0 {
|
|
if len(businessType) > 0 {
|
|
newWh, newArgs := NetworkCom.WhArgs(businessType)
|
|
newWh, newArgs := NetworkCom.WhArgs(businessType)
|
|
q += ` and hasAny(topscopeclass,[` + newWh + `])`
|
|
q += ` and hasAny(topscopeclass,[` + newWh + `])`
|
|
@@ -961,7 +961,7 @@ func (n *network) Introduce_Supplier(values []string, entMonitor map[string]bool
|
|
repeat := map[string]bool{}
|
|
repeat := map[string]bool{}
|
|
whRepeat := map[string]map[string]bool{}
|
|
whRepeat := map[string]map[string]bool{}
|
|
buyers := []string{}
|
|
buyers := []string{}
|
|
- q := `select winner_id,buyer_id,buyer from information.transaction_info where hasAny(winner_id,[` + wh + `]) and project_bidstatus>1`
|
|
|
|
|
|
+ q := `select winner_id,buyer_id,buyer from information.transaction_info_all where hasAny(winner_id,[` + wh + `]) and project_bidstatus>1`
|
|
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)
|
|
@@ -1011,7 +1011,7 @@ func (n *network) Introduce_Agency(values []string, entMonitor map[string]bool,
|
|
return map[string]*projectInfo{}
|
|
return map[string]*projectInfo{}
|
|
}
|
|
}
|
|
wh, args := NetworkCom.WhArgs(values)
|
|
wh, args := NetworkCom.WhArgs(values)
|
|
- q := `select DISTINCT agency_id,buyer_id,buyer from information.transaction_info where agency_id in (` + wh + `) and project_bidstatus>1`
|
|
|
|
|
|
+ q := `select DISTINCT agency_id,buyer_id,buyer from information.transaction_info_all where agency_id in (` + wh + `) and project_bidstatus>1`
|
|
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)
|
|
@@ -1056,7 +1056,7 @@ func (n *network) Introduce_Middleman(values []string, entMonitor map[string]boo
|
|
return result
|
|
return result
|
|
}
|
|
}
|
|
wh, args := NetworkCom.WhArgs(values)
|
|
wh, args := NetworkCom.WhArgs(values)
|
|
- q := `select DISTINCT project_id,project_money from information.transaction_info where project_id in (` + wh + `) and project_bidstatus>1`
|
|
|
|
|
|
+ q := `select DISTINCT project_id,project_money from information.transaction_info_all where project_id in (` + wh + `) and project_bidstatus>1`
|
|
if len(businessType) > 0 {
|
|
if len(businessType) > 0 {
|
|
newWh, newArgs := NetworkCom.WhArgs(businessType)
|
|
newWh, newArgs := NetworkCom.WhArgs(businessType)
|
|
q += ` and hasAny(topscopeclass,[` + newWh + `])`
|
|
q += ` and hasAny(topscopeclass,[` + newWh + `])`
|
|
@@ -1162,7 +1162,7 @@ func (n *network) BuyerProjectInfo(ids []string, businessType []string) map[stri
|
|
return vm
|
|
return vm
|
|
}
|
|
}
|
|
wh, args := NetworkCom.WhArgs(ids)
|
|
wh, args := NetworkCom.WhArgs(ids)
|
|
- q := `select buyer_id,count(DISTINCT project_id) AS project_count,sum(project_money) AS project_amount,groupUniqArray(project_id) from information.transaction_info where buyer_id in (` + wh + `) and project_bidstatus>1`
|
|
|
|
|
|
+ q := `select buyer_id,count(DISTINCT project_id) AS project_count,sum(project_money) AS project_amount,groupUniqArray(project_id) from information.transaction_info_all where buyer_id in (` + wh + `) and project_bidstatus>1`
|
|
if len(businessType) > 0 {
|
|
if len(businessType) > 0 {
|
|
newWh, newArgs := NetworkCom.WhArgs(businessType)
|
|
newWh, newArgs := NetworkCom.WhArgs(businessType)
|
|
q += ` and hasAny(topscopeclass,[` + newWh + `])`
|
|
q += ` and hasAny(topscopeclass,[` + newWh + `])`
|