Android analytics done, camera instructions added.

This commit is contained in:
Ivan Murashov
2018-04-22 18:43:29 +03:00
parent be4f2dc7cf
commit bc02327b3e
42 changed files with 1015 additions and 1386 deletions

View File

@@ -37,14 +37,14 @@ class SqliteHelper {
db = await openDatabase(path, version: 1,
onCreate: (Database db, int version) async {
await db.execute('''create table $tableSession (
await db.execute('''create table $tableSession (
$columnMerchantID text primary key,
$columnToken text,
$columnToken text,
$columnPosID text,
$columnDocID integer)''');
await db.execute('''create table $tableSettings (
$columnCurrency integer,
await db.execute('''create table $tableSettings (
$columnCurrency integer,
$columnLocale text)''');
});
}
@@ -52,14 +52,12 @@ class SqliteHelper {
/// Создается запись в таблице, содержащая
/// необходимые для идентификации пользователя и проведения запросов.
Future createSession(String merchantID, String posID, String token) async {
Map session = {
columnMerchantID: merchantID,
columnPosID: posID,
columnToken: token,
columnDocID: 0
};
return db.insert(tableSession, session);
}
@@ -109,7 +107,8 @@ class SqliteHelper {
Future<String> getPosID() async {
Map session = await selectAll(tableSession);
return session != null ? session[columnPosID] : new DateTime.now().millisecondsSinceEpoch.toString();
String time = new DateTime.now().millisecondsSinceEpoch.toString();
return session != null ? session[columnPosID] : time;
}
Future<int> getDocID() async {