Browse Source

update 限制单次最多查询200条

pull/2/head
lucas 2 weeks ago
parent
commit
d4c10f1a10
  1. 2
      consumers/consumerSinoGnssMySQL.go

2
consumers/consumerSinoGnssMySQL.go

@ -95,7 +95,7 @@ LEFT JOIN datasolution as p
ON d.station_name=p.sn ON d.station_name=p.sn
where p.group_name is not null where p.group_name is not null
and d.id > %d and d.id <= %d and d.id > %d and d.id <= %d
ORDER BY p.group_name;`, recordInfo.TableName, recordInfo.Id, recordInfo.Id+100) ORDER BY p.group_name;`, recordInfo.TableName, recordInfo.Id, recordInfo.Id+200)
var GnssDatas []SinoGnssMySQL.GnssData var GnssDatas []SinoGnssMySQL.GnssData
err = the.InDB.Query(&GnssDatas, sql) err = the.InDB.Query(&GnssDatas, sql)
if err != nil || len(GnssDatas) == 0 { if err != nil || len(GnssDatas) == 0 {

Loading…
Cancel
Save