浏览代码

处理ishide的账号风控数据

dodo hold 1 年之前
父节点
当前提交
5765363271

+ 3 - 1
molilian.api/Controllers/admin/JdUnionController.cs

@@ -247,7 +247,9 @@ namespace molilian.api.Controllers
             string sort = form.Read<string>("sort");
             string order = form.Read<string>("order");
 
-            string filter = "is_hide=0";
+            bool show_hide = form.Read("show_hide", false);
+            string filter = string.Empty;
+            if (!show_hide) filter = "is_hide=0";
             if (!string.IsNullOrEmpty(keyword))
             {
                 filter += $" AND (`name` LIKE @keyword OR `description` LIKE @keyword)";

+ 3 - 1
molilian.api/Controllers/admin/PddUnionController.cs

@@ -73,7 +73,9 @@ namespace molilian.api.Controllers
             string sort = form.Read<string>("sort");
             string order = form.Read<string>("order");
 
-            string filter = " is_hide=0";
+            bool show_hide = form.Read("show_hide", false);
+            string filter = string.Empty;
+            if (!show_hide) filter = "is_hide=0";
             if (!string.IsNullOrEmpty(keyword))
             {
                 filter += $" AND (`name` LIKE @keyword OR `description` LIKE @keyword)";

+ 4 - 1
molilian.api/Controllers/admin/TaobaoController.cs

@@ -152,7 +152,10 @@ namespace molilian.api.Controllers
             string sort = form.Read<string>("sort");
             string order = form.Read<string>("order");
 
-            string filter = "is_hide=0";
+            bool show_hide = form.Read("show_hide", false);
+            string filter = string.Empty;
+            if (!show_hide) filter = "is_hide=0";
+
             if (!string.IsNullOrEmpty(keyword))
             {
                 filter += $" AND (`name` LIKE @keyword OR `description` LIKE @keyword)";

+ 1 - 2
molilian.api/Controllers/public/JDTaskController.cs

@@ -37,8 +37,7 @@ namespace molilian.api.Controllers
             foreach (var account in list)
             {
                 if (id != 0 && id != account.id) continue;
-                if (account.is_hide) continue;
-                try
+                 try
                 {
                     DateTime endTime = DateTime.Now.Date;
                     DateTime startTime = endTime.AddDays(-90);

+ 1 - 6
molilian.api/Controllers/public/TaskController.cs

@@ -137,7 +137,6 @@ namespace molilian.api.Controllers
             {
 
                 if (id != account.id) continue;
-                if (account.is_hide) continue;
 
                 try
                 {
@@ -177,7 +176,6 @@ namespace molilian.api.Controllers
                 if (account.id != 17) continue;
 #endif
                 if (!account.enable_sync_order) continue;
-                if (account.is_hide) continue;
 
                 try
                 {
@@ -213,7 +211,6 @@ namespace molilian.api.Controllers
 #if DEBUG
                 if (account.id != id) continue;
 #endif
-                if (account.is_hide) continue;
                 try
                 {
                     var alimama = new AlimamaPlus(account);
@@ -248,7 +245,6 @@ namespace molilian.api.Controllers
             {
 
                 if (id != account.id) continue;
-                if (account.is_hide) continue;
 
                 try
                 {
@@ -288,7 +284,6 @@ namespace molilian.api.Controllers
                 if (account.id != 17) continue;
 #endif
                 if (!account.enable_sync_order) continue;
-                if (account.is_hide) continue;
 
                 try
                 {
@@ -529,7 +524,6 @@ namespace molilian.api.Controllers
             {
                 foreach (var account in list)
                 {
-                    if (account.is_hide) continue;
                     try
                     {
                         account.current_daily_calls = await RiskControlCore.GetAllNodesCallsAsync(TkChannelEnum.tb, account.id, DateTime.Now.ToString("yyyyMMdd"));
@@ -554,6 +548,7 @@ namespace molilian.api.Controllers
                     }
 
                     if (!account.enable_sync_order) continue;
+                    if (account.is_hide) continue;
                     try
                     {
                         var alimama = new AlimamaPlus(account);

文件差异内容过多而无法显示
+ 0 - 0
molilian.api/Properties/PublishProfiles/latest.pubxml.user


+ 1 - 1
molilian.core/Core/jd/JdPoolCore.cs

@@ -322,7 +322,7 @@ namespace molilian.core
             _ = RedisKit.ExpireAsync(cache_key, 3600);
             NotifyCore.Notify(new NifyMessage
             {
-                message = $"【京东联盟】没有匹配账号",
+                message = $"【京东联盟】{EndPointCore.CurrentEndPoint}没有匹配账号",
                 priority = NifyMessagePriority.high,
                 tags = ["red_circle"]
             });

+ 3 - 0
molilian.core/Plus/Alimama/RefundOrders.cs

@@ -41,6 +41,8 @@ namespace molilian.core
 
             //#endif       
 
+            if (_account.is_hide) return total;
+
             string sql = @"
             UPDATE tk_report tr
             JOIN (
@@ -166,6 +168,7 @@ namespace molilian.core
                 RedisHelper.Set(cacheKey, max_modifiedTime);
             }
 
+            if (_account.is_hide) return total;
 
             string sql = @"
             UPDATE tk_report tr

+ 6 - 3
molilian.core/Plus/Alimama/crawler.cs

@@ -605,7 +605,7 @@ namespace molilian.core
                             .AddHeaders("Cookie", _cookies);
 #if DEBUG
 #else
-            client.Proxy = _proxy;
+                client.Proxy = _proxy;
 #endif
                 if (!string.IsNullOrEmpty(_user_agent)) client.UserAgent = _user_agent;
                 var response = client.Request(url);
@@ -654,6 +654,7 @@ namespace molilian.core
                 if (report_date == DateTime.Now.Date)
                 {
                     await RiskControlCore.SaveIncomeAmtAsync(TkChannelEnum.tb, $"{_accountId}", result.eff_tk_disp_tfee);
+                    if (_account.is_hide) return;
                     await EachSaveReportOverviewAsync(report_date.AddHours(DateTime.Now.Hour), "tk_report_hourtrend", result);
                     await EachSaveReportOverviewAsync(report_date, "tk_report", result);
                 }
@@ -806,7 +807,7 @@ namespace molilian.core
                             .AddHeaders("Cookie", _cookies);
 #if DEBUG
 #else
-            client.Proxy = _proxy;
+                client.Proxy = _proxy;
 #endif
                 if (!string.IsNullOrEmpty(_user_agent)) client.UserAgent = _user_agent;
                 var response = client.Request(url);
@@ -850,6 +851,8 @@ namespace molilian.core
                 result.sett_tk_disp_tfee_56 = data.Read<decimal>("sett_tk_disp_tfee_56", 0);
 
                 DateTime report_date = date.Date;
+                if (_account.is_hide) return;
+
                 await EachSaveReportOverviewAsync(report_date, "tk_report", result);
 
 
@@ -1007,7 +1010,7 @@ namespace molilian.core
                             .AddHeaders("Cookie", _cookies);
 #if DEBUG
 #else
-            client.Proxy = _proxy;
+                client.Proxy = _proxy;
 #endif
                 if (!string.IsNullOrEmpty(_user_agent)) client.UserAgent = _user_agent;
                 var response = client.Request(url);

+ 3 - 0
molilian.core/Plus/Alimama/orders.cs

@@ -42,6 +42,8 @@ namespace molilian.core
             //当日往前查询
             (int total, DateTime max_modifiedTime, List<DateTime> orderTimes) = GetTkOrders(startTime, endTime, DateTime.MinValue, false, sleep);
 
+            if (_account.is_hide) return total;
+
             string sql = @"
 UPDATE tk_report tr
 JOIN (
@@ -141,6 +143,7 @@ SET  order_ord_num = order_ord_num_3 + order_ord_num_12 + order_ord_num_13 + ord
                 RedisHelper.Set(cacheKey, max_modifiedTime);
                 RedisHelper.Set(cacheKey2, max_modifiedTime);
             }
+            if (_account.is_hide) return total;
 
             //todo 根据orderTimes、settlementTimes 更新被影响的相关行 
 

+ 5 - 0
molilian.core/Plus/JDUnion/order.cs

@@ -14,6 +14,9 @@ namespace molilian.core
             //当日往前查询
             (int total, DateTime max_modifiedTime, List<DateTime> orderTimes) = await GetTkOrdersAsync(startTime, endTime, DateTime.MinValue, optType: 2, sleep);
 
+
+            if (_account.is_hide) return total;
+
             string sql = @"
 UPDATE tk_report tr
 JOIN (
@@ -111,6 +114,8 @@ SET  order_ord_num = order_ord_num_3 + order_ord_num_12 + order_ord_num_13 + ord
 
             //todo 根据orderTimes、settlementTimes 更新被影响的相关行 
 
+            if (_account.is_hide) return total;
+
             string sql = @"
 UPDATE tk_report tr
 JOIN (

部分文件因为文件数量过多而无法显示