Преглед на файлове

补点击业务调整:根据账号输出数据、随机点击数;

dodo hold преди 2 години
родител
ревизия
e6ae30e29c

+ 12 - 4
molilian.api/Controllers/public/TkController.cs

@@ -9,6 +9,7 @@ using System.Security.Cryptography;
 using Microsoft.AspNetCore.Authentication;
 using TencentCloud.Ecm.V20190719.Models;
 using COSXML.Network;
+using System.Linq;
 
 namespace molilian.api.Controllers
 {
@@ -556,7 +557,7 @@ namespace molilian.api.Controllers
             });
         }
 
-         
+
 
 
 
@@ -564,17 +565,24 @@ namespace molilian.api.Controllers
         public async Task<ActionResult> unsafeParseDpList([FromQuery] string query = "", [FromQuery] string a = "", [FromQuery] int t = 0, [FromQuery] string sign = "")
         {
             string filter = $"batchId=@query";
+            var account_list = TkPoolCore.List();
+            List<int> account_ids = [];
+            if (account_list.Any())
+            {
+                account_ids = account_list.Where(e => e.enable_fake_click).Select(e => e.id).ToList();
+                filter += $" AND accountId IN @account_ids";
+            }
             string orderBy = "paid_time ASC";
 
             var data = new DBContext.Table("tk_order_tracking")
-                .Where(filter, new { query })
+                .Where(filter, new { query, account_ids })
                 .Order(orderBy)
                 .Select<TkOrderTrackingDTO>();
 
-            List<object> list = new();
+            List<object> list = [];
             foreach (var item in data)
             {
-                list.Add(new { url = item.deeplinkUrl, count = 1, time = item.exp_time });
+                list.Add(new { url = item.deeplinkUrl, count = 4, time = item.exp_time });
             }
 
             return new APIResult(new

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
molilian.api/Properties/PublishProfiles/https___ccr.ccs.tencentyun.com_shaobin.pubxml.user


+ 4 - 0
molilian.core/Core/taoke/OrderTrackingCore.cs

@@ -45,6 +45,9 @@ namespace molilian.core
             var summary = GetLinkSummary(item.accountName, item.itemTitle);
             if (summary == null) return false;
 
+            var config = TkConfigCore.Get();
+            Random rand = new();
+            int click_num = rand.Next(config.fake_click_min, config.fake_click_max + 1);
 
             DateTime paidTime = item.tbPaidTime;
             if (paidTime < summary.create_time) return false;
@@ -76,6 +79,7 @@ namespace molilian.core
                 paid_time = item.tbPaidTime,
 
                 exp_time = expTime,
+                click_num = click_num,
             };
 
             conn.Replace(data);

+ 2 - 1
molilian.core/DTO/alimama/TkConfigDTO.cs

@@ -7,6 +7,7 @@
         public int jdIgnorePercentage { get; set; } = 0;
         public string pass_salt { get; set; } = string.Empty;
         public string ignorePercentageCity { get; set; } = string.Empty;
-
+        public int fake_click_min { get; set; }
+        public int fake_click_max { get; set; }
     }
 }

+ 1 - 0
molilian.core/DTO/alimama/TkOrderTrackingDTO.cs

@@ -27,6 +27,7 @@ namespace molilian.core
         public DateTime exp_time { get; set; } = DateTime.Now;
         public DateTime click_time { get; set; } = DateTime.MinValue;
         public DateTime paid_time { get; set; } = DateTime.MinValue;
+        public int click_num { get; set; } = 0;
     }
 
 }

+ 1 - 0
molilian.core/DTO/alimama/TkPoolDTO.cs

@@ -22,5 +22,6 @@
         public string api { get; set; } = string.Empty;
         public int api_id { get; set; } = 0;
         public string end_point { get; set; } = string.Empty;
+        public bool enable_fake_click { get; set; } = false;
     }
 }

Някои файлове не бяха показани, защото твърде много файлове са промени