Commit 68aa818b by WangJinfeng

fix AdnRequestSdkEtlDaily

parent 1e035913
......@@ -109,7 +109,7 @@ class AdnRequestSdkEtlDaily extends CommonSparkJob with java.io.Serializable {
platform match {
case "ios" =>
var dev_tag = 1
if (StringUtils.isNotBlank(ruid) && ruid.length > 16) {
if (StringUtils.isNotBlank(ruid) && ruid.length >= 16) {
linesArr += Row(ruid, "ruid", platform, appId, model, brand, osVersion, country, strategy, region, 1)
}
if (StringUtils.isNotBlank(idfa) && (idfa.matches(didPtn) && !idfa.matches(allZero) || idfa.matches(md5Ptn))) {
......@@ -134,8 +134,9 @@ class AdnRequestSdkEtlDaily extends CommonSparkJob with java.io.Serializable {
}
}
case "android" =>
var dev_tag = 1
var dev_tag = 0
if (StringUtils.isNotBlank(gaid) && (gaid.matches(didPtn) && !gaid.matches(allZero) || gaid.matches(md5Ptn))) {
dev_tag = 1
linesArr += Row(gaid, "gaid", platform, appId, model, brand, osVersion, country, strategy, region, dev_tag)
if (StringUtils.isNotBlank(oaid) && (oaid.matches(didPtn) && !oaid.matches(allZero) || oaid.matches(md5Ptn))) {
linesArr += Row(oaid, "oaid", platform, appId, model, brand, osVersion, country, strategy, region, dev_tag)
......@@ -152,23 +153,30 @@ class AdnRequestSdkEtlDaily extends CommonSparkJob with java.io.Serializable {
}
} else {
if (StringUtils.isNotBlank(oaid) && (oaid.matches(didPtn) && !oaid.matches(allZero) || oaid.matches(md5Ptn))) {
dev_tag = 1
linesArr += Row(oaid, "oaid", platform, appId, model, brand, osVersion, country, strategy, region, dev_tag)
}
if (StringUtils.isNotBlank(imei) && (imei.matches(imeiPtn) || imei.matches(md5Ptn))) {
if (dev_tag == 1) {
dev_tag = 0
} else {
dev_tag = 1
}
linesArr += Row(imei, "imei", platform, appId, model, brand, osVersion, country, strategy, region, dev_tag)
}
if (StringUtils.isNotBlank(androidId) && (androidId.matches(andriodIdPtn) || androidId.matches(md5Ptn))) {
if (dev_tag == 1) {
dev_tag = 0
} else {
dev_tag = 1
}
linesArr += Row(androidId, "androidId", platform, appId, model, brand, osVersion, country, strategy, region, dev_tag)
}
if (StringUtils.isNotBlank(sysId)) {
if (dev_tag == 1) {
dev_tag = 0
} else {
dev_tag = 1
}
linesArr += Row(sysId, "sysid", platform, appId, model, brand, osVersion, country, strategy, region, dev_tag)
}
......
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