com.mysql.jdbc.Driver
jdbc:mysql://localhost/gts?allowMultiQueries=true
user
password
300
id - Integer
imei - String
<-->
SELECT imeiNumber AS id, imeiNumber AS imei FROM Device WHERE imeiNumber <> '';
device_id - Integer
time - Date
valid - Boolean
latitude - Double
longitude - Double
speed - Double
course - Double
power - Double (NULL for some protocols)
extended_info - String (XML)
<-->
START TRANSACTION;
UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:time), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = :device_id;
SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = :device_id;
INSERT INTO EventData VALUES (@accountID, @deviceID, UNIX_TIMESTAMP(:time), 0, :latitude, :longitude, 0, :speed, :course, 0, '', 0, '', '', '', 0, 0, 0, '0000000001', UNIX_TIMESTAMP(NOW()));
COMMIT;
true
8082
false
/home/user/Documents/tracker-server.log
true
5000
0
true
5001
0
true
5002
0
true
5003
0
true
5004
0
true
5005
0
true
5006
0
true
5007
0