|
@@ -162,28 +162,25 @@ namespace molilian.core
|
|
|
{
|
|
{
|
|
|
var data = redis.LPop<TkDataDTO>(queue_tb_key);
|
|
var data = redis.LPop<TkDataDTO>(queue_tb_key);
|
|
|
if (data == null) break;
|
|
if (data == null) break;
|
|
|
|
|
+
|
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
|
- data.ip.Contains("127.0.0") || data.elapsedTime > 1000)
|
|
|
|
|
|
|
+ data.ip.Contains("127.0.0"))
|
|
|
{
|
|
{
|
|
|
save_tk_log(data, "tk_logs_test", connection, transaction);
|
|
save_tk_log(data, "tk_logs_test", connection, transaction);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
data.id = save_tk_log(data, "tk_logs", connection, transaction);
|
|
data.id = save_tk_log(data, "tk_logs", connection, transaction);
|
|
|
|
|
+ if (data.elapsedTime > 1000)
|
|
|
|
|
+ {
|
|
|
|
|
+ save_tk_log(data, "tk_logs_test", connection, transaction);
|
|
|
|
|
+ }
|
|
|
if (data.success)
|
|
if (data.success)
|
|
|
{
|
|
{
|
|
|
save_tk_log(data, "tk_success_logs", connection, transaction);
|
|
save_tk_log(data, "tk_success_logs", connection, transaction);
|
|
|
}
|
|
}
|
|
|
- //if (data.success || data.message.Contains("该链接不支持转化,请更换链接尝试"))
|
|
|
|
|
- //{
|
|
|
|
|
- // if (start_comparison_tk)
|
|
|
|
|
- // {
|
|
|
|
|
- // save_tk_log(data, "comparison_tk_logs", connection, transaction);
|
|
|
|
|
- // }
|
|
|
|
|
- //}
|
|
|
|
|
if (!string.IsNullOrEmpty(data.itemId)) TkOrderTrackingCore.SaveLinkSummary(data);
|
|
if (!string.IsNullOrEmpty(data.itemId)) TkOrderTrackingCore.SaveLinkSummary(data);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
total++;
|
|
total++;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -216,27 +213,18 @@ namespace molilian.core
|
|
|
var data = redis.LPop<TkDataDTO>(queue_parse_tb_key);
|
|
var data = redis.LPop<TkDataDTO>(queue_parse_tb_key);
|
|
|
if (data == null) break;
|
|
if (data == null) break;
|
|
|
|
|
|
|
|
- //switch (data.oaid)
|
|
|
|
|
- //{
|
|
|
|
|
- // case "test-comparison_tk_logs":
|
|
|
|
|
- // save_tk_parse_logs(data, "comparison_tk_parse_logs", connection, transaction);
|
|
|
|
|
- // break;
|
|
|
|
|
- // case "test-comparison_tk_logs_raw":
|
|
|
|
|
- // save_tk_parse_logs(data, "comparison_tk_parse_logs_raw", connection, transaction);
|
|
|
|
|
- // break;
|
|
|
|
|
- // default:
|
|
|
|
|
- // break;
|
|
|
|
|
- //}
|
|
|
|
|
-
|
|
|
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
|
- data.ip.Contains("127.0.0") || data.elapsedTime > 1000)
|
|
|
|
|
|
|
+ data.ip.Contains("127.0.0"))
|
|
|
{
|
|
{
|
|
|
save_tk_parse_logs(data, "tk_parse_logs_test", connection, transaction);
|
|
save_tk_parse_logs(data, "tk_parse_logs_test", connection, transaction);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
data.id = save_tk_parse_logs(data, "tk_parse_logs", connection, transaction);
|
|
data.id = save_tk_parse_logs(data, "tk_parse_logs", connection, transaction);
|
|
|
|
|
+ if (data.elapsedTime > 1000)
|
|
|
|
|
+ {
|
|
|
|
|
+ save_tk_parse_logs(data, "tk_parse_logs_test", connection, transaction);
|
|
|
|
|
+ }
|
|
|
if (data.success)
|
|
if (data.success)
|
|
|
{
|
|
{
|
|
|
save_tk_parse_logs(data, "tk_success_parse_logs", connection, transaction);
|
|
save_tk_parse_logs(data, "tk_success_parse_logs", connection, transaction);
|
|
@@ -266,15 +254,19 @@ namespace molilian.core
|
|
|
var data = redis.LPop<JdDataDTO>(queue_parse_jd_key);
|
|
var data = redis.LPop<JdDataDTO>(queue_parse_jd_key);
|
|
|
if (data == null) break;
|
|
if (data == null) break;
|
|
|
|
|
|
|
|
- save_jd_parse_logs(data, "jd_parse_logs", connection, transaction);
|
|
|
|
|
|
|
|
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
|
- data.ip.Contains("127.0.0") || data.elapsedTime > 1000)
|
|
|
|
|
|
|
+ data.ip.Contains("127.0.0"))
|
|
|
{
|
|
{
|
|
|
save_jd_parse_logs(data, "jd_parse_logs_test", connection, transaction);
|
|
save_jd_parse_logs(data, "jd_parse_logs_test", connection, transaction);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
|
|
+ save_jd_parse_logs(data, "jd_parse_logs", connection, transaction);
|
|
|
|
|
+ if (data.elapsedTime > 1000)
|
|
|
|
|
+ {
|
|
|
|
|
+ save_jd_parse_logs(data, "jd_parse_logs_test", connection, transaction);
|
|
|
|
|
+ }
|
|
|
if (data.success)
|
|
if (data.success)
|
|
|
{
|
|
{
|
|
|
save_jd_parse_logs(data, "jd_parse_logs_success", connection, transaction);
|
|
save_jd_parse_logs(data, "jd_parse_logs_success", connection, transaction);
|
|
@@ -340,16 +332,16 @@ namespace molilian.core
|
|
|
{
|
|
{
|
|
|
var data = redis.LPop<UnionCouponDTO>(queue_coupon_key);
|
|
var data = redis.LPop<UnionCouponDTO>(queue_coupon_key);
|
|
|
if (data == null) break;
|
|
if (data == null) break;
|
|
|
- connection.Insert(data);
|
|
|
|
|
|
|
|
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
if ("3JDaxNfPy83okP3kLScwCkGiuMcyC4PcyntF424979CC9C51BCAD0C245B1C7BA2".Equals(data.oaid) ||
|
|
|
- data.ip.Contains("127.0.0") || data.elapsedTime > 1000)
|
|
|
|
|
|
|
+ data.ip.Contains("127.0.0"))
|
|
|
{
|
|
{
|
|
|
var test_data = data.Convert2Json().Convert2Object<TestUnionCouponDTO>();
|
|
var test_data = data.Convert2Json().Convert2Object<TestUnionCouponDTO>();
|
|
|
connection.Insert(test_data);
|
|
connection.Insert(test_data);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
|
|
+ connection.Insert(data);
|
|
|
if (data.success)
|
|
if (data.success)
|
|
|
{
|
|
{
|
|
|
var success_data = data.Convert2Json().Convert2Object<SuccessUnionCouponDTO>();
|
|
var success_data = data.Convert2Json().Convert2Object<SuccessUnionCouponDTO>();
|
|
@@ -412,7 +404,11 @@ namespace molilian.core
|
|
|
var ts = DateTime.Now - response.create_time;
|
|
var ts = DateTime.Now - response.create_time;
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_jd_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_jd_key, response);
|
|
|
- saveCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
catch (Exception ex) { }
|
|
catch (Exception ex) { }
|
|
|
}
|
|
}
|
|
@@ -424,7 +420,11 @@ namespace molilian.core
|
|
|
var ts = DateTime.Now - response.create_time;
|
|
var ts = DateTime.Now - response.create_time;
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_tb_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_tb_key, response);
|
|
|
- saveCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
if (!response.success && "nologin".Equals(response.message))
|
|
if (!response.success && "nologin".Equals(response.message))
|
|
|
{
|
|
{
|
|
@@ -470,12 +470,16 @@ namespace molilian.core
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_parse_tb_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_parse_tb_key, response);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
if (response.success)
|
|
if (response.success)
|
|
|
{
|
|
{
|
|
|
_ = saveUnionCouponParseCacheAsync(response);
|
|
_ = saveUnionCouponParseCacheAsync(response);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveParseCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- saveParseCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
if (!string.IsNullOrEmpty(response.itemId)) TkOrderTrackingCore.SaveLinkSummary(response);
|
|
if (!string.IsNullOrEmpty(response.itemId)) TkOrderTrackingCore.SaveLinkSummary(response);
|
|
|
|
|
|
|
|
if (!response.success && "nologin".Equals(response.message))
|
|
if (!response.success && "nologin".Equals(response.message))
|
|
@@ -512,8 +516,10 @@ namespace molilian.core
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_coupon_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_coupon_key, response);
|
|
|
|
|
|
|
|
- saveCouponCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveCouponCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
if (!response.success && "nologin".Equals(response.message))
|
|
if (!response.success && "nologin".Equals(response.message))
|
|
|
{
|
|
{
|
|
|
switch (response.channel)
|
|
switch (response.channel)
|
|
@@ -547,7 +553,17 @@ namespace molilian.core
|
|
|
var ts = DateTime.Now - response.create_time;
|
|
var ts = DateTime.Now - response.create_time;
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_parse_jd_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_parse_jd_key, response);
|
|
|
- saveParseCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveParseCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (response.success || response.message.Equals("转链失败"))
|
|
|
|
|
+ {
|
|
|
|
|
+ JdPoolCore.CallsIncrBy(response.accountId);
|
|
|
|
|
+ }
|
|
|
|
|
+ //CallsIncrBy
|
|
|
|
|
|
|
|
if (response.success) saveClientRequestTotal(response.channel, response.ip, response.oaid);
|
|
if (response.success) saveClientRequestTotal(response.channel, response.ip, response.oaid);
|
|
|
|
|
|
|
@@ -587,7 +603,11 @@ namespace molilian.core
|
|
|
var ts = DateTime.Now - response.create_time;
|
|
var ts = DateTime.Now - response.create_time;
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_parse_dy_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_parse_dy_key, response);
|
|
|
- saveParseCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveParseCache(response.channel.ToString(), response.accountId, response.accountName, response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
catch (Exception ex) { }
|
|
catch (Exception ex) { }
|
|
@@ -599,7 +619,11 @@ namespace molilian.core
|
|
|
var ts = DateTime.Now - response.create_time;
|
|
var ts = DateTime.Now - response.create_time;
|
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
response.elapsedTime = (int)ts.TotalMilliseconds;
|
|
|
_ = RedisHelper.RPushAsync(queue_parse_tool_key, response);
|
|
_ = RedisHelper.RPushAsync(queue_parse_tool_key, response);
|
|
|
- saveParseCache(response.channel.ToString(), 0, "tool", response.success, response.message, response.reason);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!response.ip.Contains("127.0.0"))
|
|
|
|
|
+ {
|
|
|
|
|
+ saveParseCache(response.channel.ToString(), 0, "tool", response.success, response.message, response.reason);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
catch (Exception ex) { }
|
|
catch (Exception ex) { }
|
|
|
}
|
|
}
|