|
@@ -209,12 +209,19 @@ class AccountAuth {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ getIDByTime(){
|
|
|
+ let uuid = "sw" + Date.now().toString(36).slice(-8);
|
|
|
+ console.log(uuid);
|
|
|
+ return uuid;
|
|
|
+ }
|
|
|
+
|
|
|
cteateMapData(user_id, map_name = 'map'){
|
|
|
var sql = `INSERT INTO
|
|
|
medba.dat_map
|
|
|
- (map_name, map_data, user_id, update_time, create_time)
|
|
|
+ (map_name, map_data, user_id, update_time, create_time, map_uuid)
|
|
|
VALUES
|
|
|
- ('${map_name}', '{ "type": "FeatureCollection", "features": [], "center": { "x": 116.39639, "y": 39.91638 } }', ${user_id}, NOW(), NOW())`;
|
|
|
+ ('${map_name}', '{ "type": "FeatureCollection", "features": [], "center": { "x": 116.39639, "y": 39.91638 } }',
|
|
|
+ ${user_id}, NOW(), NOW(), '${this.getIDByTime()}')`;
|
|
|
var msg = {
|
|
|
cmd: "update", // server端要进行判断的
|
|
|
data: {
|