Commit d21111aa authored by 李增强's avatar 李增强

m

parent 2527110d
...@@ -28,7 +28,7 @@ class QMTJ { ...@@ -28,7 +28,7 @@ class QMTJ {
int disappearTime = 0; int disappearTime = 0;
int appearTime = _getDateNow(); int appearTime = _getDateNow();
String id = _appStartUpId; String id = _appStartUpId;
Map map = { Map<String, dynamic> map = {
"id": id, "id": id,
"type": type, "type": type,
"source": source, "source": source,
...@@ -49,7 +49,7 @@ class QMTJ { ...@@ -49,7 +49,7 @@ class QMTJ {
int disappearTime = 0; int disappearTime = 0;
int appearTime = _getDateNow(); int appearTime = _getDateNow();
String id = _appStartUpId; String id = _appStartUpId;
Map map = { Map<String, dynamic> map = {
"id": id, "id": id,
"type": type, "type": type,
"source": source, "source": source,
...@@ -66,7 +66,7 @@ class QMTJ { ...@@ -66,7 +66,7 @@ class QMTJ {
int disappearTime = _getDateNow(); int disappearTime = _getDateNow();
_db.db.update("app_tj", {"disappear_time": disappearTime}, _db.db.update("app_tj", {"disappear_time": disappearTime},
where: "id = ? and disappear_time = 0", whereArgs: [_appStartUpId]); where: "id = ? and disappear_time = 0", whereArgs: [_appStartUpId]);
Map map = { Map<String, dynamic> map = {
"id": _appStartUpId, "id": _appStartUpId,
"disappear_time": disappearTime, "disappear_time": disappearTime,
}; };
...@@ -83,7 +83,7 @@ class QMTJ { ...@@ -83,7 +83,7 @@ class QMTJ {
String id = _md5("${pageId}_${lastPageId}_$extrasStr"); String id = _md5("${pageId}_${lastPageId}_$extrasStr");
int disappearTime = 0; int disappearTime = 0;
int appearTime = _getDateNow(); int appearTime = _getDateNow();
Map map = { Map<String, dynamic> map = {
"id": id, "id": id,
"source": source, "source": source,
"page_id": pageId, "page_id": pageId,
...@@ -93,7 +93,8 @@ class QMTJ { ...@@ -93,7 +93,8 @@ class QMTJ {
"extras": extrasStr, "extras": extrasStr,
}; };
log("pageAppear", map); log("pageAppear", map);
await _db.db.insert("page_tj", map); await _db.db.insert("page_tj",map);
} }
/// PAGE 不可见 /// PAGE 不可见
...@@ -105,11 +106,11 @@ class QMTJ { ...@@ -105,11 +106,11 @@ class QMTJ {
await _db.db.update( await _db.db.update(
"page_tj", "page_tj",
{ {
"disappear_time": disappearTime, "disappear_time":disappearTime,
}, },
where: "id = ? and disappear_time = 0", where: "id = ? and disappear_time = 0",
whereArgs: [id]); whereArgs: [id]);
Map map = { Map<String, dynamic> map = {
"id": id, "id": id,
"page_id": pageId, "page_id": pageId,
"last_page_id": lastPageId, "last_page_id": lastPageId,
...@@ -131,7 +132,7 @@ class QMTJ { ...@@ -131,7 +132,7 @@ class QMTJ {
int clickTime = _getDateNow(); int clickTime = _getDateNow();
String extrasStr = json.encode(extras); String extrasStr = json.encode(extras);
String id = _md5("${pageId}_${clickId}_${extrasStr}_${clickTime}"); String id = _md5("${pageId}_${clickId}_${extrasStr}_${clickTime}");
Map map = { Map<String, dynamic> map = {
"id": id, "id": id,
"source": source, "source": source,
"page_id": pageId, "page_id": pageId,
...@@ -140,7 +141,7 @@ class QMTJ { ...@@ -140,7 +141,7 @@ class QMTJ {
"extras": extrasStr, "extras": extrasStr,
}; };
log("tap", map); log("tap", map);
await _db.db.insert("tap_tj", map); await _db.db.insert("tap_tj",map);
} }
/// 曝光 /// 曝光
...@@ -155,7 +156,7 @@ class QMTJ { ...@@ -155,7 +156,7 @@ class QMTJ {
int exposureTime = _getDateNow(); int exposureTime = _getDateNow();
String extrasStr = json.encode(extras); String extrasStr = json.encode(extras);
String id = _md5("${pageId}_${exposureId}_${extrasStr}_${exposureTime}"); String id = _md5("${pageId}_${exposureId}_${extrasStr}_${exposureTime}");
Map map = { Map<String, dynamic> map = {
"id": id, "id": id,
"source": source, "source": source,
"page_id": pageId, "page_id": pageId,
...@@ -180,7 +181,7 @@ class QMTJ { ...@@ -180,7 +181,7 @@ class QMTJ {
return digest.toString(); return digest.toString();
} }
static void log(String type, Map map) { static void log(String type, Map<String, dynamic> map) {
if (!isDebug) { if (!isDebug) {
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment