|
@@ -210,14 +210,15 @@ func GetTradeDataByClassifyAndCompany(exchange, classifyName string, contracts,
|
|
|
condSold += fmt.Sprintf(` AND sold_short_name IN (%s)`, utils.GetOrmInReplace(len(condCompanies)))
|
|
|
parsSold = append(parsSold, condCompanies)
|
|
|
} else {
|
|
|
+ // 这里rank=0或者999是因为大商所的数据并不只有999
|
|
|
if len(condCompanies) > 0 {
|
|
|
- condBuy += fmt.Sprintf(` AND (rank = 999 OR buy_short_name IN (%s))`, utils.GetOrmInReplace(len(condCompanies)))
|
|
|
- condSold += fmt.Sprintf(` AND (rank = 999 OR sold_short_name IN (%s))`, utils.GetOrmInReplace(len(condCompanies)))
|
|
|
+ condBuy += fmt.Sprintf(` AND (rank = 999 OR rank = 0 OR buy_short_name IN (%s))`, utils.GetOrmInReplace(len(condCompanies)))
|
|
|
+ condSold += fmt.Sprintf(` AND (rank = 999 OR rank = 0 OR sold_short_name IN (%s))`, utils.GetOrmInReplace(len(condCompanies)))
|
|
|
parsBuy = append(parsBuy, condCompanies)
|
|
|
parsSold = append(parsSold, condCompanies)
|
|
|
} else {
|
|
|
- condBuy += ` AND rank = 999`
|
|
|
- condSold += ` AND rank = 999`
|
|
|
+ condBuy += ` AND (rank = 999 OR rank = 0)`
|
|
|
+ condSold += ` AND (rank = 999 OR rank = 0)`
|
|
|
}
|
|
|
}
|
|
|
|