|
@@ -171,19 +171,23 @@ func getQuerySql(req *types.ProjectListReq, plist []string, businessStr string)
|
|
|
}
|
|
|
wm := map[string]bool{}
|
|
|
winner_ids := []string{}
|
|
|
- for _, v := range strings.Split(req.Supplier, ",") {
|
|
|
- if wm[v] {
|
|
|
- continue
|
|
|
+ if req.Supplier != "" {
|
|
|
+ for _, v := range strings.Split(req.Supplier, ",") {
|
|
|
+ if wm[v] {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ winner_ids = append(winner_ids, v)
|
|
|
+ wm[v] = true
|
|
|
}
|
|
|
- winner_ids = append(winner_ids, v)
|
|
|
- wm[v] = true
|
|
|
}
|
|
|
- for _, v := range strings.Split(req.Heterotophy, ",") {
|
|
|
- if wm[v] {
|
|
|
- continue
|
|
|
+ if req.Heterotophy != "" {
|
|
|
+ for _, v := range strings.Split(req.Heterotophy, ",") {
|
|
|
+ if wm[v] {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ winner_ids = append(winner_ids, v)
|
|
|
+ wm[v] = true
|
|
|
}
|
|
|
- winner_ids = append(winner_ids, v)
|
|
|
- wm[v] = true
|
|
|
}
|
|
|
ors2 := []string{}
|
|
|
if len(winner_ids) > 0 {
|
|
@@ -197,7 +201,7 @@ func getQuerySql(req *types.ProjectListReq, plist []string, businessStr string)
|
|
|
allArgs = append(allArgs, args...)
|
|
|
}
|
|
|
if len(ors2) > 0 {
|
|
|
- ors1 = append(ors1, `(buyer_id in (select buyer_id from transaction_info_all where `+strings.Join(ors2, " or ")+`))`)
|
|
|
+ ors1 = append(ors1, `(buyer_id in (select buyer_id from transaction_info_all where (`+strings.Join(ors2, " or ")+`) and buyer_id<>''))`)
|
|
|
}
|
|
|
ands := []string{}
|
|
|
//业务类型
|